In plotly.js, I'm trying to disable the animation for a treemap when you click on one of the squares. In my app, there's only one level of parents, so zooming in on a specific square isn't very helpful. I saw a similar question here: https://community.plot.ly/t/sorting-slices-in-sunburst-and-disabling-animations/27558 .
Is there a way I can set this in the trace or configuration instead?
You can disable such interaction in a treemap by falsifying the plotly_treemapclick event.
Plotly.newPlot('graph', [{
type: 'treemap',
labels: ['Root', 'A', 'B', 'a', 'aa', 'b', 'bb'],
parents: ['', 'Root', 'Root', 'A', 'A', 'B', 'B']
}])
.then(gd => {
gd.on('plotly_treemapclick', () => false)
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With