mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 18:00:26 +00:00
修复DataZoom控制多个轴时的GridCoord获取可能不正确的问题 (#317)
This commit is contained in:
@@ -73,6 +73,7 @@ slug: /changelog
|
||||
|
||||
## master
|
||||
|
||||
* (2024.04.22) 修复`DataZoom`控制多个轴时的`GridCoord`获取可能不正确的问题 (#317)
|
||||
* (2024.04.22) 增加`GridCoord3D`3D坐标系
|
||||
* (2024.04.15) 优化`DateTimeUtil`时间戳转`DateTime`接口时区的问题
|
||||
* (2024.04.15) 优化`GridCoord`在开启`GridLayout`时也显示`Left` `Right` `Top` `Bottom`参数 (#316)
|
||||
|
||||
@@ -317,13 +317,29 @@ namespace XCharts.Runtime
|
||||
GridCoord grid = null;
|
||||
if (dataZoom.xAxisIndexs != null && dataZoom.xAxisIndexs.Count > 0)
|
||||
{
|
||||
var xAxis = GetChartComponent<XAxis>(dataZoom.xAxisIndexs[0]);
|
||||
grid = GetChartComponent<GridCoord>(xAxis.gridIndex);
|
||||
for (int i = 0; i < dataZoom.xAxisIndexs.Count; i++)
|
||||
{
|
||||
var xAxis = GetChartComponent<XAxis>(dataZoom.xAxisIndexs[i]);
|
||||
var tempGrid = GetChartComponent<GridCoord>(xAxis.gridIndex);
|
||||
if (tempGrid.IsPointerEnter())
|
||||
{
|
||||
grid = tempGrid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dataZoom.yAxisIndexs != null && dataZoom.yAxisIndexs.Count > 0)
|
||||
{
|
||||
var yAxis = GetChartComponent<YAxis>(dataZoom.yAxisIndexs[0]);
|
||||
grid = GetChartComponent<GridCoord>(yAxis.gridIndex);
|
||||
for (int i = 0; i < dataZoom.yAxisIndexs.Count; i++)
|
||||
{
|
||||
var yAxis = GetChartComponent<YAxis>(dataZoom.yAxisIndexs[i]);
|
||||
var tempGrid = GetChartComponent<GridCoord>(yAxis.gridIndex);
|
||||
if (tempGrid.IsPointerEnter())
|
||||
{
|
||||
grid = tempGrid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (grid == null) return GetChartComponent<GridCoord>();
|
||||
else return grid;
|
||||
|
||||
Reference in New Issue
Block a user