整理代码,去掉warning

This commit is contained in:
monitor1394
2020-09-19 18:11:16 +08:00
parent 00024a53c0
commit 9825e06880
6 changed files with 0 additions and 22 deletions

View File

@@ -531,7 +531,6 @@ namespace XCharts
float totalWidth = 0; float totalWidth = 0;
float eachWidth = AxisHelper.GetEachWidth(yAxis, m_CoordinateHeight, m_DataZoom); float eachWidth = AxisHelper.GetEachWidth(yAxis, m_CoordinateHeight, m_DataZoom);
float gapWidth = yAxis.boundaryGap ? eachWidth / 2 : 0; float gapWidth = yAxis.boundaryGap ? eachWidth / 2 : 0;
float textWidth = AxisHelper.GetScaleWidth(yAxis, m_CoordinateWidth, 0, m_DataZoom);
for (int i = 0; i < splitNumber; i++) for (int i = 0; i < splitNumber; i++)
{ {
Text txt; Text txt;

View File

@@ -1221,7 +1221,6 @@ namespace XCharts
TryAddToList(isTurnBack, isYAxis, smoothPoints, lastSmoothPoint, startUp, false); TryAddToList(isTurnBack, isYAxis, smoothPoints, lastSmoothPoint, startUp, false);
TryAddToList(isTurnBack, isYAxis, smoothDownPoints, lastSmoothDownPoint, startDn, false); TryAddToList(isTurnBack, isYAxis, smoothDownPoints, lastSmoothDownPoint, startDn, false);
} }
var sourAreaColor = areaColor;
var bezierPointsCount = bezierPoints.Count; var bezierPointsCount = bezierPoints.Count;
for (int k = 1; k < bezierPointsCount; k++) for (int k = 1; k < bezierPointsCount; k++)
{ {

View File

@@ -102,7 +102,6 @@ namespace XCharts
{ {
var cenPos = vessel.runtimeCenterPos; var cenPos = vessel.runtimeCenterPos;
var radius = vessel.runtimeRadius; var radius = vessel.runtimeRadius;
var serie = SeriesHelper.GetSerieByVesselIndex(m_Series, vessel.index);
ChartDrawer.DrawCricle(vh, cenPos, vessel.runtimeInnerRadius, vessel.backgroundColor, m_Settings.cicleSmoothness); ChartDrawer.DrawCricle(vh, cenPos, vessel.runtimeInnerRadius, vessel.backgroundColor, m_Settings.cicleSmoothness);
} }
} }

View File

