修复Category轴在BoundaryGapAlignWithLabelTrueTick显示效果不对的问题 #115

This commit is contained in:
monitor1394
2021-01-29 20:55:58 +08:00
parent feeae66e32
commit 678f5af6a4
3 changed files with 6 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2021.01.29) Fixed incorrect display of `Tick` on `Category` axis when `BoundaryGap` and `alignWithLabel` are `True` #115
* (2021.01.25) Optimize some details
* (2021.01.22) Fixed a `Inpsector` displayed error
* (2021.01.21) Release `v2.0.0-preview.2` version

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2021.01.29) 修复`Category`轴在`BoundaryGap``AlignWithLabel``True``Tick`显示效果不对的问题 #115
* (2021.01.25) 优化一些细节
* (2021.01.22) 修复`Inpsector`上部分属性显示异常的问题
* (2021.01.21) 发布`v2.0.0-preview.2`版本

View File

@@ -177,7 +177,10 @@ namespace XCharts
if (axis.IsCategory())
{
int tick = Mathf.RoundToInt(axis.data.Count * 1f / splitNum);
return Mathf.CeilToInt(axis.data.Count * 1.0f / tick) + 1;
if (axis.boundaryGap)
return Mathf.CeilToInt(axis.data.Count * 1.0f / tick) + 1;
else
return Mathf.CeilToInt(axis.data.Count * 1.0f / tick);
}
else
{