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