@@ -89,7 +89,6 @@ namespace XCharts
for (int n = 0; n < data.Count; n++) for (int n = 0; n < data.Count; n++)
{ {
var serieData = data[n]; var serieData = data[n];
var itemStyle = SerieHelper.GetItemStyle(serie, serieData, serieData.highlighted);
serieData.index = n; serieData.index = n;
float value = isAllZeroValue ? zeroReplaceValue : serieData.GetCurrData(1, dataChangeDuration); float value = isAllZeroValue ? zeroReplaceValue : serieData.GetCurrData(1, dataChangeDuration);
serieData.runtimePieStartAngle = startDegree; serieData.runtimePieStartAngle = startDegree;
@@ -178,8 +177,6 @@ namespace XCharts
} }
if (serie.pieClickOffset) isClickOffset = true; if (serie.pieClickOffset) isClickOffset = true;
bool dataChanging = false; bool dataChanging = false;
float dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
bool isAllZeroValue = SerieHelper.IsAllZeroValue(serie, 1);
for (int n = 0; n < data.Count; n++) for (int n = 0; n < data.Count; n++)
{ {
var serieData = data[n]; var serieData = data[n];
@@ -298,14 +295,11 @@ namespace XCharts
{ {
pos2 = new Vector3(center.x + radius2 * currSin, center.y + radius2 * currCos); pos2 = new Vector3(center.x + radius2 * currSin, center.y + radius2 * currCos);
} }
float tx, ty;
Vector3 pos4, pos6; Vector3 pos4, pos6;
var horizontalLineCircleRadius = serieLabel.lineWidth * 4f; var horizontalLineCircleRadius = serieLabel.lineWidth * 4f;
var lineCircleDiff = horizontalLineCircleRadius - 0.3f; var lineCircleDiff = horizontalLineCircleRadius - 0.3f;
if (currAngle < 90) 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; var r4 = Mathf.Sqrt(radius1 * radius1 - Mathf.Pow(currCos * radius3, 2)) - currSin * radius3;
r4 += serieLabel.lineLength1 - lineCircleDiff; r4 += serieLabel.lineLength1 - lineCircleDiff;
pos6 = pos0 + Vector3.right * lineCircleDiff; pos6 = pos0 + Vector3.right * lineCircleDiff;
@@ -313,8 +307,6 @@ namespace XCharts
} }
else if (currAngle < 180) 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; var r4 = Mathf.Sqrt(radius1 * radius1 - Mathf.Pow(currCos * radius3, 2)) - currSin * radius3;
r4 += serieLabel.lineLength1 - lineCircleDiff; r4 += serieLabel.lineLength1 - lineCircleDiff;
pos6 = pos0 + Vector3.right * lineCircleDiff; pos6 = pos0 + Vector3.right * lineCircleDiff;
@@ -322,8 +314,6 @@ namespace XCharts
} }
else if (currAngle < 270) 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 currSin1 = Mathf.Sin((360 - currAngle) * Mathf.Deg2Rad);
var currCos1 = Mathf.Cos((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; var r4 = Mathf.Sqrt(radius1 * radius1 - Mathf.Pow(currCos1 * radius3, 2)) - currSin1 * radius3;
@@ -333,8 +323,6 @@ namespace XCharts
} }
else 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 currSin1 = Mathf.Sin((360 - currAngle) * Mathf.Deg2Rad);
var currCos1 = Mathf.Cos((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; var r4 = Mathf.Sqrt(radius1 * radius1 - Mathf.Pow(currCos1 * radius3, 2)) - currSin1 * radius3;

View File

@@ -20,12 +20,9 @@ namespace XCharts
[SerializeField] private RadiusAxis m_RadiusAxis = RadiusAxis.defaultRadiusAxis; [SerializeField] private RadiusAxis m_RadiusAxis = RadiusAxis.defaultRadiusAxis;
[SerializeField] private AngleAxis m_AngleAxis = AngleAxis.defaultAngleAxis; [SerializeField] private AngleAxis m_AngleAxis = AngleAxis.defaultAngleAxis;
private bool m_CheckMinMaxValue = false;
protected override void Awake() protected override void Awake()
{ {
base.Awake(); base.Awake();
m_CheckMinMaxValue = false;
CheckMinMaxValue(); CheckMinMaxValue();
UpdateRuntimeValue(); UpdateRuntimeValue();
InitRadiusAxis(m_RadiusAxis); InitRadiusAxis(m_RadiusAxis);
@@ -233,10 +230,8 @@ namespace XCharts
private void CheckMinMaxValue() private void CheckMinMaxValue()
{ {
if (m_RadiusAxis.IsCategory() && m_AngleAxis.IsCategory()) if (m_RadiusAxis.IsCategory() && m_AngleAxis.IsCategory())
{ {
m_CheckMinMaxValue = true;
return; return;
} }
UpdateAxisMinMaxValue(0, m_RadiusAxis); UpdateAxisMinMaxValue(0, m_RadiusAxis);
@@ -259,7 +254,6 @@ namespace XCharts
AxisHelper.AdjustMinMaxValue(axis, ref tempMinValue, ref tempMaxValue, true); AxisHelper.AdjustMinMaxValue(axis, ref tempMinValue, ref tempMaxValue, true);
if (tempMinValue != axis.runtimeMinValue || tempMaxValue != axis.runtimeMaxValue) if (tempMinValue != axis.runtimeMinValue || tempMaxValue != axis.runtimeMaxValue)
{ {
m_CheckMinMaxValue = true;
m_IsPlayingAnimation = true; m_IsPlayingAnimation = true;
var needCheck = !m_IsPlayingAnimation && axis.runtimeLastCheckInverse == axis.inverse; var needCheck = !m_IsPlayingAnimation && axis.runtimeLastCheckInverse == axis.inverse;
axis.UpdateMinValue(tempMinValue, needCheck); axis.UpdateMinValue(tempMinValue, needCheck);

View File

@@ -734,7 +734,6 @@ namespace XCharts
var serie = m_Series.GetSerie(serieIndex); var serie = m_Series.GetSerie(serieIndex);
var radar = m_Radars[serie.radarIndex]; var radar = m_Radars[serie.radarIndex];
var dataIndex = tooltip.runtimeDataIndex[1]; var dataIndex = tooltip.runtimeDataIndex[1];
StringBuilder sb = new StringBuilder();
var content = TooltipHelper.GetFormatterContent(m_Tooltip, dataIndex, m_Series, m_ThemeInfo, null, null, false, radar); var content = TooltipHelper.GetFormatterContent(m_Tooltip, dataIndex, m_Series, m_ThemeInfo, null, null, false, radar);
TooltipHelper.SetContentAndPosition(tooltip, content, chartRect); TooltipHelper.SetContentAndPosition(tooltip, content, chartRect);
} }