diff --git a/CHANGELOG.md b/CHANGELOG.md index f4b81850..64d9a9ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ ## master +* (2022.07.02) 修复`YAxis`的`AxisLabel`设置`onZero`不生效的问题 * (2022.07.02) 修复`AxisLabel`代码设置`distance`属性后一直刷新的问题 * (2022.06.30) 修复`Runtime`下代码创建图表时组件无法初始化的问题 * (2022.06.29) 增加`Tooltip`的`itemFormatter`支持`{c0}`显示各维度数据 (#205) diff --git a/Runtime/Component/Axis/YAxis/YAxisHander.cs b/Runtime/Component/Axis/YAxis/YAxisHander.cs index 5d91b08a..58041f55 100644 --- a/Runtime/Component/Axis/YAxis/YAxisHander.cs +++ b/Runtime/Component/Axis/YAxis/YAxisHander.cs @@ -72,7 +72,8 @@ namespace XCharts.Runtime if (grid == null) return Vector3.zero; - return GetLabelPosition(i, Orient.Vertical, component, null, + var xAxis = chart.GetChartComponent(component.index); + return GetLabelPosition(i, Orient.Vertical, component, xAxis, chart.theme.axis, scaleWid, grid.context.x,