{"action":"created","issue":{"url":"https://api.github.com/repos/danielgindi/Charts/issues/1212","repository_url":"https://api.github.com/repos/danielgindi/Charts","labels_url":"https://api.github.com/repos/danielgindi/Charts/issues/1212/labels{/name}","comments_url":"https://api.github.com/repos/danielgindi/Charts/issues/1212/comments","events_url":"https://api.github.com/repos/danielgindi/Charts/issues/1212/events","html_url":"https://github.com/danielgindi/Charts/issues/1212","id":163511273,"number":1212,"title":"drawHighlighted() not calling","user":{"login":"Prathame5h","id":20103595,"avatar_url":"https://avatars.githubusercontent.com/u/20103595?v=3","gravatar_id":"","url":"https://api.github.com/users/Prathame5h","html_url":"https://github.com/Prathame5h","followers_url":"https://api.github.com/users/Prathame5h/followers","following_url":"https://api.github.com/users/Prathame5h/following{/other_user}","gists_url":"https://api.github.com/users/Prathame5h/gists{/gist_id}","starred_url":"https://api.github.com/users/Prathame5h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prathame5h/subscriptions","organizations_url":"https://api.github.com/users/Prathame5h/orgs","repos_url":"https://api.github.com/users/Prathame5h/repos","events_url":"https://api.github.com/users/Prathame5h/events{/privacy}","received_events_url":"https://api.github.com/users/Prathame5h/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-02T09:53:02Z","updated_at":"2016-07-04T05:19:29Z","closed_at":"2016-07-04T00:58:37Z","body":"import UIKit\r\nimport Charts\r\n\r\nclass LineChartViewController: UIViewController, ChartViewDelegate {\r\n\r\n    @IBOutlet weak var lineChartView: LineChartView!\r\n    \r\n    @IBOutlet weak var slider: UISlider!\r\n    \r\n    @IBOutlet weak var lblSlider: UILabel!\r\n    \r\n    let markerView = MarkerView(frame: CGRect(x: 0, y: 0, width: 80, height: 60))\r\n    \r\n    var entryValue: String!\r\n    \r\n    override func viewDidLoad() {\r\n        super.viewDidLoad()\r\n        lineChartView.delegate = self\r\n        \r\n        let days = [\"Day 1\", \"Day 2\", \"Day 3\", \"Day 4\", \"Day 5\", \"Day 6\", \"Day 7\", \"Day 8\", \"Day 9\", \"Day 10\", \"Day 11\", \"Day 12\", \"Day 13\", \"Day 14\", \"Day 15\", \"Day 16\", \"Day 17\", \"Day 18\", \"Day 19\", \"Day 20\", \"Day 21\", \"Day 22\", \"Day 23\", \"Day 24\", \"Day 25\", \"Day 26\", \"Day 27\", \"Day 28\", \"Day 29\", \"Day 30\"]\r\n        let unitsSold1 = [850.0, 800, 300, 1200, 800, 900, 1500]\r\n        let unitsSold2 = [400.0, 600, 500, 0, 400, 300, 200]\r\n        let unitsSold3 = [50.0,\t0, 300, 0, 0, 0, 0]\r\n        let unitsSold4 = [200.0, 0,\t0, 300,\t0, 0, 0]\r\n        let unitsSold5 = [2400.0, 1000, 700, 0,\t900, 400, 600]\r\n        \r\n        let rVal1 = unitsSold1[0] + unitsSold2[0] + unitsSold3[0] + unitsSold4[0] + unitsSold5[0]\r\n        let rVal2 = unitsSold1[1] + unitsSold2[1] + unitsSold3[1] + unitsSold4[1] + unitsSold5[1]\r\n        let rVal3 = unitsSold1[2] + unitsSold2[2] + unitsSold3[2] + unitsSold4[2] + unitsSold5[2]\r\n        let rVal4 = unitsSold1[3] + unitsSold2[3] + unitsSold3[3] + unitsSold4[3] + unitsSold5[3]\r\n        let rVal5 = unitsSold1[4] + unitsSold2[4] + unitsSold3[4] + unitsSold4[4] + unitsSold5[4]\r\n        let rVal6 = unitsSold1[5] + unitsSold2[5] + unitsSold3[5] + unitsSold4[5] + unitsSold5[5]\r\n        let rVal7 = unitsSold1[6] + unitsSold2[6] + unitsSold3[6] + unitsSold4[6] + unitsSold5[6]\r\n        \r\n        print(\"rVal1::\\(rVal1)\")\r\n        print(\"rVal2::\\(rVal2)\")\r\n        print(\"rVal3::\\(rVal3)\")\r\n        print(\"rVal4::\\(rVal4)\")\r\n        print(\"rVal5::\\(rVal5)\")\r\n        print(\"rVal6::\\(rVal6)\")\r\n        print(\"rVal7::\\(rVal7)\")\r\n        \r\n        let unitsSold6 = [rVal1,rVal2,rVal3,rVal4,rVal5,rVal6,rVal7,rVal1,rVal2,rVal3,rVal4,rVal5,rVal6,rVal7,rVal1,rVal2,rVal3,rVal4,rVal5,rVal6,rVal7,rVal1,rVal2,rVal3,rVal4,rVal5,rVal6,rVal7,rVal1,rVal2]\r\n        \r\n        setLineChartData(days, values: unitsSold6)\r\n        \r\n        slider.minimumValue = 1\r\n        slider.maximumValue = 30\r\n        \r\n    }\r\n\r\n    func setLineChartData(dataPoints: [String], values: [Double]) {\r\n \r\n        var dataEntries: [ChartDataEntry] = []\r\n \r\n        for i in 0..<dataPoints.count {\r\n \r\n            let dataEntry = ChartDataEntry(value: values[i], xIndex: i)\r\n            dataEntries.append(dataEntry)\r\n        }\r\n \r\n        let lineChartDataSet = LineChartDataSet(yVals: dataEntries, label: \"Total Sales\")\r\n        lineChartDataSet.setColor(UIColor.greenColor().colorWithAlphaComponent(0.5))\r\n        lineChartDataSet.setCircleColor(UIColor.greenColor())\r\n        lineChartDataSet.lineWidth = 2.0\r\n        lineChartDataSet.circleRadius = 2.5\r\n        lineChartDataSet.fillAlpha = 65 / 255.0        \r\n        let lineChartData = LineChartData(xVals: dataPoints, dataSet: lineChartDataSet)\r\n        lineChartView.data = lineChartData \r\n        lineChartView.rightAxis.enabled = false\r\n        lineChartView.xAxis.enabled = false\r\n        lineChartView.descriptionText = \"\"\r\n        lineChartView.drawMarkers = true\r\n        \r\n    }\r\n\r\n\r\n    @IBAction func sliderValueChanged(sender: UISlider) {\r\n       \r\n        let currentValue = Int(sender.value)\r\n        lblSlider.text = \"Day \\(currentValue)\"\r\n        print(\"slidervalue::\\(lblSlider.text)\")\r\n    }\r\n    \r\n    override func didReceiveMemoryWarning() {\r\n        super.didReceiveMemoryWarning()\r\n        // Dispose of any resources that can be recreated.\r\n    }\r\n    \r\n    func chartValueSelected(chartView: ChartViewBase, entry: ChartDataEntry, dataSetIndex: Int, highlight: ChartHighlight) {\r\n        print(\"ChartValueSelected\")  \r\n    }\r\n\r\n}\r\n\r\nError:-fatal error: drawHighlighted() cannot be called on ChartDataRendererBase: file /Users/MyMac/Documents/MyChart-Demo/Pods/Charts/Charts/Classes/Renderers/ChartDataRendererBase.swift, line 48"},"comment":{"url":"https://api.github.com/repos/danielgindi/Charts/issues/comments/230206905","html_url":"https://github.com/danielgindi/Charts/issues/1212#issuecomment-230206905","issue_url":"https://api.github.com/repos/danielgindi/Charts/issues/1212","id":230206905,"user":{"login":"Prathame5h","id":20103595,"avatar_url":"https://avatars.githubusercontent.com/u/20103595?v=3","gravatar_id":"","url":"https://api.github.com/users/Prathame5h","html_url":"https://github.com/Prathame5h","followers_url":"https://api.github.com/users/Prathame5h/followers","following_url":"https://api.github.com/users/Prathame5h/following{/other_user}","gists_url":"https://api.github.com/users/Prathame5h/gists{/gist_id}","starred_url":"https://api.github.com/users/Prathame5h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prathame5h/subscriptions","organizations_url":"https://api.github.com/users/Prathame5h/orgs","repos_url":"https://api.github.com/users/Prathame5h/repos","events_url":"https://api.github.com/users/Prathame5h/events{/privacy}","received_events_url":"https://api.github.com/users/Prathame5h/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T05:19:29Z","updated_at":"2016-07-04T05:19:29Z","body":"when i am touching at any filled circle it is going to crash and gives following error\r\nError:-fatal error: drawHighlighted() cannot be called on ChartDataRendererBase: file /Users/MyMac/Documents/MyChart-Demo/Pods/Charts/Charts/Classes/Renderers/ChartDataRendererBase.swift, line 48\r\n\r\n![screen shot 2016-07-04 at 10 47 09 am](https://cloud.githubusercontent.com/assets/20103595/16551318/d42e5e64-41d4-11e6-95f2-fe7752c82a4d.png)"}}
{"actor":{"display_login":"Prathame5h"}}