{"action":"created","issue":{"url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2291","repository_url":"https://api.github.com/repos/PhilJay/MPAndroidChart","labels_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2291/labels{/name}","comments_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2291/comments","events_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2291/events","html_url":"https://github.com/PhilJay/MPAndroidChart/issues/2291","id":179034159,"number":2291,"title":"not showing any bar in my group bar?","user":{"login":"tonyshare","id":7498512,"avatar_url":"https://avatars.githubusercontent.com/u/7498512?v=3","gravatar_id":"","url":"https://api.github.com/users/tonyshare","html_url":"https://github.com/tonyshare","followers_url":"https://api.github.com/users/tonyshare/followers","following_url":"https://api.github.com/users/tonyshare/following{/other_user}","gists_url":"https://api.github.com/users/tonyshare/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyshare/subscriptions","organizations_url":"https://api.github.com/users/tonyshare/orgs","repos_url":"https://api.github.com/users/tonyshare/repos","events_url":"https://api.github.com/users/tonyshare/events{/privacy}","received_events_url":"https://api.github.com/users/tonyshare/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-24T15:00:30Z","updated_at":"2016-09-27T11:27:00Z","closed_at":null,"body":"What's wrong with my group bar, it only shows the grid, not showing any bar.\r\n```\r\nList<BarEntry> entriesIncome = new ArrayList<>();\r\n        List<BarEntry> entriesOutlay = new ArrayList<>();\r\n\r\n        DateUtils.initIncomeAndOutlay();\r\n// fill the lists\r\n        for(int i = 0; i < DateUtils.incomes.size(); i++) {\r\n            entriesIncome.add(new BarEntry(i, 12f + i));\r\n            entriesOutlay.add(new BarEntry(i, 18f + i));\r\n//            entriesIncome.add(new BarEntry(i, DateUtils.incomes.get(i)));\r\n//            entriesOutlay.add(new BarEntry(i, DateUtils.outlays.get(i)));\r\n        }\r\n\r\n        BarDataSet set1 = new BarDataSet(entriesIncome, \"收入\");\r\n        set1.setColors(COLORFUL_COLORS);\r\n        BarDataSet set2 = new BarDataSet(entriesOutlay, \"支出\");\r\n        set2.setColors(COLORFUL_COLORS);\r\n\r\n        float groupSpace = 0.06f;\r\n        float barSpace = 0.02f; // x2 dataset\r\n        float barWidth = 3f; // x2 dataset\r\n// (0.02 + 0.45) * 2 + 0.06 = 1.00 -> interval per \"group\"\r\n        ArrayList<IBarDataSet> dataSets = new ArrayList<>();\r\n        dataSets.add(set1);\r\n        dataSets.add(set2);\r\n        BarData data = new BarData(dataSets);\r\n        data.setBarWidth(barWidth); // set the width of each bar\r\n        data.setValueFormatter(new LargeValueFormatter());\r\n        data.setValueTypeface(Typeface.DEFAULT);\r\n\r\n\r\n\r\n        barChart.setData(data);\r\n        barChart.setDrawGridBackground(false);\r\n        barChart.groupBars(1980f, groupSpace, barSpace); // perform the \"explicit\" grouping\r\n        barChart.invalidate(); // refresh\r\n```"},"comment":{"url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/comments/249838325","html_url":"https://github.com/PhilJay/MPAndroidChart/issues/2291#issuecomment-249838325","issue_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/2291","id":249838325,"user":{"login":"interblitz","id":19166985,"avatar_url":"https://avatars.githubusercontent.com/u/19166985?v=3","gravatar_id":"","url":"https://api.github.com/users/interblitz","html_url":"https://github.com/interblitz","followers_url":"https://api.github.com/users/interblitz/followers","following_url":"https://api.github.com/users/interblitz/following{/other_user}","gists_url":"https://api.github.com/users/interblitz/gists{/gist_id}","starred_url":"https://api.github.com/users/interblitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interblitz/subscriptions","organizations_url":"https://api.github.com/users/interblitz/orgs","repos_url":"https://api.github.com/users/interblitz/repos","events_url":"https://api.github.com/users/interblitz/events{/privacy}","received_events_url":"https://api.github.com/users/interblitz/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T11:27:00Z","updated_at":"2016-09-27T11:27:00Z","body":"You put bar entries starting from 0, but group them starting from 1980f. That is the problem, I think.\r\n\r\nfor(int i = **0**; i < DateUtils.incomes.size(); i++) {\r\n            entriesIncome.add(new BarEntry(**i**, 12f + i));\r\n            entriesOutlay.add(new BarEntry(**i**, 18f + i));\r\n        }\r\n\r\nbarChart.groupBars(**1980f**, groupSpace, barSpace); // perform the \"explicit\" grouping\r\n\r\nJust do\r\n\r\nbarChart.groupBars(0,, groupSpace, barSpace); // perform the \"explicit\" grouping"}}
{"actor":{"display_login":"interblitz"}}