{"action":"closed","issue":{"url":"https://api.github.com/repos/danielgindi/Charts/issues/737","repository_url":"https://api.github.com/repos/danielgindi/Charts","labels_url":"https://api.github.com/repos/danielgindi/Charts/issues/737/labels{/name}","comments_url":"https://api.github.com/repos/danielgindi/Charts/issues/737/comments","events_url":"https://api.github.com/repos/danielgindi/Charts/issues/737/events","html_url":"https://github.com/danielgindi/Charts/issues/737","id":131287686,"number":737,"title":"ChartMaker work wrong in a Combined Chart","user":{"login":"AidenWK","id":9332833,"avatar_url":"https://avatars.githubusercontent.com/u/9332833?v=3","gravatar_id":"","url":"https://api.github.com/users/AidenWK","html_url":"https://github.com/AidenWK","followers_url":"https://api.github.com/users/AidenWK/followers","following_url":"https://api.github.com/users/AidenWK/following{/other_user}","gists_url":"https://api.github.com/users/AidenWK/gists{/gist_id}","starred_url":"https://api.github.com/users/AidenWK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AidenWK/subscriptions","organizations_url":"https://api.github.com/users/AidenWK/orgs","repos_url":"https://api.github.com/users/AidenWK/repos","events_url":"https://api.github.com/users/AidenWK/events{/privacy}","received_events_url":"https://api.github.com/users/AidenWK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/danielgindi/Charts/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/danielgindi/Charts/labels/%E2%98%85%E2%98%85%E2%98%85","name":"★★★","color":"fff200"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-02-04T09:21:20Z","updated_at":"2016-08-10T20:13:50Z","closed_at":"2016-08-10T20:13:50Z","body":"###  Summary:\r\nChartMaker work wrong in a Combined Chart. \r\nCombinedChartData got a line data , a bar data, the line data highlightEnabled  is NO , the bar data highlightEnabled is YES,  then set a ChartMaker to Combined Chart. The maker is always reveal the line data value, even the bar data is selected in this situation.\r\n\r\n### Expected Results:\r\n The maker is reveal the line data value when the line data selected(highlighted),\r\nreveal the bar data value when the bar data selected(highlighted).\r\n\r\n### Steps to Reproduce:\r\nIn the example project, ChartDemo\r\n\r\n1) In the CombinedChartViewController  add code in func viewDidLoad\r\n ``BalloonMarker *marker = [[BalloonMarker alloc] initWithColor:[UIColor colorWithWhite:180/255. alpha:1.0] font:[UIFont systemFontOfSize:12.0] insets: UIEdgeInsetsMake(8.0, 8.0, 20.0, 8.0)];\r\n    marker.minimumSize = CGSizeMake(80.f, 40.f);\r\n    _chartView.marker = marker;``\r\n2)  add code in func -(LineChartData *)generateLineData\r\n``set.highlightEnabled = NO;``\r\n3) add code in func -(BarChartData *)generateBarData\r\n``set.highlightEnabled = YES;``\r\n4) build and run\r\n\r\n### Bug in Code\r\nwhen I debug for this, I found the call stack :\r\ntapGestureRecognized in BarLineChartViewBase.swift ->\r\n``getHighlightByTouchPoint`` in  BarLineChartViewBase.swift ->\r\n``getHighlight`` in ChartHighlighter.swift ->\r\n``getDataSetIndex`` in ChartHighlighter.swift ->\r\n\r\ni think  there is some wrong in code below\r\n\r\n``let dataSetIndex = ChartUtils.closestDataSetIndex(valsAtIndex, value: y, axis: axis)``\r\nif a chart not a combine chart , this func result  dataSetIndex is right , but In a Combined Chart , dataSetIndex  is wrong ,  \r\n\r\ncan anybody recheck this\r\n\r\nps:  in my Objective-c project, debug swift is so difficult , any good skills?\r\n\r\n\r\n \r\n\r\n\r\n \r\n \r\n\r\n "}}
{"actor":{"display_login":"danielgindi"}}