Constructor
new PlotlyCustomModeBar(graphDiv, dataopt, layoutopt, configopt)
Create a custom plotly mode bar.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
graphDiv |
HTMLElement | Plotly graphDiv configuration. | ||
data |
Array |
<optional> |
[] | Plotly data configuration. |
layout |
Object |
<optional> |
{} | Plotly layout configuration. |
config |
Object |
<optional> |
{} | Plotly config configuration. |
Methods
applyButtonOrder(defaultButtonOrder)
Set the order in which the buttons appear in Plotly's mode bar.
Parameters:
Name | Type | Description |
---|---|---|
defaultButtonOrder |
Array | List containing the sorted button names. |
insertCustomButton()
Replace the names of the custom buttons with the button object. Thus, the names of custom button can be used in the plotly configuration instead of the button object.
isButtonRequested(buttonName) → {Boolean}
Check if a button is configured to be visible in plotly's mode bar.
Parameters:
Name | Type | Description |
---|---|---|
buttonName |
String | Name of the button. |
Returns:
Status.
- Type
- Boolean
registerCustomButtons(buttonList)
Register custom buttons by providing their plotly button configuration.
Parameters:
Name | Type | Description |
---|---|---|
buttonList |
Array | Containing plotly's button objects. |