Skip to content
Types
import type { NotifyOptions, PieChartLegendValueLabelFormatCallback, GuideTooltipFormatCallback, AxisLabelFormatCallback, GaugeInnerLabelFormatCallback } from "@arcgis/charts-components/chart-rendering/common/interfaces.js";

Type definitions

NotifyOptions

Type definition

closable

Property
Type
boolean | undefined

PieChartLegendValueLabelFormatCallback

Type definition

Describes the signature of the callback function used to customize the pie chart legend value labels.

Parameters
ParameterTypeDescriptionRequired
value
percent
Returns
string

GuideTooltipFormatCallback

Type definition

Describes the signature of the callback function used to customize a guide's tooltip.

Parameters
ParameterTypeDescriptionRequired
props
Returns
string

AxisLabelFormatCallback

Type definition

Describes the signature of the callback function used to customize an axis labels.

  • value: the displayed label.
  • originalValue: provided when the value is an alias or coded domain description.
Parameters
ParameterTypeDescriptionRequired
value
originalValue
Returns
string

GaugeInnerLabelFormatCallback

Type definition

Describes the signature of the callback function used to customize a gauge inner label

Parameters
ParameterTypeDescriptionRequired
value
Returns
string

PreRenderCallback

Type definition

Describes the signature of the callback function executed before rendering the chart. The slices property will be only provided for the pie charts.

Parameters
ParameterTypeDescriptionRequired
props
{ chartConfig: WebChart | WebGaugeChart; data?: WebChartDataTypes; slices?: WebChartPieChartSlice[]; }
Returns
Promise<WebChart | WebGaugeChart>

ChartOptions

Type definition

JSON representation of the runtime chart options for the update or initialization.

allowUsingObjectIdStat

Property
Type
boolean | undefined

Whether to allow the object id to be used as a statistic other than COUNT.

nullAsValid

Property
Type
boolean | undefined

Whether to consider a null statistic as valid. If set to false and the data has only null values, the chart's dataset will be considered empty:

  • the corresponding warning event will be sent
  • the "no data" message will be displayed (unless showUIMesssages is set to false)

showUIMessages

Property
Type
boolean | undefined

