Announcing Dash Bio 1.0.0 🎉 : a one-stop-shop for bioinformatics and drug development visualizations.

Modebarbutton toggle - off by default

Hi all,

I can’t really figure it out with the help of the documentation:

is there a way to make a custom modebarbutton to be a toggle with the default value being off? I’d like to indicate visually whether the button is off or on, but no combination of attr, val and toggle let me do that. Best I can get is to get it to become a toggle but with a default being turned on (color of the icon being darker).

modeBarButtonsToAdd: [
        name: 'Toggle Hover Synchronisation',
        icon: mouse,
        click: toggleHover,
        attr: false,
        val: 'off',
        toggle: true,