-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
Hello!
I'm working with the treemap
diagram and I need to update color and text for each node without re-drawing the entire diagram. I only was able to update the color and I'm not sure how to update the text.
This is my CodePen example: https://codepen.io/elv1s42/pen/yLydprX
I've tried both update
and restyle
functions and read the documentation here: https://plot.ly/javascript/plotlyjs-function-reference/#plotlyreact but didn't find the examples of how text can be updated.
var upd = {
marker: {colors: ['white', 'orange', 'green', 'red']},
text: ['t1', 't2', 't3', 't4'] // how to update the text?
};
Plotly.update('myDiv', upd);
//Plotly.restyle('myDiv', upd);
Please help me to resolve the issue.
Thank you.
Metadata
Metadata
Assignees
Labels
No labels