Whether to display or hide all UI messages (e.g. no data warnings, or when the logarithmic scale can't be applied to an axis when the data contains values <= 0).

selectionData

Property
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.

returnSelectionOIDs

Property
Type
boolean | undefined

Indicates if the object ids need to be computed whenever a selection is made on or passed to the chart. Only considered for a data source using a feature layer.

returnSelectionIndexes

Property
Type
boolean | undefined

Indicates if the selection indexes need to be computed whenever a selection is made on or passed to the chart.

returnFeaturesExtent

Property
Type
boolean | undefined

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

Property
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.

view

Property
Type
MapView | SceneView | undefined

Used to perform client-side queries.

layer

Property
Type
FeatureLayerView | SupportedLayer | undefined

Used to perform queries.

filterBySelection

Property
Type
boolean | undefined

Enable filter by selection.

autoRecreateChart

Property
Type
boolean | undefined

Re-initialize chart object if the chart object is disposed. Honored only during the update call. Default is true.

autoInverseDataLabelTextColor

Property
Type
boolean | undefined

Indicates whether to automatically inverse the data label text color when it's too dark or too light.

Note: Currently this feature is only available for stacked bar series and pie charts with dataLabelsInside set to true.

createMessage

Property
Type
string | undefined

Optional create message to be displayed in the chart container.

hideLoaderAnimation

Property
Type
boolean | undefined

Used to hide the loader animation (curtain and spinner), showed by default at every update.

hideEmptySeries

Property
Type
boolean | undefined

Hide the series from the chart if it doesn't have data (i.e. empty). For example, after apply data filters, filter by attribute or geometry (as when using the filter by extent).

loaderColors

Property
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

Property
Type
boolean | undefined

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

Property
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

Property
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

Property
Type
CursorRange | undefined

Sets the cursor range.

  • multi-axes: Allows to draw a free rectangle
  • x-axis: Allows to draw a rectangle bound to the x-axis
  • y-axis: Allows to draw a rectangle bound to the y-axis
  • undefined: 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.

dataUpdated

Property
Type
boolean | undefined

When true, the chart gets a full refresh.

viewExtentUpdated

Property
Type
boolean | undefined

Helps to identify an update triggered after a view extent change. This is used to support a selection workflow while the filter by extent mode is enabled.

runtimeDataFilters

Property
Type
WebChartDataFilters | undefined

Used to apply runtime filters to the chart's data while in Feature Layer mode.

ignoreViewExtent

Property
Type
boolean | undefined

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.

setTimeBinningInfoWhenNotProvided

Property
Type
boolean | undefined

Can be used when creating or updating a chart compatible with time binning.

When true, the series properties unit and size become optional and will be automatically set to values that fit the data set.

ignoreSmoothRenderingLimit

Property
Type
boolean | undefined

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

Property
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.

guideTooltipFormatter

Property
Type
GuideTooltipFormatCallback | undefined

Used to customize how the guides' tooltip are rendered. The callback function can return an HTML string and the tags will be interpreted properly.

xAxisLabelFormatter

Property
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

Property
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

Property
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.

pieChartLegendValueLabelFormatter

Property
Type
PieChartLegendValueLabelFormatCallback | undefined

gaugeInnerLabelFormatter

Property
Type
GaugeInnerLabelFormatCallback | undefined

Used to customize the gauge inner label. The callback function can return an HTML string and the tags will be interpreted properly.

disableTogglingLegendItems

Property
Type
boolean | undefined

Used to disable the toggling of legend items for xy chart series, pie slices, histogram overlays, and scatterplot trend line.

Not applicable to gauge.

chartWillRender

Property
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.

usePopupTemplateFieldsInfo

Property
Type
boolean | undefined

When true read the fields from layer.popupTemplate and use their alias when rendering tooltips.

PieChartLabelFormatCallback

Type definition

Describes the signature of the callback function used to customize the pie chart data labels and tooltips.

Parameters
ParameterTypeDescriptionRequired
category
value
percent
originalCategory
Returns
string

HistogramLabelFormatCallback

Type definition

Describes the signature of the callback function used to customize the histogram tooltips.

Parameters
ParameterTypeDescriptionRequired
count
binMinValue
binMaxValue
Returns
string

ScatterplotLabelFormatCallback

Type definition

Describes the signature of the callback function used to customize the scatterplot tooltips.

Parameters
ParameterTypeDescriptionRequired
x
y
sizePolicyValue
dataContext
Returns
string

BarAndLineDataLabelFormatCallback

Type definition

Describes the signature of the callback function used to customize the bar and line chart data labels.

Parameters
ParameterTypeDescriptionRequired
statValue
percent
Returns
string

GuideTooltipFormatCallbackProps

Type definition

guideName

Property
Type
string

start

Property
Type
Date | number | string

end

Property
Type
Date | number | string | undefined

guideIndex

Property
Type
number

BarAndLineTooltipFormatCallback

Type definition

Describes the signature of the callback function used to customize the bar and line chart plot tooltips.

Parameters
ParameterTypeDescriptionRequired
props
Returns
string

BoxPlotTooltipFormatCallback

Type definition

Describes the signature of the callback function used to customize the box plot tooltips.

Parameters
ParameterTypeDescriptionRequired
props
Returns
string

BarAndLineTooltipFormatCallbackProps

Type definition

Describes the interface of the object passed to the callback function used to customize the bar and line chart tooltips.

seriesName

Property
Type
string

statValue

Property
Type
number | undefined

percentValue

Property
Type
number | undefined

xValue

Property
Type
Date | number | string | undefined

originalXValue

Property
Type
WebChartDataItemValue | undefined

dateBinningRange

Property
Type
[number, number] | undefined

BoxPlotTooltipFormatCallbackProps

Type definition

seriesName

Property
Type
string

dataContext

Property
Type
WebChartDataItem

xValue

Property
Type
Date | number | string | undefined

originalXValue

Property
Type
WebChartDataItemValue | undefined