【发布时间】:2015-08-04 08:23:17
【问题描述】:
当超过一些数据集(大约 6 个或更多)到折线图时,我们会遇到异常。
这是细节:
java.lang.IllegalArgumentException: One or more of the DataSet Entry arrays are longer than the x-values array of this ChartData object.
at com.github.mikephil.charting.data.ChartData.isLegal(ChartData.java:173)
at com.github.mikephil.charting.data.ChartData.init(ChartData.java:130)
at com.github.mikephil.charting.data.ChartData.<init>(ChartData.java:96)
at com.github.mikephil.charting.data.BarLineScatterCandleData.<init>(BarLineScatterCandleData.java:27)
at com.github.mikephil.charting.data.LineData.<init>(LineData.java:27)
我无法理解原因。
我正在使用 MPAndroidChart 绘制图表。
当输入更多数据集时,我们会遇到该异常。
【问题讨论】:
-
错误很明显:DataSet 中的元素比 x 值中的元素多。如果您希望其他人能够帮助您,请发布您的代码。
标签: android mpandroidchart illegalargumentexception