Plot modebar buttons, list of names, service info :-)

As an Anvil/Python rookie, I feel compelled to first apologise if this is already easily available info… Anyway, the buttons in a plot’s ‘modebar’ can, of course, be controlled through the ‘modeBarButtonsToRemove’ keyword in the plot’s config dict (e.g., self.plot_1.config = {"modeBarButtonsToRemove": list_of_button_names}). So far, so good. However, I struggled a bit to get the correct names for all the buttons shown by default (so that I could control removal) - but finally dug it out from Plotly’s Github repo.
Here it is:
list_of_button_names = [‘zoom2d’, ‘select2d’, ‘lasso2d’, ‘resetScale2d’, ‘toggleSpikelines’, ‘hoverClosestCartesian’, ‘hoverCompareCartesian’]

Just wanted to share :blush:

7 Likes

Welcome to the wonderful world of Plotly. As powerful as Plotly is, sometimes obvious things aren’t obvious and you spend hours digging into it.

Luckily Ive found Anvil to be much easier. Thank you for sharing.