Types
import type { BarCreatedFunction, ColorBreak, DataLineCreatedFunction, DataLineInfos, HistogramBin } from "@arcgis/map-components/components/slider-legacy/types.js";

Type definitions

BarCreatedFunction

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.2

Function used to style or attach custom interaction to histogram bars. This function should be set to the HistogramConfig 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

ColorBreak

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.2

color

Property
Type
Color

Features with values within the provided min and max will be rendered with this color.

max

Property
Type
number

The max value of the break. The max of each break should match the min value of the break directly above it.

min

Property
Type
number

The min value of the break. The min of each break should match the max value of the break directly below it.

DataLineCreatedFunction

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.2

Function used to style HistogramConfig. This function should be set to the HistogramConfig 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.2

label

Property
Type
number | string | null | undefined

The label associated with the line.

value

Property
Type
number

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

HistogramBin

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.2

Represents the bin of a histogram. A bin consists of a minimum and a maximum value and a count. It indicates the number of values in a dataset that lie between the min and max values.

aggregateIds

Property
Type
ObjectId[] | null | undefined

count

Property
Type
number

The number of values in a dataset that are contained between the indicated minValue and maxValue.

maxValue

Property
Type
number

The maximum value (or bound) of the bin.

minValue

Property
Type
number

The minimum value (or bound) of the bin.

HistogramConfig

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.2

Configuration options for defining the slider's histogram.

average

Property
Type
number | undefined

Indicates the average value of the dataset. When set, a solid line on the histogram will render at the location of the average value along with a label defaulting to the value set here.

barCreatedFunction

Property
Type
BarCreatedFunction | undefined

Function for styling bars representing histogram bins. This can be used to style bins or add custom interaction to them. For example, you can use this function to color bins that match the colors on the slider's track.

bins

Property
Type
HistogramBin[] | undefined

The bins of the histogram. This is an array of objects indicating the range and count of data in each bin. This value is typically retrieved from the histogram function.

dataLines

Property
Type
DataLineInfos[] | undefined

When set, renders lines on the histogram that indicate important or meaningful values to the end user.

dataLineCreatedFunction

Property
Type
DataLineCreatedFunction | undefined

Function that fires each time a data line is created. You can use this to style individual dataLines on the data axis.

dataLineUpdatedFunction

Property
Type
DataLineCreatedFunction | undefined

standardDeviation

Property
Type
number | undefined

Indicates the standard deviation of the dataset. When set, data lines are on the histogram at the locations of the standard deviations above and below the average.

standardDeviationCount

Property
Type
number | undefined

Indicates the number of standard deviation lines to render on the histogram above and below the average.

SizeBreak

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.2

max

Property
Type
number

The max value of the break. The max of each break should match the min value of the break directly above it.

min

Property
Type
number

The min value of the break. The min of each break should match the max value of the break directly below it.

size

Property
Type
number

The size in points of the symbol representing features with values within the given min and max.

SliderState

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

ZoomOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.2

max

Property
Type
number | null | undefined

The upper bound of the zoom.

min

Property
Type
number | null | undefined

The lower bound of the zoom.