Custom toolBarBox

Im trying to modify the toolbar so it only shows the save tool. I want other tools enabled, just not displayed on the chart.

I tried creating a custom toolBarBox, but I could not figure out how to add it to my plot. eg:

toolBarBox = ToolbarBox()
toolBarBox.toolbar = Toolbar(tools=[SaveTool()])
toolBarBox.toolbar_location = "left"
p.add_layout(toolBarBox) #this line does not work

And tips/direction would be much appreciated!

Hi @mmcguffi ToolbarBox is not really useful as a user-facing component, it’s an implementation detail that leaked though. Ideally, it will go away at some point in the future.

There’s not currently any direct way to selectively show or hide toolbar icons. If you are embedding in your own template, you could manually target CSS. It seems like a reasonable feature to support in the API though, so feel free to open a feature request issue.

1 Like