Closed jobinsjohn closed 1 year ago
Hello @jobinsjohn, please try the following demo:
chartView.plugins = ["sunburst"]
let options = HIOptions()
let sunburst = HISunburst()
sunburst.allowTraversingTree = true
let dataA = HIData()
dataA.name = "A"
dataA.id = "a"
let dataB = HIData()
dataB.name = "B"
dataB.id = "b"
let dataA1 = HIData()
dataA1.name = "A1"
dataA1.parent = "a"
dataA1.value = 1
let dataA2 = HIData()
dataA2.name = "A2"
dataA2.parent = "a"
dataA2.value = 2
let dataA3 = HIData()
dataA3.name = "A3"
dataA3.parent = "a"
dataA3.value = 3
let dataB1 = HIData()
dataB1.name = "B1"
dataB1.parent = "b"
dataB1.value = 1
let dataB2 = HIData()
dataB2.name = "B2"
dataB2.parent = "b"
dataB2.value = 2
sunburst.data = [
dataA, dataB, dataA1, dataA2, dataA3, dataB1, dataB2
]
options.series = [sunburst]
I am trying to implement a sunburst chart and it has 3 levels. When i try to tap on the middle level, a drill down should happen and that is the usual behavior. But that is not happening. The code that I am using is as follows.