mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
修复Category轴在BoundaryGap和AlignWithLabel为True时Tick显示效果不对的问题 #115
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user