mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 22:40:10 +00:00
修复DataZoom拖动时SerieLabel不刷新的问题 (#165)
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
|
||||
## master
|
||||
|
||||
* (2021.08.31) Fixed bug where `SerieLabel` does not refresh when `DataZoom` is dragged (#165)
|
||||
* (2021.08.25) Fixed an issue where the theme switch could not be save to the scene (#166)
|
||||
* (2021.08.24) Added `Animation`'s `alongWithLinePath`
|
||||
* (2021.08.22) Added `Serie`'s `ignoreLineBreak` (#164)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
## master
|
||||
|
||||
* (2021.08.31) 修复`DataZoom`拖动时`SerieLabel`不刷新的问题 (#165)
|
||||
* (2021.08.25) 修复`Theme`主题切换无法保持到场景上的问题 (#166)
|
||||
* (2021.08.24) 增加`Animation`的`alongWithLinePath`参数设置折线轨迹匀速动画
|
||||
* (2021.08.22) 增加`Serie`的`ignoreLineBreak`参数设置忽略数据连线是否断开 (#164)
|
||||
|
||||
@@ -1464,10 +1464,11 @@ namespace XCharts
|
||||
if (!serie.show) continue;
|
||||
if (serie.IsPerformanceMode()) continue;
|
||||
if (!serie.IsCoordinateSerie()) continue;
|
||||
|
||||
for (int j = 0; j < serie.data.Count; j++)
|
||||
DataZoomHelper.GetSerieRelatedDataZoom(serie, dataZooms, out var xDataZoom, out var yDataZoom);
|
||||
var showData = serie.GetDataList(xDataZoom);
|
||||
for (int j = 0; j < showData.Count; j++)
|
||||
{
|
||||
var serieData = serie.data[j];
|
||||
var serieData = showData[j];
|
||||
if (serieData.labelObject == null) continue;
|
||||
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData, serieData.highlighted);
|
||||
serieData.index = j;
|
||||
@@ -1546,9 +1547,13 @@ namespace XCharts
|
||||
if (!serie.IsCoordinateSerie()) continue;
|
||||
var total = serie.yTotal;
|
||||
var isPercentStack = SeriesHelper.IsPercentStack(m_Series, serie.stack, SerieType.Bar);
|
||||
for (int j = 0; j < serie.data.Count; j++)
|
||||
DataZoomHelper.GetSerieRelatedDataZoom(serie, dataZooms, out var xDataZoom, out var yDataZoom);
|
||||
var showData = serie.GetDataList(xDataZoom);
|
||||
if (xDataZoom != null)
|
||||
ChartHelper.HideAllObject(m_SerieLabelRoot, "label_" + i);
|
||||
for (int j = 0; j < showData.Count; j++)
|
||||
{
|
||||
var serieData = serie.data[j];
|
||||
var serieData = showData[j];
|
||||
if (serieData.labelObject == null) continue;
|
||||
if (j >= serie.dataPoints.Count)
|
||||
{
|
||||
@@ -1556,6 +1561,7 @@ namespace XCharts
|
||||
serieData.SetIconActive(false);
|
||||
continue;
|
||||
}
|
||||
serieData.labelObject.SetActive(true);
|
||||
var pos = serie.dataPoints[j];
|
||||
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData);
|
||||
var iconStyle = SerieHelper.GetIconStyle(serie, serieData);
|
||||
@@ -1689,7 +1695,7 @@ namespace XCharts
|
||||
}
|
||||
|
||||
public void Internal_CheckClipAndDrawZebraLine(VertexHelper vh, Vector3 p1, Vector3 p2, float size, float zebraWidth,
|
||||
float zebraGap, Color32 color,Color32 toColor, bool clip, Grid grid)
|
||||
float zebraGap, Color32 color, Color32 toColor, bool clip, Grid grid)
|
||||
{
|
||||
ClampInChart(ref p1);
|
||||
ClampInChart(ref p2);
|
||||
|
||||
Reference in New Issue
Block a user