XCharts-Team / XCharts

A charting and data visualization library for Unity. Unity数据可视化图表插件。
https://xcharts-team.github.io
MIT License
3.31k stars 570 forks source link

DivideByZeroException: Attempted to divide by zero. #302

Closed breineng closed 10 months ago

breineng commented 10 months ago

I get the following error when I open a prefab in prefab stage mode. Unity 2022.3.17f1

DivideByZeroException: Attempted to divide by zero.
XCharts.Runtime.AxisHelper.GetSplitNumber (XCharts.Runtime.Axis axis, System.Single coordinateWid, XCharts.Runtime.DataZoom dataZoom) (at ./Library/PackageCache/com.monitor1394.xcharts@1e31cf3010/Runtime/Component/Axis/AxisHelper.cs:71)
XCharts.Runtime.AxisHelper.GetScaleNumber (XCharts.Runtime.Axis axis, System.Single coordinateWidth, XCharts.Runtime.DataZoom dataZoom) (at ./Library/PackageCache/com.monitor1394.xcharts@1e31cf3010/Runtime/Component/Axis/AxisHelper.cs:211)
XCharts.AxisHandler`1[T].InitAxis (XCharts.Runtime.Axis relativedAxis, XCharts.Runtime.Orient orient, System.Single axisStartX, System.Single axisStartY, System.Single axisLength, System.Single relativedLength) (at ./Library/PackageCache/com.monitor1394.xcharts@1e31cf3010/Runtime/Component/Axis/AxisHandler.cs:394)
XCharts.Runtime.XAxisHander+<>c__DisplayClass6_0.<InitXAxis>b__0 () (at ./Library/PackageCache/com.monitor1394.xcharts@1e31cf3010/Runtime/Component/Axis/XAxis/XAxisHander.cs:54)
XCharts.Runtime.XAxisHander.InitXAxis (XCharts.Runtime.XAxis xAxis) (at ./Library/PackageCache/com.monitor1394.xcharts@1e31cf3010/Runtime/Component/Axis/XAxis/XAxisHander.cs:62)
XCharts.Runtime.XAxisHander.InitComponent () (at ./Library/PackageCache/com.monitor1394.xcharts@1e31cf3010/Runtime/Component/Axis/XAxis/XAxisHander.cs:13)
XCharts.Runtime.BaseChart.InitComponent () (at ./Library/PackageCache/com.monitor1394.xcharts@1e31cf3010/Runtime/Internal/BaseChart.cs:126)
XCharts.Runtime.BaseGraph.Awake () (at ./Library/PackageCache/com.monitor1394.xcharts@1e31cf3010/Runtime/Internal/BaseGraph.cs:67)
XCharts.Runtime.BaseChart.Awake () (at ./Library/PackageCache/com.monitor1394.xcharts@1e31cf3010/Runtime/Internal/BaseChart.cs:137)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
monitor1394 commented 10 months ago

XCharts是什么版本?