From 9825e0688043a61c99fa7b5f74b45aa60c1d26ae Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Sat, 19 Sep 2020 18:11:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E6=8E=89warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Internal/CoordinateChart.cs | 1 - Runtime/Internal/CoordinateChart_DrawLine.cs | 1 - Runtime/LiquidChart.cs | 1 - Runtime/PieChart.cs | 12 ------------ Runtime/PolarChart.cs | 6 ------ Runtime/RadarChart.cs | 1 - 6 files changed, 22 deletions(-) diff --git a/Runtime/Internal/CoordinateChart.cs b/Runtime/Internal/CoordinateChart.cs index a67415c7..6a619519 100644 --- a/Runtime/Internal/CoordinateChart.cs +++ b/Runtime/Internal/CoordinateChart.cs @@ -531,7 +531,6 @@ namespace XCharts 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; diff --git a/Runtime/Internal/CoordinateChart_DrawLine.cs b/Runtime/Internal/CoordinateChart_DrawLine.cs index f0dc368c..846ec0da 100644 --- a/Runtime/Internal/CoordinateChart_DrawLine.cs +++ b/Runtime/Internal/CoordinateChart_DrawLine.cs @@ -1221,7 +1221,6 @@ namespace XCharts 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++) { diff --git a/Runtime/LiquidChart.cs b/Runtime/LiquidChart.cs index bd5582f4..c1f613cd 100644 --- a/Runtime/LiquidChart.cs +++ b/Runtime/LiquidChart.cs @@ -102,7 +102,6 @@ namespace XCharts { 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); } } diff --git a/Runtime/PieChart.cs b/Runtime/PieChart.cs index 043ccb4f..7c91e909 100644 --- a/Runtime/PieChart.cs +++ b/Runtime/PieChart.cs @@ -89,7 +89,6 @@ namespace XCharts 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; @@ -178,8 +177,6 @@ namespace XCharts } 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]; @@ -298,14 +295,11 @@ namespace XCharts { 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; @@ -313,8 +307,6 @@ namespace XCharts } 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; @@ -322,8 +314,6 @@ namespace XCharts } 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; @@ -333,8 +323,6 @@ namespace XCharts } 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; diff --git a/Runtime/PolarChart.cs b/Runtime/PolarChart.cs index 83683177..d9882b54 100644 --- a/Runtime/PolarChart.cs +++ b/Runtime/PolarChart.cs @@ -20,12 +20,9 @@ namespace XCharts [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); @@ -233,10 +230,8 @@ namespace XCharts private void CheckMinMaxValue() { - if (m_RadiusAxis.IsCategory() && m_AngleAxis.IsCategory()) { - m_CheckMinMaxValue = true; return; } UpdateAxisMinMaxValue(0, m_RadiusAxis); @@ -259,7 +254,6 @@ namespace XCharts 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); diff --git a/Runtime/RadarChart.cs b/Runtime/RadarChart.cs index 1b1eb9bd..5c802436 100644 --- a/Runtime/RadarChart.cs +++ b/Runtime/RadarChart.cs @@ -734,7 +734,6 @@ namespace XCharts 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); }