mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-26 10:50:08 +00:00
3.0 - optimize code
This commit is contained in:
@@ -81,6 +81,8 @@ namespace XCharts.Runtime
|
||||
{
|
||||
if (dataCount < 1)
|
||||
dataCount = 1;
|
||||
if (axis.IsValue())
|
||||
return dataCount > 1 ? coordinateWidth / (dataCount - 1) : coordinateWidth;
|
||||
var categoryCount = axis.GetDataCount(dataZoom);
|
||||
int segment = (axis.boundaryGap ? categoryCount : categoryCount - 1);
|
||||
segment = segment <= 0 ? dataCount : segment;
|
||||
|
||||
Reference in New Issue
Block a user