Skip to content

Commit

Permalink
整理代码,去掉warning
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed Sep 19, 2020
1 parent be71983 commit 8627494
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion Assets/XCharts/Runtime/Internal/CoordinateChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ private void InitYAxis(int yAxisIndex, YAxis yAxis)
float totalWidth = 0;
float eachWidth = AxisHelper.GetEachWidth(yAxis, m_CoordinateHeight, m_DataZoom);
float gapWidth = yAxis.boundaryGap ? eachWidth / 2 : 0;
float textWidth = AxisHelper.GetScaleWidth(yAxis, m_CoordinateWidth, 0, m_DataZoom);
for (int i = 0; i < splitNumber; i++)
{
Text txt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,6 @@ private bool DrawSmoothLine(VertexHelper vh, Serie serie, Axis xAxis, Vector3 lp
TryAddToList(isTurnBack, isYAxis, smoothPoints, lastSmoothPoint, startUp, false);
TryAddToList(isTurnBack, isYAxis, smoothDownPoints, lastSmoothDownPoint, startDn, false);
}
var sourAreaColor = areaColor;
var bezierPointsCount = bezierPoints.Count;
for (int k = 1; k < bezierPointsCount; k++)
{
Expand Down
1 change: 0 additions & 1 deletion Assets/XCharts/Runtime/LiquidChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ private void DrawVesselBackground(VertexHelper vh)
{
var cenPos = vessel.runtimeCenterPos;
var radius = vessel.runtimeRadius;
var serie = SeriesHelper.GetSerieByVesselIndex(m_Series, vessel.index);
ChartDrawer.DrawCricle(vh, cenPos, vessel.runtimeInnerRadius, vessel.backgroundColor, m_Settings.cicleSmoothness);
}
}
Expand Down
12 changes: 0 additions & 12 deletions Assets/XCharts/Runtime/PieChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ private void UpdateRuntimeData()
for (int n = 0; n < data.Count; n++)
{
var serieData = data[n];
var itemStyle = SerieHelper.GetItemStyle(serie, serieData, serieData.highlighted);
serieData.index = n;
float value = isAllZeroValue ? zeroReplaceValue : serieData.GetCurrData(1, dataChangeDuration);
serieData.runtimePieStartAngle = startDegree;
Expand Down Expand Up @@ -178,8 +177,6 @@ private void DrawPie(VertexHelper vh)
}
if (serie.pieClickOffset) isClickOffset = true;
bool dataChanging = false;
float dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
bool isAllZeroValue = SerieHelper.IsAllZeroValue(serie, 1);
for (int n = 0; n < data.Count; n++)
{
var serieData = data[n];
Expand Down Expand Up @@ -298,32 +295,25 @@ private void DrawLabelLine(VertexHelper vh, Serie serie, SerieData serieData, Co
{
pos2 = new Vector3(center.x + radius2 * currSin, center.y + radius2 * currCos);
}
float tx, ty;
Vector3 pos4, pos6;
var horizontalLineCircleRadius = serieLabel.lineWidth * 4f;
var lineCircleDiff = horizontalLineCircleRadius - 0.3f;
if (currAngle < 90)
{
ty = serieLabel.lineWidth * Mathf.Cos((90 - currAngle) * Mathf.Deg2Rad);
tx = serieLabel.lineWidth * Mathf.Sin((90 - currAngle) * Mathf.Deg2Rad);
var r4 = Mathf.Sqrt(radius1 * radius1 - Mathf.Pow(currCos * radius3, 2)) - currSin * radius3;
r4 += serieLabel.lineLength1 - lineCircleDiff;
pos6 = pos0 + Vector3.right * lineCircleDiff;
pos4 = pos6 + Vector3.right * r4;
}
else if (currAngle < 180)
{
ty = serieLabel.lineWidth * Mathf.Sin((180 - currAngle) * Mathf.Deg2Rad);
tx = serieLabel.lineWidth * Mathf.Cos((180 - currAngle) * Mathf.Deg2Rad);
var r4 = Mathf.Sqrt(radius1 * radius1 - Mathf.Pow(currCos * radius3, 2)) - currSin * radius3;
r4 += serieLabel.lineLength1 - lineCircleDiff;
pos6 = pos0 + Vector3.right * lineCircleDiff;
pos4 = pos6 + Vector3.right * r4;
}
else if (currAngle < 270)
{
ty = serieLabel.lineWidth * Mathf.Sin((180 + currAngle) * Mathf.Deg2Rad);
tx = serieLabel.lineWidth * Mathf.Cos((180 + currAngle) * Mathf.Deg2Rad);
var currSin1 = Mathf.Sin((360 - currAngle) * Mathf.Deg2Rad);
var currCos1 = Mathf.Cos((360 - currAngle) * Mathf.Deg2Rad);
var r4 = Mathf.Sqrt(radius1 * radius1 - Mathf.Pow(currCos1 * radius3, 2)) - currSin1 * radius3;
Expand All @@ -333,8 +323,6 @@ private void DrawLabelLine(VertexHelper vh, Serie serie, SerieData serieData, Co
}
else
{
ty = serieLabel.lineWidth * Mathf.Cos((90 + currAngle) * Mathf.Deg2Rad);
tx = serieLabel.lineWidth * Mathf.Sin((90 + currAngle) * Mathf.Deg2Rad);
var currSin1 = Mathf.Sin((360 - currAngle) * Mathf.Deg2Rad);
var currCos1 = Mathf.Cos((360 - currAngle) * Mathf.Deg2Rad);
var r4 = Mathf.Sqrt(radius1 * radius1 - Mathf.Pow(currCos1 * radius3, 2)) - currSin1 * radius3;
Expand Down
6 changes: 0 additions & 6 deletions Assets/XCharts/Runtime/PolarChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ public partial class PolarChart : BaseChart
[SerializeField] private RadiusAxis m_RadiusAxis = RadiusAxis.defaultRadiusAxis;
[SerializeField] private AngleAxis m_AngleAxis = AngleAxis.defaultAngleAxis;

private bool m_CheckMinMaxValue = false;

protected override void Awake()
{
base.Awake();
m_CheckMinMaxValue = false;
CheckMinMaxValue();
UpdateRuntimeValue();
InitRadiusAxis(m_RadiusAxis);
Expand Down Expand Up @@ -233,10 +230,8 @@ protected override void Update()

private void CheckMinMaxValue()
{

if (m_RadiusAxis.IsCategory() && m_AngleAxis.IsCategory())
{
m_CheckMinMaxValue = true;
return;
}
UpdateAxisMinMaxValue(0, m_RadiusAxis);
Expand All @@ -259,7 +254,6 @@ private void UpdateAxisMinMaxValue(int axisIndex, Axis axis, bool updateChart =
AxisHelper.AdjustMinMaxValue(axis, ref tempMinValue, ref tempMaxValue, true);
if (tempMinValue != axis.runtimeMinValue || tempMaxValue != axis.runtimeMaxValue)
{
m_CheckMinMaxValue = true;
m_IsPlayingAnimation = true;
var needCheck = !m_IsPlayingAnimation && axis.runtimeLastCheckInverse == axis.inverse;
axis.UpdateMinValue(tempMinValue, needCheck);
Expand Down
1 change: 0 additions & 1 deletion Assets/XCharts/Runtime/RadarChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,6 @@ protected override void UpdateTooltip()
var serie = m_Series.GetSerie(serieIndex);
var radar = m_Radars[serie.radarIndex];
var dataIndex = tooltip.runtimeDataIndex[1];
StringBuilder sb = new StringBuilder();
var content = TooltipHelper.GetFormatterContent(m_Tooltip, dataIndex, m_Series, m_ThemeInfo, null, null, false, radar);
TooltipHelper.SetContentAndPosition(tooltip, content, chartRect);
}
Expand Down

0 comments on commit 8627494

Please sign in to comment.