mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-28 12:08:46 +00:00
[fix] fix divide by zero exception
This commit is contained in:
@@ -261,7 +261,7 @@ namespace XCharts.Runtime
|
||||
else
|
||||
{
|
||||
var data = axis.GetDataList(dataZoom);
|
||||
if (axis.IsCategory() && data.Count > 0)
|
||||
if (axis.IsCategory() && data.Count > 0 && splitNum > 0)
|
||||
{
|
||||
var count = axis.boundaryGap ? data.Count : data.Count - 1;
|
||||
int tick = count / splitNum;
|
||||
|
||||
Reference in New Issue
Block a user