Skip to content

Customize icons for modebar buttons (but keep everything else) #4615

@srblum

Description

@srblum

I'd like to customize the icons for the modebar buttons while retaining their functionality.

For example: https://codepen.io/SeanBlum/pen/OJVjwgd

I can imagine two ways of doing this:

  1. Expose the plotly modebar callback functions in plotly.js/src/components/modebar/buttons.js so that we can call them ourselves from the click callback. This approach has a bonus of allowing the developer to add side-effects when a standard modebar button is clicked.

  2. Create a modeBarButtonsToReplace option that allows the user to update specific values of plotly button objects while retaining their other values, as suggested by @etpinard in More modeBarButtons customization options #4036

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions