Repository: PhilJay/MPAndroidChart

Issue #2450: Invalid index 0, size is 0 in lineChart
Created: 2016-11-09T11:49:05Z
in the first, I add an empty chart data ,then
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
11-09 19:34:42.397 E/AndroidRuntime( 5201): 	at             java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
11-09 19:34:42.397 E/AndroidRuntime( 5201): 	at java.util.ArrayList.get(ArrayList.java:308)
11-09 19:34:42.397 E/AndroidRuntime( 5201): 	at com.github.mikephil.charting.data.DataSet.getEntryForIndex(DataSet.java:286)
11-09 19:34:42.397 E/AndroidRuntime( 5201): 	at com.github.mikephil.charting.utils.Transformer.generateTransformedValuesLine(Transformer.java:184)
11-09 19:34:42.397 E/AndroidRuntime( 5201): 	at com.github.mikephil.charting.renderer.LineChartRenderer.drawValues(LineChartRenderer.java:545)
11-09 19:34:42.397 E/AndroidRuntime( 5201): 	at com.github.mikephil.charting.charts.BarLineChartBase.onDraw(BarLineChartBase.java:251)

I think it is because of you dont check size when you draw values

Duplicate issue #3124: The MPChartExample crash
Created: 2017-05-19T09:16:42Z
Runing MPChartExample on Genymotion, when I entry Link Chart (Dual YAxis) item  and  drag first bar.  The app crash.
 E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                    Process: com.xxmassdeveloper.mpchartexample, PID: 10537
                                                                                    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
                                                                                        at java.util.ArrayList.get(ArrayList.java:411)
                                                                                        at com.github.mikephil.charting.data.DataSet.getEntryForIndex(DataSet.java:286)
                                                                                        at com.github.mikephil.charting.utils.Transformer.generateTransformedValuesLine(Transformer.java:184)
                                                                                        at com.github.mikephil.charting.renderer.LineChartRenderer.drawValues(LineChartRenderer.java:547)
                                                                                        at com.github.mikephil.charting.charts.BarLineChartBase.onDraw(BarLineChartBase.java:263)
                                                                                        at android.view.View.draw(View.java:17067)
                                                                                        at android.view.View.updateDisplayListIfDirty(View.java:16049)
                                                                                        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3748)
                                                                                        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3728)
                                                                                        at android.view.View.updateDisplayListIfDirty(View.java:16012)
                                                                                        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3748)
                                                                                        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3728)
                                                                                        at android.view.View.updateDisplayListIfDirty(View.java:16012)
                                                                                        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3748)
                                                                                        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3728)
                                                                                        at android.view.View.updateDisplayListIfDirty(View.java:16012)
                                                                                        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3748)
                                                                                        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3728)
                                                                                        at android.view.View.updateDisplayListIfDirty(View.java:16012)
                                                                                        at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:656)
                                                                                        at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:662)
                                                                                        at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:770)
                                                                                        at android.view.ViewRootImpl.draw(ViewRootImpl.java:2796)
                                                                                        at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2604)
                                                                                        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2211)
                                                                                        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1246)
                                                                                        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6301)
                                                                                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
                                                                                        at android.view.Choreographer.doCallbacks(Choreographer.java:683)
                                                                                        at android.view.Choreographer.doFrame(Choreographer.java:619)
                                                                                        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
                                                                                        at android.os.Handler.handleCallback(Handler.java:751)
                                                                                        at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                        at android.os.Looper.loop(Looper.java:154)
                                                                                        at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

Closing comment (2017-07-06T06:11:36Z): This is a duplicate of #2450