mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-27 03:10:11 +00:00
修复LineChart渐出动画绘制异常的问题#79
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
* (2020.07.25) Fixed problem with gradual discoloration on `LiquidChart` at `100%`#80
|
* (2020.07.25) Fixed a problem with `LineChart` emerging abnormal in animation drawing#79
|
||||||
|
* (2020.07.25) Fixed a problem with gradual discoloration on `LiquidChart` at `100%`#80
|
||||||
* (2020.07.25) Added `RadarChart` support for `formatter` of `Tooltip`#77
|
* (2020.07.25) Added `RadarChart` support for `formatter` of `Tooltip`#77
|
||||||
* (2020.07.23) Added `RingChart` ring gradient support#75
|
* (2020.07.23) Added `RingChart` ring gradient support#75
|
||||||
* (2020.07.21) Added `formatter` of `AxisLabel` and `SerieLabel` to configure numeric formatting separately.
|
* (2020.07.21) Added `formatter` of `AxisLabel` and `SerieLabel` to configure numeric formatting separately.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
* (2020.07.25) 修复`LineChart`渐出动画绘制异常的问题#79
|
||||||
* (2020.07.25) 修复`LiquidChart`在`100%`时渐变色会失效的问题#80
|
* (2020.07.25) 修复`LiquidChart`在`100%`时渐变色会失效的问题#80
|
||||||
* (2020.07.25) 增加`RadarChart`对`Tooltip`的`formatter`支持#77
|
* (2020.07.25) 增加`RadarChart`对`Tooltip`的`formatter`支持#77
|
||||||
* (2020.07.23) 增加`RingChart`环形渐变支持#75
|
* (2020.07.23) 增加`RingChart`环形渐变支持#75
|
||||||
|
|||||||
@@ -279,6 +279,11 @@ namespace XCharts
|
|||||||
return !m_Enable || m_IsEnd || (m_CurrDataProgress > m_DestDataProgress && m_CurrDetailProgress > m_DestDetailProgress);
|
return !m_Enable || m_IsEnd || (m_CurrDataProgress > m_DestDataProgress && m_CurrDetailProgress > m_DestDetailProgress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsInFadeOut()
|
||||||
|
{
|
||||||
|
return m_FadeOut;
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsInDelay()
|
public bool IsInDelay()
|
||||||
{
|
{
|
||||||
if (m_FadeOut) return (fadeOutDelay > 0 && Time.time - startTime < fadeOutDelay / 1000);
|
if (m_FadeOut) return (fadeOutDelay > 0 && Time.time - startTime < fadeOutDelay / 1000);
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ namespace XCharts
|
|||||||
var serieData = serie.data[n];
|
var serieData = serie.data[n];
|
||||||
var xdata = serieData.GetData(0, xAxis.inverse);
|
var xdata = serieData.GetData(0, xAxis.inverse);
|
||||||
var ydata = serieData.GetData(1, yAxis.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);
|
var symbolSize = symbol.GetSize(serieData == null ? null : serieData.data);
|
||||||
if (Mathf.Abs(xValue - xdata) / xRate < symbolSize
|
if (Mathf.Abs(xValue - xdata) / xRate < symbolSize
|
||||||
&& Mathf.Abs(yValue - ydata) / yRate < symbolSize)
|
&& Mathf.Abs(yValue - ydata) / yRate < symbolSize)
|
||||||
@@ -1406,7 +1406,7 @@ namespace XCharts
|
|||||||
if (serieData.labelObject == null) continue;
|
if (serieData.labelObject == null) continue;
|
||||||
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData, serieData.highlighted);
|
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData, serieData.highlighted);
|
||||||
serieData.index = j;
|
serieData.index = j;
|
||||||
if ((serieLabel.show || serieData.iconStyle.show))
|
if ((serieLabel.show || serieData.iconStyle.show) && j < serie.dataPoints.Count)
|
||||||
{
|
{
|
||||||
var pos = serie.dataPoints[j];
|
var pos = serie.dataPoints[j];
|
||||||
|
|
||||||
|
|||||||
@@ -1116,8 +1116,11 @@ namespace XCharts
|
|||||||
{
|
{
|
||||||
if (smoothStartPosDn != Vector3.zero && smoothStartPosUp != Vector3.zero)
|
if (smoothStartPosDn != Vector3.zero && smoothStartPosUp != Vector3.zero)
|
||||||
{
|
{
|
||||||
CheckClipAndDrawTriangle(vh, smoothStartPosUp, startUp, lp, lineColor, serie.clip);
|
if (!serie.animation.IsInFadeOut())
|
||||||
CheckClipAndDrawTriangle(vh, smoothStartPosDn, startDn, lp, lineColor, serie.clip);
|
{
|
||||||
|
CheckClipAndDrawTriangle(vh, smoothStartPosUp, startUp, lp, lineColor, serie.clip);
|
||||||
|
CheckClipAndDrawTriangle(vh, smoothStartPosDn, startDn, lp, lineColor, serie.clip);
|
||||||
|
}
|
||||||
smoothPoints.Add(smoothStartPosUp);
|
smoothPoints.Add(smoothStartPosUp);
|
||||||
smoothDownPoints.Add(smoothStartPosDn);
|
smoothDownPoints.Add(smoothStartPosDn);
|
||||||
}
|
}
|
||||||
@@ -1352,6 +1355,7 @@ namespace XCharts
|
|||||||
for (int i = 1; i < linePointList.Count; i++)
|
for (int i = 1; i < linePointList.Count; i++)
|
||||||
{
|
{
|
||||||
ep = linePointList[i];
|
ep = linePointList[i];
|
||||||
|
if (serie.animation.CheckDetailBreak(ep, isYAxis)) return false;
|
||||||
CheckClipAndDrawLine(vh, sp, ep, lineWidth, lineColor, serie.clip);
|
CheckClipAndDrawLine(vh, sp, ep, lineWidth, lineColor, serie.clip);
|
||||||
sp = ep;
|
sp = ep;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user