mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-26 02:40:13 +00:00
修复Category轴在BoundaryGap和AlignWithLabel为True时Tick显示效果不对的问题 #115
This commit is contained in:
@@ -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.25) Optimize some details
|
||||||
* (2021.01.22) Fixed a `Inpsector` displayed error
|
* (2021.01.22) Fixed a `Inpsector` displayed error
|
||||||
* (2021.01.21) Release `v2.0.0-preview.2` version
|
* (2021.01.21) Release `v2.0.0-preview.2` version
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
* (2021.01.29) 修复`Category`轴在`BoundaryGap`和`AlignWithLabel`为`True`时`Tick`显示效果不对的问题 #115
|
||||||
* (2021.01.25) 优化一些细节
|
* (2021.01.25) 优化一些细节
|
||||||
* (2021.01.22) 修复`Inpsector`上部分属性显示异常的问题
|
* (2021.01.22) 修复`Inpsector`上部分属性显示异常的问题
|
||||||
* (2021.01.21) 发布`v2.0.0-preview.2`版本
|
* (2021.01.21) 发布`v2.0.0-preview.2`版本
|
||||||
|
|||||||
@@ -177,7 +177,10 @@ namespace XCharts
|
|||||||
if (axis.IsCategory())
|
if (axis.IsCategory())
|
||||||
{
|
{
|
||||||
int tick = Mathf.RoundToInt(axis.data.Count * 1f / splitNum);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user