mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 07:20:08 +00:00
整理代码,去掉warning
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user