mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 17:00:08 +00:00
修复LineChart渐出动画绘制异常的问题#79
This commit is contained in:
@@ -276,7 +276,7 @@ namespace XCharts
|
||||
var serieData = serie.data[n];
|
||||
var xdata = serieData.GetData(0, xAxis.inverse);
|
||||
var ydata = serieData.GetData(1, yAxis.inverse);
|
||||
var symbol = SerieHelper.GetSerieSymbol(serie,serieData);
|
||||
var symbol = SerieHelper.GetSerieSymbol(serie, serieData);
|
||||
var symbolSize = symbol.GetSize(serieData == null ? null : serieData.data);
|
||||
if (Mathf.Abs(xValue - xdata) / xRate < symbolSize
|
||||
&& Mathf.Abs(yValue - ydata) / yRate < symbolSize)
|
||||
@@ -1406,7 +1406,7 @@ namespace XCharts
|
||||
if (serieData.labelObject == null) continue;
|
||||
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData, serieData.highlighted);
|
||||
serieData.index = j;
|
||||
if ((serieLabel.show || serieData.iconStyle.show))
|
||||
if ((serieLabel.show || serieData.iconStyle.show) && j < serie.dataPoints.Count)
|
||||
{
|
||||
var pos = serie.dataPoints[j];
|
||||
|
||||
|
||||
@@ -1116,8 +1116,11 @@ namespace XCharts
|
||||
{
|
||||
if (smoothStartPosDn != Vector3.zero && smoothStartPosUp != Vector3.zero)
|
||||
{
|
||||
CheckClipAndDrawTriangle(vh, smoothStartPosUp, startUp, lp, lineColor, serie.clip);
|
||||
CheckClipAndDrawTriangle(vh, smoothStartPosDn, startDn, lp, lineColor, serie.clip);
|
||||
if (!serie.animation.IsInFadeOut())
|
||||
{
|
||||
CheckClipAndDrawTriangle(vh, smoothStartPosUp, startUp, lp, lineColor, serie.clip);
|
||||
CheckClipAndDrawTriangle(vh, smoothStartPosDn, startDn, lp, lineColor, serie.clip);
|
||||
}
|
||||
smoothPoints.Add(smoothStartPosUp);
|
||||
smoothDownPoints.Add(smoothStartPosDn);
|
||||
}
|
||||
@@ -1352,6 +1355,7 @@ namespace XCharts
|
||||
for (int i = 1; i < linePointList.Count; i++)
|
||||
{
|
||||
ep = linePointList[i];
|
||||
if (serie.animation.CheckDetailBreak(ep, isYAxis)) return false;
|
||||
CheckClipAndDrawLine(vh, sp, ep, lineWidth, lineColor, serie.clip);
|
||||
sp = ep;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user