Customize modebar of python plotly plot inside Dash App

So I want to show a limited set of buttons in the modebar of a plotly plot rendered in Dash (for example, show all options excluding the lasso and pan options). I found this solution however according to this page the show method does not work when the plot is in a Dash page. Is there some way to remove modebar buttons when the plot is in a Dash application?

Lol as soon as I posted it, I figured it out. Passed config = {'modeBarButtonsToRemove':[List, of, Buttons, to, Remove]} to dcc.Graph :

graph = dcc.Graph(
                id = "plot_metric",
                style = {"height"  : "40rem"},
                figure = figure,
                config = {'modeBarButtonsToRemove': ['toggleSpikelines', "pan2d", "select2d", "lasso2d"]}
            )
three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online