paragp / achartengine

AChartEngine is a charting library for Android applications. It currently supports the following chart types: line chart area chart scatter chart time chart bar chart pie chart bubble chart doughnut chart range (high-low) bar chart dial chart / gauge combined (any combination of line, cubic line, scatter, bar, range bar, bubble) chart cubic line chart All the above supported chart types can contain multiple series, can be displayed with the X axis horizontally (default) or vertically and support many other custom features. The charts can be built as a view that can be added to a view group or as an intent, such as it can be used to start an activity. The model and the graphing code is well optimized such as it can handle and display huge number of values. AChartEngine is currently at the 1.0.0 release. New chart types will be added in the following releases. Please keep sending your feedback such as we can continually improve this library. Find us on Facebook, too: http://www.facebook.com/achartengine Read a short introduction to AChartEngine here: http://www.javaadvent.com/2012/12/achartengine-charting-library-for.html Another good tutorial can be read here: http://jaxenter.com/effort-free-graphs-on-android-with-achartengine-46199.html
0 stars 1 forks source link

Demo source 1.1.0 crashing when using "embedded line chart demo" #327

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Launch Demo application 1.1.0
2. Select 1st option - "embedded line chart demo"
3. Create 2-3 series with data such that x or y co-ordinates are not visible on 
the screen
E.g.
1st series data 
(10,20),(20,30),(30,40)

2nd series data 
(12,25),(15,5),(28,20)

3rd series data 
(5,10),(50,10),(74,235)

As soon as the co-ordinates fall beyond the view limit, the application gets 
crashed.

What is the expected output? What do you see instead?
The application should not get crashed.

Please provide a source code snippet that we can use to replicate the issue.
XYChartBuilder.java of achartengine demo source code 1.1.0

What version of the product binary library are you using?
1.1.0

Please provide any additional information below.
Logs below : 07-09 12:23:17.430: E/AndroidRuntime(6159): FATAL EXCEPTION: main
07-09 12:23:17.430: E/AndroidRuntime(6159): 
java.lang.IndexOutOfBoundsException: Invalid index 3, size is 3
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
java.util.ArrayList.get(ArrayList.java:308)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.util.IndexXYMap.getYByIndex(IndexXYMap.java:86)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.model.XYSeries.getY(XYSeries.java:203)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.chart.XYChart.drawChartValuesText(XYChart.java:590)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.chart.XYChart.drawSeries(XYChart.java:534)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.chart.XYChart.draw(XYChart.java:311)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.GraphicalView.onDraw(GraphicalView.java:168)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.View.draw(View.java:9291)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2584)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2582)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2582)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2582)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2582)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.View.draw(View.java:9294)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.widget.FrameLayout.draw(FrameLayout.java:419)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:207
7)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewRoot.draw(ViewRoot.java:1669)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewRoot.performTraversals(ViewRoot.java:1384)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewRoot.handleMessage(ViewRoot.java:2020)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.os.Looper.loop(Looper.java:132)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.app.ActivityThread.main(ActivityThread.java:4028)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
java.lang.reflect.Method.invokeNative(Native Method)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
java.lang.reflect.Method.invoke(Method.java:491)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by shadabun...@gmail.com on 9 Jul 2013 at 6:58

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 31 Oct 2013 at 8:32