修复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

@@ -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
{