Types
import type { HistogramState, BarCreatedFunction, DataLineCreatedFunction, DataLineInfos } from "@arcgis/core/widgets/Histogram/types.js";

Type definitions

HistogramState

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"disabled" | "ready"

BarCreatedFunction

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Function used to style or attach custom interaction to histogram bars. This function should be set to the Histogram.barCreatedFunction property. It fires for each bar when it is created.

Parameters

ParameterTypeDescriptionRequired
index

The index of the histogram bar. This directly corresponds to the index of the associated bin.

element

The histogram bar element to style.

Returns
void

DataLineCreatedFunction

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Function used to style Histogram.dataLines. This function should be set to the Histogram.dataLineCreatedFunction property. It fires when each data line is created.

Parameters

ParameterTypeDescriptionRequired
lineElement

The SVG element representing the data line rendered on the histogram.

labelElement

The SVG element representing the label rendered on the histogram for the associated line element.

index

The index of the data line.

Returns
void

DataLineInfos

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

value

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The value on the data axis of the histogram where a line will be rendered.

label

Property
Type
string | number | null | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The label associated with the line.