highcharts / highcharts-ios

iOS wrapper for Highcharts.
Other
127 stars 39 forks source link

On click of Column Chart each bar i need to navigate to the new screen, how can i manage it in Swift #334

Closed ruchiKumar14 closed 4 years ago

ruchiKumar14 commented 4 years ago

Please help me with it , i have tried the below code on HIColumn

let column = HIColumn() column.point = HIPoint()
column.point.events = HIEvents() column.point.events.legendItemClick = HIFunction(jsFunction: "function() { return true; }") let functionToClick = HIFunction(closure: { (context) in print("Point tapped") guard let context = context else {return} let storyboard = UIStoryboard(name: POST_LOGIN, bundle: nil) let ctrl = storyboard.instantiateViewController(withIdentifier: String(describing: DashboardCtrl.self)) as? DashboardCtrl
self.navigationController?.pushViewController(ctrl!, animated: true)
print(context.getProperty("point.y") as Any)}, properties: ["point.y"]) column.point.events.click = functionToClick

but nothing is happening it is not navigating on the screen, atleast it should print the text which i have written in the code, but no luck. Can you please help me with it if there is something wrong in the code or some other code need to be manage for this.

ihnatmoisieiev commented 4 years ago

Hello @ruchiKumar14, please try to change point.y to this.point.y.

ihnatmoisieiev commented 4 years ago

Closing due to inactivity.