Is it possible to make the plotly legends draggable? Currently I have my legend positioned outside the graph. I want to move it inside the graph, which is covered in the documentation, but I want to be able to make it draggable.
Asked
Active
Viewed 756 times
2 Answers
0
There is no direct way to drag the legend on a Plotly chart as far as I know.
You could find a workround by creating your legend in a HTML canvas and binding the onclick() function for each legend item to the Plotly PostMessage API restyle task.
There's a live example of the PostMessage API here which you should be able to hack apart. Let me know how you get on, this sounds interesting!

Rytchbass
- 406
- 1
- 5
- 11
0
You can set "editable": True
in the plot config.
https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js#L46-L54

bcd
- 346
- 2
- 4