New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayIndexOutOfBoundsException on line chart #66
Comments
Labels can have up to 32 characters, do you have labels with more chars? |
No. I don't. But they are in the format of MM-DD-YY strings |
Exception is thrown in this line ValueFormatterHelper.java#L79 System.arraycopy(label, 0, formattedValue, formattedValue.length - label.length, label.length); Where label is char array from AxisValue and formattedValue is char array with size 32. Error message Is there any possibility that any of your formatted labels in MM-DD-YY have some additional chars, can you display them all in logcat? |
Yes.. looks like that was the problem. When I was formatting dates in MM-DD-YY format, seems like moment.js is throwing an exception and creating an exception string in place of the formatted value. Got it working now after fixing labels. Thanks a ton. |
I get this error on zooming and scrolling the linechart. This happens intermittently.
java.lang.ArrayIndexOutOfBoundsException: src.length=69 srcPos=0 dst.length=32 dstPos=-37 length=69
at java.lang.System.arraycopy(Native Method)
at lecho.lib.hellocharts.formatter.ValueFormatterHelper.formatFloatValueWithPrependedAndAppendedText(ValueFormatterHelper.java:79)
at lecho.lib.hellocharts.formatter.ValueFormatterHelper.formatFloatValueWithPrependedAndAppendedText(ValueFormatterHelper.java:94)
at lecho.lib.hellocharts.formatter.SimpleAxisValueFormatter.formatValueForManualAxis(SimpleAxisValueFormatter.java:20)
at lecho.lib.hellocharts.renderer.AxesRenderer.drawAxisLabelsAndName(AxesRenderer.java:575)
at lecho.lib.hellocharts.renderer.AxesRenderer.drawInForeground(AxesRenderer.java:385)
at lecho.lib.hellocharts.view.AbstractChartView.onDraw(AbstractChartView.java:93)
The text was updated successfully, but these errors were encountered: