import "@arcgis/charts-components/components/arcgis-charts-action-bar";- Inheritance:
- ArcgisChartsActionBar→
PublicLitElement
- Since
- ArcGIS Maps SDK for JavaScript 4.29
The Charts Action Bar component provides context-specific actions such as rotation, zooming, and filtering, as well as general actions like exporting the chart as an image or CSV file. This component is designed to be used with a chart component and is not intended for standalone use.
Demo
Properties
| Property | Attribute | Type |
|---|---|---|
action-bar-selection-mode | Extract<ActionModes, "monoSelection" | "multiSelection" | "multiSelectionWithCtrlKey"> | undefined | |
| ||
chart-type | ||
clear-selection-state | ||
clear-selection-title | ||
clear-selection-toggle | ||
| ||
edit-chart-state | ||
edit-chart-title | ||
edit-chart-toggle | ||
expanded | ||
export-action-state | ||
export-as-csv-state | ||
export-as-csv-title | ||
export-as-image-state | ||
export-as-image-title | ||
filter-by-extent-state | ||
filter-by-extent-title | ||
filter-by-extent-toggle | ||
filter-by-selection-state | ||
filter-by-selection-title | ||
filter-by-selection-toggle | ||
force-disable-actions | ||
full-extent-state | ||
full-extent-title | ||
full-extent-toggle | ||
| ||
legend-state | ||
legend-title | ||
legend-toggle | ||
| ||
rotate-chart-state | ||
rotate-chart-title | ||
rotate-chart-toggle | ||
selection-state | ||
selection-title | ||
selection-toggle | ||
switch-selection-state | ||
switch-selection-title | ||
switch-selection-toggle | ||
zoom-state | ||
zoom-title | ||
zoom-toggle |
actionBarSelectionMode
- Type
- Extract<ActionModes, "monoSelection" | "multiSelection" | "multiSelectionWithCtrlKey"> | undefined
Defines which selection mode the slotted action bar should use.
monoSelection: Select a single data point/series, new selection replaces the previous one.multiSelection: Select multiple data points/series, new selection adds to the previous one.multiSelectionWithCtrlKey: Select multiple data points/series while holding the Ctrl key (Cmd key on Mac), new selection adds to the previous one.
- Attribute
- action-bar-selection-mode
- Default value
- "multiSelectionWithCtrlKey"
chartElement
- Type
- ArcgisChart | undefined
Chart element reference with which the action bar is associated.
chartType
- Type
- ChartTypes | undefined
Chart type used to determine which default actions to display.
- Attribute
- chart-type
clearSelectionState
- Type
- ActionState
When disabled, interaction with the clear selection action is prevented and the component is displayed with lower opacity.
- Attribute
- clear-selection-state
- Default value
- "enabled"
clearSelectionToggle
- Type
- ActionToggle
When active, the clear selection action is highlighted.
- Attribute
- clear-selection-toggle
- Default value
- "inactive"
disableCSVExportForChartTypes
- Type
- WebChartTypes[]
The CSV export action is disabled for certain chart types.
Modify this property to add or remove chart types from the list of disabled types.
editChartState
- Type
- ActionState
When disabled, interaction with the edit chart action is prevented and the component is displayed with lower opacity.
- Attribute
- edit-chart-state
- Default value
- "disabled"
editChartToggle
- Type
- ActionToggle
When active, the edit chart action is highlighted.
- Attribute
- edit-chart-toggle
- Default value
- "inactive"
expanded
- Type
- boolean
When true, the action bar is expanded.
- Attribute
- expanded
- Default value
- false
exportActionState
- Type
- ActionState
When disabled, interaction with the export action is prevented and the component is displayed with lower opacity.
- Attribute
- export-action-state
- Default value
- "enabled"
exportAsCSVState
- Type
- ActionState
When disabled, interaction with the download CSV is prevented and the component is displayed with lower opacity.
- Attribute
- export-as-csv-state
- Default value
- "enabled"
exportAsImageState
- Type
- ActionState
When disabled, interaction with the download image is prevented and the component is displayed with lower opacity.
- Attribute
- export-as-image-state
- Default value
- "enabled"
filterByExtentState
- Type
- ActionState
When disabled, interaction with the filter by extent action is prevented and the component is displayed with lower opacity.
- Attribute
- filter-by-extent-state
- Default value
- "enabled"
filterByExtentToggle
- Type
- ActionToggle
When active, the filter by extent action is highlighted.
- Attribute
- filter-by-extent-toggle
- Default value
- "inactive"
filterBySelectionState
- Type
- ActionState
When disabled, interaction with the filter by selection action is prevented and the component is displayed with lower opacity.
- Attribute
- filter-by-selection-state
- Default value
- "enabled"
filterBySelectionToggle
- Type
- ActionToggle
When active, the filter by selection action is highlighted.
- Attribute
- filter-by-selection-toggle
- Default value
- "inactive"
forceDisableActions
- Type
- boolean
When true, overrides the individual settings for each action to instead force disable them all.
- Attribute
- force-disable-actions
- Default value
- false
fullExtentState
- Type
- ActionState
When disabled, interaction with the full extent action is prevented and the component is displayed with lower opacity.
- Attribute
- full-extent-state
- Default value
- "enabled"
fullExtentToggle
- Type
- ActionToggle
When active, the full extent action is highlighted.
- Attribute
- full-extent-toggle
- Default value
- "inactive"
hiddenActions
- Type
- DefaultChartActions[]
Holds a list of actions to hide from the action bar.
Note: The edit chart action is hidden by default. To show it, remove its value from this array.
legendState
- Type
- ActionState
When disabled, interaction with the legend action is prevented and the component is displayed with lower opacity.
- Attribute
- legend-state
- Default value
- "enabled"
legendToggle
- Type
- ActionToggle
When active, the legend action is highlighted.
- Attribute
- legend-toggle
- Default value
- "inactive"
rotateChartState
- Type
- ActionState
When disabled, interaction with the rotate chart action is prevented and the component is displayed with lower opacity.
- Attribute
- rotate-chart-state
- Default value
- "enabled"
rotateChartToggle
- Type
- ActionToggle
When active, the rotate chart action is highlighted.
- Attribute
- rotate-chart-toggle
- Default value
- "inactive"
selectionState
- Type
- ActionState
When disabled, interaction with the selection action is prevented and the component is displayed with lower opacity.
- Attribute
- selection-state
- Default value
- "enabled"
selectionToggle
- Type
- ActionToggle
When active, the selection action is highlighted.
- Attribute
- selection-toggle
- Default value
- "inactive"
switchSelectionState
- Type
- ActionState
When disabled, interaction with the switch selection action is prevented and the component is displayed with lower opacity.
- Attribute
- switch-selection-state
- Default value
- "enabled"
switchSelectionToggle
- Type
- ActionToggle
When active, the switch selection action is highlighted.
- Attribute
- switch-selection-toggle
- Default value
- "inactive"
zoomState
- Type
- ActionState
When disabled, interaction with the zoom action is prevented and the component is displayed with lower opacity.
- Attribute
- zoom-state
- Default value
- "enabled"
zoomToggle
- Type
- ActionToggle
When active, the zoom action is highlighted.
- Attribute
- zoom-toggle
- Default value
- "inactive"
Methods
| Method | Signature |
|---|---|
componentOnReady inherited | componentOnReady(): Promise<this> |
componentOnReady
- Signature
-
componentOnReady (): Promise<this>
Creates a promise that resolves once the component is fully loaded.
- Returns
- Promise<this>
Example
const arcgisChartsActionBar = document.querySelector("arcgis-charts-action-bar");document.body.append(arcgisChartsActionBar);await arcgisChartsActionBar.componentOnReady();console.log("arcgis-charts-action-bar is ready to go!");Events
arcgisActionBarToggle
arcgisActionBarToggle: CustomEvent<boolean> Event triggered once action bar expand is toggled.
arcgisDefaultActionSelect
arcgisDefaultActionSelect: CustomEvent<DefaultActionSelectPayload> Event triggered once a default action is selected.
Slots
| Name | Description |
|---|---|
| A slot for adding custom | |
| A slot for adding custom |