import "@arcgis/charts-components/components/arcgis-charts-action-bar";The ArcGIS Charts Action Bar component enhances chart functionality by providing 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.
See also:
Demo
Properties
| Property | Attribute | Type |
|---|---|---|
actionBarSelectionModereflected | action-bar-selection-mode | "monoSelection" | "multiSelection" | "multiSelectionWithCtrlKey" |
chartElement | | HTMLArcgisChartElement |
chartTypereflected | chart-type | "barSeries" | "boxPlotSeries" | "comboLineAndBarSeries" | "gaugeSeries" | "heatSeries" | "histogramSeries" | "lineSeries" | "pieSeries" | "radarSeries" | "scatterSeries" |
clearSelectionStatereflected | clear-selection-state | "disabled" | "enabled" |
clearSelectionTitlereflected | clear-selection-title | string |
clearSelectionTogglereflected | clear-selection-toggle | "active" | "inactive" |
disableCSVExportForChartTypesreflected | | Array<"number" | "chart" | "chartText" | "chartOverlay" | "chartOverlays" | "chartLegend" | "cursorCrosshair" | "chartAxis" | "gaugeAxisTick" | "gaugeNeedle" | "category" | "date" | "chartGuide" | "scatterSeries" | "pieSeries" | "pieTick" | "gaugeSeries" | "lineSeries" | "barSeries" | "histogramSeries" | "boxPlotSeries" | "radarSeries" | "comboLineAndBarSeries" | "heatSeries" | "buffer" | "sizeScale" | "calendarDateParts"> |
editChartStatereflected | edit-chart-state | "disabled" | "enabled" |
editChartTitlereflected | edit-chart-title | string |
editChartTogglereflected | edit-chart-toggle | "active" | "inactive" |
expandedreflected | expanded | boolean |
exportActionStatereflected | export-action-state | "disabled" | "enabled" |
exportAsCSVStatereflected | export-as-csv-state | "disabled" | "enabled" |
exportAsCSVTitlereflected | export-as-csv-title | string |
exportAsImageStatereflected | export-as-image-state | "disabled" | "enabled" |
exportAsImageTitlereflected | export-as-image-title | string |
filterByExtentStatereflected | filter-by-extent-state | "disabled" | "enabled" |
filterByExtentTitlereflected | filter-by-extent-title | string |
filterByExtentTogglereflected | filter-by-extent-toggle | "active" | "inactive" |
filterBySelectionStatereflected | filter-by-selection-state | "disabled" | "enabled" |
filterBySelectionTitlereflected | filter-by-selection-title | string |
filterBySelectionTogglereflected | filter-by-selection-toggle | "active" | "inactive" |
forceDisableActionsreflected | force-disable-actions | boolean |
fullExtentStatereflected | full-extent-state | "disabled" | "enabled" |
fullExtentTitlereflected | full-extent-title | string |
fullExtentTogglereflected | full-extent-toggle | "active" | "inactive" |
hiddenActions | | Array<"legend" | "zoom" | "editChart" | "fullExtent" | "filterBySelection" | "filterByExtent" | "rotateChart" | "selection" | "clearSelection" | "switchSelection" | "exportAsImage" | "exportAsCSV"> |
legendStatereflected | legend-state | "disabled" | "enabled" |
legendTitlereflected | legend-title | string |
legendTogglereflected | legend-toggle | "active" | "inactive" |
messageOverrides | | Record<string, unknown> |
rotateChartStatereflected | rotate-chart-state | "disabled" | "enabled" |
rotateChartTitlereflected | rotate-chart-title | string |
rotateChartTogglereflected | rotate-chart-toggle | "active" | "inactive" |
selectionStatereflected | selection-state | "disabled" | "enabled" |
selectionTitlereflected | selection-title | string |
selectionTogglereflected | selection-toggle | "active" | "inactive" |
switchSelectionStatereflected | switch-selection-state | "disabled" | "enabled" |
switchSelectionTitlereflected | switch-selection-title | string |
switchSelectionTogglereflected | switch-selection-toggle | "active" | "inactive" |
zoomStatereflected | zoom-state | "disabled" | "enabled" |
zoomTitlereflected | zoom-title | string |
zoomTogglereflected | zoom-toggle | "active" | "inactive" |
actionBarSelectionMode
actionBarSelectionMode: "monoSelection" | "multiSelection" | "multiSelectionWithCtrlKey"Action bar selection mode. Defines which selection mode the slotted action bar should use.
- Attribute
- action-bar-selection-mode
- Default value
- "multiSelectionWithCtrlKey"
chartElement
chartElement: HTMLArcgisChartElementChart element reference with which the action bar is associated.
- Default value
- undefined
chartType
chartType: "barSeries" | "boxPlotSeries" | "comboLineAndBarSeries" | "gaugeSeries" | "heatSeries" | "histogramSeries" | "lineSeries" | "pieSeries" | "radarSeries" | "scatterSeries"Chart type used to determine which default actions to display.
- Attribute
- chart-type
- Default value
- undefined
clearSelectionState
clearSelectionState: "disabled" | "enabled"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"
clearSelectionTitle
clearSelectionTitle: stringCustom title for the clear selection action.
- Attribute
- clear-selection-title
- Default value
- undefined
clearSelectionToggle
clearSelectionToggle: "active" | "inactive"When active, the clear selection action is highlighted.
- Attribute
- clear-selection-toggle
- Default value
- "inactive"
disableCSVExportForChartTypes
disableCSVExportForChartTypes: Array<"number" | "chart" | "chartText" | "chartOverlay" | "chartOverlays" | "chartLegend" | "cursorCrosshair" | "chartAxis" | "gaugeAxisTick" | "gaugeNeedle" | "category" | "date" | "chartGuide" | "scatterSeries" | "pieSeries" | "pieTick" | "gaugeSeries" | "lineSeries" | "barSeries" | "histogramSeries" | "boxPlotSeries" | "radarSeries" | "comboLineAndBarSeries" | "heatSeries" | "buffer" | "sizeScale" | "calendarDateParts">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.
- Default value
- [WebChartTypes.ScatterSeries, WebChartTypes.BoxPlotSeries]
editChartState
editChartState: "disabled" | "enabled"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"
editChartTitle
editChartTitle: stringCustom title for the edit chart action.
- Attribute
- edit-chart-title
- Default value
- undefined
editChartToggle
editChartToggle: "active" | "inactive"When active, the edit chart action is highlighted.
- Attribute
- edit-chart-toggle
- Default value
- "inactive"
expanded
expanded: booleanWhen true, the action bar is expanded.
- Attribute
- expanded
- Default value
- false
exportActionState
exportActionState: "disabled" | "enabled"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
exportAsCSVState: "disabled" | "enabled"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"
exportAsCSVTitle
exportAsCSVTitle: stringCustom title for the download CSV action.
- Attribute
- export-as-csv-title
- Default value
- undefined
exportAsImageState
exportAsImageState: "disabled" | "enabled"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"
exportAsImageTitle
exportAsImageTitle: stringCustom title for the download chart action.
- Attribute
- export-as-image-title
- Default value
- undefined
filterByExtentState
filterByExtentState: "disabled" | "enabled"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"
filterByExtentTitle
filterByExtentTitle: stringCustom title for the filter by extent action.
- Attribute
- filter-by-extent-title
- Default value
- undefined
filterByExtentToggle
filterByExtentToggle: "active" | "inactive"When active, the filter by extent action is highlighted.
- Attribute
- filter-by-extent-toggle
- Default value
- "inactive"
filterBySelectionState
filterBySelectionState: "disabled" | "enabled"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"
filterBySelectionTitle
filterBySelectionTitle: stringCustom title for the filter by selection action.
- Attribute
- filter-by-selection-title
- Default value
- undefined
filterBySelectionToggle
filterBySelectionToggle: "active" | "inactive"When active, the filter by selection action is highlighted.
- Attribute
- filter-by-selection-toggle
- Default value
- "inactive"
forceDisableActions
forceDisableActions: booleanWhen true, overrides the individual settings for each action to instead force disable them all.
- Attribute
- force-disable-actions
- Default value
- false
fullExtentState
fullExtentState: "disabled" | "enabled"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"
fullExtentTitle
fullExtentTitle: stringCustom title for the full extent action.
- Attribute
- full-extent-title
- Default value
- undefined
fullExtentToggle
fullExtentToggle: "active" | "inactive"When active, the full extent action is highlighted.
- Attribute
- full-extent-toggle
- Default value
- "inactive"
hiddenActions
hiddenActions: Array<"legend" | "zoom" | "editChart" | "fullExtent" | "filterBySelection" | "filterByExtent" | "rotateChart" | "selection" | "clearSelection" | "switchSelection" | "exportAsImage" | "exportAsCSV">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.
- Default value
- ["editChart"]
legendState
legendState: "disabled" | "enabled"When disabled, interaction with the legend action is prevented and the component is displayed with lower opacity.
- Attribute
- legend-state
- Default value
- "enabled"
legendTitle
legendTitle: stringCustom title for the legend action.
- Attribute
- legend-title
- Default value
- undefined
legendToggle
legendToggle: "active" | "inactive"When active, the legend action is highlighted.
- Attribute
- legend-toggle
- Default value
- "inactive"
messageOverrides
messageOverrides: Record<string, unknown>Overwrite localized strings for this component
rotateChartState
rotateChartState: "disabled" | "enabled"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"
rotateChartTitle
rotateChartTitle: stringCustom title for the rotate chart action.
- Attribute
- rotate-chart-title
- Default value
- undefined
rotateChartToggle
rotateChartToggle: "active" | "inactive"When active, the rotate chart action is highlighted.
- Attribute
- rotate-chart-toggle
- Default value
- "inactive"
selectionState
selectionState: "disabled" | "enabled"When disabled, interaction with the selection action is prevented and the component is displayed with lower opacity.
- Attribute
- selection-state
- Default value
- "enabled"
selectionTitle
selectionTitle: stringCustom title for the selection action.
- Attribute
- selection-title
- Default value
- undefined
selectionToggle
selectionToggle: "active" | "inactive"When active, the selection action is highlighted.
- Attribute
- selection-toggle
- Default value
- "inactive"
switchSelectionState
switchSelectionState: "disabled" | "enabled"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"
switchSelectionTitle
switchSelectionTitle: stringCustom title for the switch selection action.
- Attribute
- switch-selection-title
- Default value
- undefined
switchSelectionToggle
switchSelectionToggle: "active" | "inactive"When active, the switch selection action is highlighted.
- Attribute
- switch-selection-toggle
- Default value
- "inactive"
zoomState
zoomState: "disabled" | "enabled"When disabled, interaction with the zoom action is prevented and the component is displayed with lower opacity.
- Attribute
- zoom-state
- Default value
- "enabled"
zoomTitle
zoomTitle: stringCustom title for the zoom action.
- Attribute
- zoom-title
- Default value
- undefined
zoomToggle
zoomToggle: "active" | "inactive"When active, the zoom action is highlighted.
- Attribute
- zoom-toggle
- Default value
- "inactive"
Methods
| Method | Signature |
|---|---|
componentOnReady | componentOnReady(): Promise<void> |
componentOnReady
componentOnReady(): Promise<void>Create a promise that resolves once component is fully loaded.
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!");- Returns
- Promise<void>
Events
| Event | Type |
|---|---|
arcgisActionBarToggle | CustomEvent<boolean> |
arcgisDefaultActionSelect | CustomEvent<{
actionId: DefaultChartActions;
actionActive: boolean;
}> |
arcgisActionBarToggle
arcgisActionBarToggle: CustomEvent<boolean>Event triggered once action bar expand is toggled
arcgisDefaultActionSelect
arcgisDefaultActionSelect: CustomEvent<{
actionId: DefaultChartActions;
actionActive: boolean;
}>Event triggered once a default action is selected
Slots
| Name | Description |
|---|---|
custom-action-top | A slot for adding custom |
custom-action-below | A slot for adding custom |