MPAndroidChart
MPAndroidChart copied to clipboard
java.lang.NegativeArraySizeException: -6
Summary Implementing the ScatterChart with same x axis value. Getting the exception as "java.lang.NegativeArraySizeException: -6" I am getting single point from ioT device therefore each entry is plotted on graph,
val value = afeData.magnitude
val entry = Entry(afeData.peakFrequency, value)
data.addEntry(entry,0)
data.notifyDataChanged()
Sample values are : The X values are repeated.
X: 40000.0 Y: 18799.992
X: 90000.0 Y: 43199.98
X: 1000.0 Y: 489.99976
X: 4000.0 Y: 1999.999
X: 10000.0 Y: 5099.9976
X: 40000.0 Y: 20799.99
X: 90000.0 Y: 47699.977
X: 1000.0 Y: 589.9997
X: 4000.0 Y: 2399.9988
Expected Behavior The chart should plot all data with the same x-axis values. Currently, getting an exception of java.lang.NegativeArraySizeException: -6. How to resolve this ?
**Device **
- Device: [Samsung Galaxy Tab A 8.0]
- Android Version [e.g. 10]
- Library Version (e.g. 3.1.0-alpha)
How to plot same x-axis on graph and resolve this issue ?
I developed a library based on MPAndroidChart to solve this problem. XFree-MPAndroidChart