plotly / plotly.js

Open-source JavaScript charting library behind Plotly and Dash
https://plotly.com/javascript/
MIT License
16.92k stars 1.85k forks source link

enable text selection on plots #5320

Open bharatkrishna opened 3 years ago

bharatkrishna commented 3 years ago

This is with reference to this post on plotly forums and this discussion on this pull request.

The pull request 5165 disabled text selection on plots without giving a way to enable them via configuration. My use case heavily depended on being able to select text from plots. As I've explained in the discussion on the pull request, my app has timestamps on the x-axis which I'd copy-paste into another app when I see abnormalities in the trend.

Hence, please have a way to select text from the plot svg, like how it was prior to pull request 5165 but could be via a config.

alexcjohnson commented 3 years ago

Perhaps the cleanest way to do this would be with a new modebar icon and a new dragmode, that when chosen disables all zooming / panning / selecting and removes the user-select: none CSS - effectively making the plot temporarily static so you can select text, then when you're done you can go back to one of the other dragmodes.

yiftachbeer commented 1 year ago

If I understand correctly, the same decision is what's preventing text in tables from being selected - a type of graph where not being able to select text for copying makes it almost useless.