▾
import type { BarCreatedFunction, ColorBreak, DataLineCreatedFunction, DataLineInfos, HistogramBin } from "@arcgis/map-components/components/slider-legacy/types.js";Type definitions
BarCreatedFunction
- 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.
ColorBreak
- Since
- ArcGIS Maps SDK for JavaScript 5.2
color
- Type
- Color
Features with values within the provided min
and max will be rendered with this color.
max
- 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
- 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
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| 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
- Since
- ArcGIS Maps SDK for JavaScript 5.2
value
- Type
- number
The value on the data axis of the histogram where a line will be rendered.
HistogramBin
- 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.
count
- Type
- number
The number of values in a dataset that are
contained between the indicated minValue and maxValue.
HistogramConfig
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Configuration options for defining the slider's histogram.
barCreatedFunction
- 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
- 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
- Type
- DataLineInfos[] | undefined
When set, renders lines on the histogram that indicate important or meaningful values to the end user.
dataLineCreatedFunction
- 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
- Type
- DataLineCreatedFunction | undefined
SizeBreak
- Since
- ArcGIS Maps SDK for JavaScript 5.2
max
- 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
- 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
- Type
- number
The size in points of the symbol representing features with values within
the given min and max.