{"action":"opened","issue":{"url":"https://api.github.com/repos/danielgindi/ios-charts/issues/320","labels_url":"https://api.github.com/repos/danielgindi/ios-charts/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/danielgindi/ios-charts/issues/320/comments","events_url":"https://api.github.com/repos/danielgindi/ios-charts/issues/320/events","html_url":"https://github.com/danielgindi/ios-charts/issues/320","id":103127783,"number":320,"title":"Bug (?) in CandleStickChartRenderer when showing empty dataset among multiple datasets","user":{"login":"krahabb","id":13969600,"avatar_url":"https://avatars.githubusercontent.com/u/13969600?v=3","gravatar_id":"","url":"https://api.github.com/users/krahabb","html_url":"https://github.com/krahabb","followers_url":"https://api.github.com/users/krahabb/followers","following_url":"https://api.github.com/users/krahabb/following{/other_user}","gists_url":"https://api.github.com/users/krahabb/gists{/gist_id}","starred_url":"https://api.github.com/users/krahabb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krahabb/subscriptions","organizations_url":"https://api.github.com/users/krahabb/orgs","repos_url":"https://api.github.com/users/krahabb/repos","events_url":"https://api.github.com/users/krahabb/events{/privacy}","received_events_url":"https://api.github.com/users/krahabb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-25T22:06:22Z","updated_at":"2015-08-25T22:06:22Z","closed_at":null,"body":"When adding multiple datasets to a candlestick chart if one of these is empty the renderer crashes looking for data into the empty dataset. I've patched my version with this check into 'CandleStickChartRenderer.swift' around line 48:\r\n\r\nif (set.isVisible && (set.entryCount != 0))\r\n\r\nsubstitutes\r\nif (set.isVisible)\r\n\r\nalso (I haven't checked because I have labels disabled in my use case)\r\n\r\naround line 200:\r\n\r\nif (!dataSet.isDrawValuesEnabled || (dataSet.entryCount == 0))\r\n\r\nsubstitutes\r\nif (!dataSet.isDrawValuesEnabled)\r\n\r\nI am using candlestick inside a combinedchart but I guess the bug appears by itself in the renderer even when the candlstickchart is used alone (not tested though)"}}