Skip to content
import { formatDateLabel, formatNumberLabel, getDeviationValues } from "@arcgis/core/widgets/smartMapping/support/utils.js";
Since
ArcGIS Maps SDK for JavaScript 4.12

Various utils for tying Smart Mapping renderers to the Smart Mapping slider widgets.

Functions

formatDateLabel

Function
Since
ArcGIS Maps SDK for JavaScript 4.14

Formats a UNIX timestamp to a basic date string. This function is only intended for convenience in formatting thumb values in slider widgets and does not include additional formatting options.

Signature
formatDateLabel (value: number): string
Parameters
ParameterTypeDescriptionRequired
value

The UNIX timestamp to convert to a formatted date string.

Returns
string

Returns a formatted date string.

formatNumberLabel

Function
Since
ArcGIS Maps SDK for JavaScript 4.19

Formats a numeric value for display as a label based on the current locale.

Signature
formatNumberLabel (value: number): string
Parameters
ParameterTypeDescriptionRequired
value

The value to convert to a formatted label.

Returns
string

Returns a formatted label based on the current locale.

getDeviationValues

Function

Computes and returns standard deviation values based on the given average and standard deviation.

Signature
getDeviationValues (standardDeviation: number | null | undefined, average: number | null | undefined, count: number): number[]
Parameters
ParameterTypeDescriptionRequired
standardDeviation

The standard deviation from the given average.

average

The average of the dataset from which to compute standard deviation values.

count

The number of standard deviations from the mean to compute.

Returns
number[]

Returns the standard deviation values from the given average.