import type { NotifyOptions, PieChartLegendValueLabelFormatCallback, GuideTooltipFormatCallback, AxisLabelFormatCallback, GaugeInnerLabelFormatCallback } from "@arcgis/charts-components/chart-rendering/common/interfaces.js";Type definitions
PieChartLegendValueLabelFormatCallback
Describes the signature of the callback function used to customize the pie chart legend value labels.
GuideTooltipFormatCallback
Describes the signature of the callback function used to customize a guide's tooltip.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| props | | |
- Returns
- string
AxisLabelFormatCallback
Describes the signature of the callback function used to customize an axis labels.
value: the displayed label.originalValue: provided when thevalueis an alias or coded domain description.
GaugeInnerLabelFormatCallback
Describes the signature of the callback function used to customize a gauge inner label
PreRenderCallback
Describes the signature of the callback function executed before rendering the chart.
The slices property will be only provided for the pie charts.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| props | {
chartConfig: WebChart | WebGaugeChart;
data?: WebChartDataTypes;
slices?: WebChartPieChartSlice[];
} | | |
- Returns
- Promise<WebChart | WebGaugeChart>
ChartOptions
JSON representation of the runtime chart options for the update or initialization.
selectionData
- Type
- SelectionData | undefined
A property representing the selection to apply on the chart.
The properties are considered in the following order:
selectionData.selectionOIDs: an array of object Ids (for Feature Layer) representing a selection to apply to the chart.selectionData.selectionItems: an array of data items representing a selection to apply to the chart.
returnFeaturesExtent
Allows the features extent to be returned, through the arcgisChartsJSDataProcessComplete and arcgisChartsJSSelectionComplete events payload.
Applies only to:
- Charts using an aggregation
- Data source using a feature layer compatible with envelope aggregation
The extent (IExtent) is returned through a property called arcgis_charts_features_extent.
selectionTheme
- Type
- SelectionTheme | undefined
Used to provide a customized theme for the selected and non selected elements. If no style is provided for the selected elements, a default selection is applied. If no style is provided for the non selected elements, the chart's style is applied.
loaderColors
- Type
- LoaderColors | undefined
Used to customize the loader's colors (spinner and curtain).
The loader is displayed when the chart is loading data or when the chart is being updated unless when hideLoaderAnimation is set to true.
replaceNoValueCategoryWithZero
Whether to replace the missing categories from a count aggregation with 0s in the chart's data.
When data is retrieved from the server, the server excludes all features having a count of 0 from the response; hence resulting in missing entries on the charts. When this property is set to true, a process is applied to complete the dataset with 0s for the empty or missing categories, to display them on the chart without gaps.
chartLimits
- Type
- ChartElementLimit | undefined
Used to customize the chart's limits, especially the maximum number of elements (bars, markers...) to be displayed.
The chart's behavior once that limit is reached can be adjusted through the behaviorAfterLimit nested property, to either reject the creation
or update of the chart, or render the elements up to the given limits.
Not applicable for scatterplot and histogram.
actionMode
- Type
- ActionModes | undefined
Set the chart's mode.
zoom: Allows to zoom on the chart. All selection is disabled.mono-selection: The selection is enabled but only one element can be selected. Zoom is disabled.multi-selection: The selection is enabled and allows selecting multiple elements. Zoom is disabled.multi-selection-with-ctrl-key: The selection is enabled and allows selecting multiple elements when the ctrl/cmd key is pressed. Zoom is disabled.none: The zoom and selection features are disabled.
cursorRange
- Type
- CursorRange | undefined
Sets the cursor range.
multi-axes: Allows to draw a free rectanglex-axis: Allows to draw a rectangle bound to the x-axisy-axis: Allows to draw a rectangle bound to the y-axisundefined: Defaults to a preset behavior according to the chart type and action mode
Applies only when the action mode is set to zoom or multi-selection.
runtimeDataFilters
- Type
- WebChartDataFilters | undefined
Used to apply runtime filters to the chart's data while in Feature Layer mode.
ignoreViewExtent
This property will be effective when the component's view is provided or when the layer is set to a FeatureLayerView.
By default the queries made by the chart will consider the view's extent as the unique geometry filter applicable. This implies ignoring any
geometry passed through the config (component.config.dataFilters) or the runtime filters (component.runtimeDataFilters).
Setting this property to false signals the queries to ignore the view's extent, whether an additional geometry filter is provided or not.
ignoreSmoothRenderingLimit
Can be used to disable the default setting that uses debounce functions to handle the visibility of markers (for scatterplots and line charts) that are outside of plotting area when min/max bound changes and/or when zoom action is performed (via chart cursor or scrollbar), to increase performance.
This property will be set when the chart is created and cannot be updated after that.
It's recommended that this property should only be set to true for small datasets.
tooltipFormatter
- Type
- TooltipFormatters | undefined
Used to customize how the tooltips are rendered. The callback function can return an HTML string and the tags will be interpreted properly.
xAxisLabelFormatter
- Type
- AxisLabelFormatCallback | undefined
Used to customize how the x-axis labels are rendered. The callback function can return an HTML string and the tags will be interpreted properly.
yAxisLabelFormatter
- Type
- AxisLabelFormatCallback | undefined
Used to customize how the y-axis labels are rendered. The callback function can return an HTML string and the tags will be interpreted properly. Not applicable to gauge.
secondaryYAxisLabelFormatter
- Type
- AxisLabelFormatCallback | undefined
Used to customize how the secondary y-axis labels are rendered on a dual axis chart. The callback function can return an HTML string and the tags will be interpreted properly. Not applicable to gauge.
chartWillRender
- Type
- PreRenderCallback | undefined
Callback function executed after the data has been processed and before the chart renders. Can be used to alter the config from information extracted from the data for instance. Only applicable to pie chart and gauge.
PieChartLabelFormatCallback
Describes the signature of the callback function used to customize the pie chart data labels and tooltips.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| category | | | |
| value | | | |
| percent | | | |
| originalCategory | | |
- Returns
- string
HistogramLabelFormatCallback
Describes the signature of the callback function used to customize the histogram tooltips.
ScatterplotLabelFormatCallback
Describes the signature of the callback function used to customize the scatterplot tooltips.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| x | | | |
| y | | | |
| sizePolicyValue | | | |
| dataContext | | |
- Returns
- string
BarAndLineDataLabelFormatCallback
Describes the signature of the callback function used to customize the bar and line chart data labels.
GuideTooltipFormatCallbackProps
guideName
- Type
- string
guideIndex
- Type
- number
BarAndLineTooltipFormatCallback
Describes the signature of the callback function used to customize the bar and line chart plot tooltips.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| props | | |
- Returns
- string
BoxPlotTooltipFormatCallback
Describes the signature of the callback function used to customize the box plot tooltips.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| props | | |
- Returns
- string
BarAndLineTooltipFormatCallbackProps
Describes the interface of the object passed to the callback function used to customize the bar and line chart tooltips.
seriesName
- Type
- string
originalXValue
- Type
- WebChartDataItemValue | undefined
BoxPlotTooltipFormatCallbackProps
seriesName
- Type
- string
dataContext
- Type
- WebChartDataItem
originalXValue
- Type
- WebChartDataItemValue | undefined