Hi highchart team
I am using Swift 5 and Highchart 10.3.3
On click of drill down event, I want to update the y-axis data type as dynamic data types like currency, percentage, string and numeric etc
In one chart there is a nested drill-down chart available
example expectation - the first chart with y-axis formatted percentage has a drill-down chart on click of drill down chart second chart appears. in that second chart, I want y axis datatype will be a dollar, there is a second drill-down chart available click the second drill-down chart the third chart will appear with another data type like numeric .it will go up to n number of inner charts and drill-down charts.
what i am getting from the below code - every y axis data fromatter is same
var chartDataDictionary: [String: Any] = [:]
this is my parent chart array of dictionary dictionary
var drillDownSeries: [String: Any] = [:]
this is drill down chart series dictionary
if drillDownSeries.keys.count > 0, let jsonData = try? JSONSerialization.data(withJSONObject: drillDownSeries, options: []),
let jsonString = String(data: jsonData, encoding: .utf8) {
let escapedSingleQuoteString = jsonString.replacingOccurrences(of: "\'", with: "`")
let drillDownJsonString = escapedSingleQuoteString.replacingOccurrences(of: "\"", with: "'")
let jsfunction = " function(e) { if (!e.seriesOptions) { var chart = this, drilldowns = \(drillDownJsonString); e.point.drilldownTo.forEach(function (d) { chart.addSingleSeriesAsDrilldown(e.point, drilldowns[d]); }); chart.applyDrilldown(); } }"
chartDataDictionary.setValue(value: HIFunction(jsFunction: jsfunction), forKeyPath: "chart.events.drilldown")
}
chartDataDictionary.setValue(value: 0, forKeyPath: "plotOptions.series.animation.duration")
thanks in advance