{"action":"created","issue":{"url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2450","repository_url":"https://api.github.com/repos/PhilJay/MPAndroidChart","labels_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2450/labels{/name}","comments_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2450/comments","events_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2450/events","html_url":"https://github.com/PhilJay/MPAndroidChart/issues/2450","id":188228745,"number":2450,"title":"Invalid index 0, size is 0 in lineChart","user":{"login":"MaAnQing","id":6247142,"avatar_url":"https://avatars2.githubusercontent.com/u/6247142?v=4","gravatar_id":"","url":"https://api.github.com/users/MaAnQing","html_url":"https://github.com/MaAnQing","followers_url":"https://api.github.com/users/MaAnQing/followers","following_url":"https://api.github.com/users/MaAnQing/following{/other_user}","gists_url":"https://api.github.com/users/MaAnQing/gists{/gist_id}","starred_url":"https://api.github.com/users/MaAnQing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaAnQing/subscriptions","organizations_url":"https://api.github.com/users/MaAnQing/orgs","repos_url":"https://api.github.com/users/MaAnQing/repos","events_url":"https://api.github.com/users/MaAnQing/events{/privacy}","received_events_url":"https://api.github.com/users/MaAnQing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-11-09T11:49:05Z","updated_at":"2017-08-08T08:09:04Z","closed_at":null,"body":"in the first, I add an empty chart data ,then\r\n\r\n    java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0\r\n    11-09 19:34:42.397 E/AndroidRuntime( 5201): \tat             java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)\r\n    11-09 19:34:42.397 E/AndroidRuntime( 5201): \tat java.util.ArrayList.get(ArrayList.java:308)\r\n    11-09 19:34:42.397 E/AndroidRuntime( 5201): \tat com.github.mikephil.charting.data.DataSet.getEntryForIndex(DataSet.java:286)\r\n    11-09 19:34:42.397 E/AndroidRuntime( 5201): \tat com.github.mikephil.charting.utils.Transformer.generateTransformedValuesLine(Transformer.java:184)\r\n    11-09 19:34:42.397 E/AndroidRuntime( 5201): \tat com.github.mikephil.charting.renderer.LineChartRenderer.drawValues(LineChartRenderer.java:545)\r\n    11-09 19:34:42.397 E/AndroidRuntime( 5201): \tat com.github.mikephil.charting.charts.BarLineChartBase.onDraw(BarLineChartBase.java:251)\r\n\r\nI think it is because of you dont check size when you draw values"},"comment":{"url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/comments/320883684","html_url":"https://github.com/PhilJay/MPAndroidChart/issues/2450#issuecomment-320883684","issue_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2450","id":320883684,"user":{"login":"animalecs","id":5632421,"avatar_url":"https://avatars2.githubusercontent.com/u/5632421?v=4","gravatar_id":"","url":"https://api.github.com/users/animalecs","html_url":"https://github.com/animalecs","followers_url":"https://api.github.com/users/animalecs/followers","following_url":"https://api.github.com/users/animalecs/following{/other_user}","gists_url":"https://api.github.com/users/animalecs/gists{/gist_id}","starred_url":"https://api.github.com/users/animalecs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/animalecs/subscriptions","organizations_url":"https://api.github.com/users/animalecs/orgs","repos_url":"https://api.github.com/users/animalecs/repos","events_url":"https://api.github.com/users/animalecs/events{/privacy}","received_events_url":"https://api.github.com/users/animalecs/received_events","type":"User","site_admin":false},"created_at":"2017-08-08T08:09:04Z","updated_at":"2017-08-08T08:09:04Z","body":"Are there any workarounds for this problem?\r\nI'm facing this bug even if I check that the list passed to the chart is not null and with at least one element.\r\nI also upgraded from version 3.0.1 to version 3.0.2 but it seems that nothing has changed."}}
{"actor":{"display_login":"animalecs"}}