Search code examples
vega-litevega

How to hide the action button in Vega


I use vega-react and I would like to know the easiest way not to display the "Actions" button on the chart.

enter image description here

if I declare all actions to be false it will not display any actions but the button will still be present.

<Vega spec={spec as VisualizationSpec} data={barData} actions={{
                   export: false,
                   source: false,
                   compiled: false,
                   editor: false,
               }}  />

Solution

  • As mentioned in the vega-embed documentation, the actions setting can either be an object or a Boolean, and relevant to your question:

    If the value is true, all action links will be shown and none if the value is false

    So I believe what you want is actions=false