import TimeSeriesInfo from "@arcgis/core/layers/support/TimeSeriesInfo.js";
Inheritance
TimeSeriesInfoAccessor
Since
ArcGIS Maps SDK for JavaScript 5.1

A time series describes a series of fields that represent a sequence of related data points over time or other dimensions.

This style of visualization works best with features whose positions or geographic shapes don't change over time. This requires the data to be structured so that two or more fields contain data values for the same attribute at different points in time. Those fields must be either string or number data types, and their names should clearly indicate the time period represented by the data (e.g. temperature_Jan2020, temperature_Feb2020, etc.). Web map authoring applications can use the information in the time series fields configuration to generate Arcade expressions that reference the fields in the time series, allowing the layer's renderer, labels, and/or popups to reflect an attribute's value relative to the map's current time.

Example
layer.dataSeriesInfos = [{
type: "time-series-fields",
name: "ts0",
title: "U.S. National Park Annual Visitation Numbers (10 year increments, 1910-2020)",
fieldTimeMappings: [
{
fieldName: "F1910",
timeValue: "1910"
},
{
fieldName: "F1920",
timeValue: "1920"
},
{
fieldName: "F1930",
timeValue: "1930"
},
{
fieldName: "F1940",
timeValue: "1940"
},
{
fieldName: "F1950",
timeValue: "1950"
},
{
fieldName: "F1960",
timeValue: "1960"
},
{
fieldName: "F1970",
timeValue: "1970"
},
{
fieldName: "F1980",
timeValue: "1980"
},
{
fieldName: "F1990",
timeValue: "1990"
},
{
fieldName: "F2000",
timeValue: "2000"
},
{
fieldName: "F2010",
timeValue: "2010"
},
{
fieldName: "F2020",
timeValue: "2020"
}
],
timeInterval: 1,
timeValueUnits: "years",
timeIntervalUnits: "decades",
timeExtent: {
start: new Date("1910-01-01"),
end: new Date("2020-01-01")
}
}];

Constructors

Constructor

Constructor

Parameters

ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
readonly inherited
"seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "decades" | "centuries" | null | undefined
"days" | "hours" | "minutes" | "months" | "seconds" | "years" | null | undefined
readonly
"time-series-fields"

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor
Since
ArcGIS Maps SDK for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

fieldTimeMappings

autocast Property
Type
TimeSeriesFieldTimeMapping[] | null | undefined

The mapping between field names and time values for the time series configuration.

name

Property
Type
string | null | undefined

The unique identifier for the time series fields configuration. This will likely be generated by client applications and used to reference the time series within the authoringInfo property of the renderer and in labels and popups.

timeExtent

autocast Property
Type
TimeExtent | null | undefined

Represents the time extent for the full list of fields used in the time series fields configuration. This is used for setting the bounds of the time slider.

timeInterval

Property
Type
number | null | undefined

The interval of time between each field in the time series. For example, if the fields in the time series included temperature_Jan2020, temperature_Feb2020, temperature_Mar2020, etc., the time interval would be 1 and the time interval units would be months.

timeIntervalUnits

Property
Type
"seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "decades" | "centuries" | null | undefined

Temporal unit of measure for timeInterval. For example, if the fields in the time series included temperature_Jan2020, temperature_Jan2021, temperature_Jan2022, etc., the time interval would be 1 and the time interval units would be years.

timeValueUnits

Property
Type
"days" | "hours" | "minutes" | "months" | "seconds" | "years" | null | undefined

Temporal unit of measure for timeValue (specified in fieldTimeMappings). For example, if the fields in the time series included temperature_Jan2020, temperature_Jan2021, temperature_Jan2022, etc. the time value unit would be month to reflect each field's relevance over a singular month.

title

Property
Type
string | null | undefined

The title of the time series configuration. This is a user-friendly name that can be used in the UI of client applications to refer to the specific time series.

type

readonly Property
Type
"time-series-fields"

Specifies the type of data series info. This is used by client applications to determine how to use the data series info configuration to generate expressions for renderers, labels, popups, charts, or other representations of the data for display in the web map. For time series fields, the value of this property must be time-series-fields.

Default value
"time-series-fields"

Methods

MethodSignatureClass
inherited static
fromJSON(json: any): any
inherited
clone(): this
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters

ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

clone

inherited Method
Signature
clone (): this
Inherited from: ClonableMixin

Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.

Returns
this

A deep clone of the class instance that invoked this method.

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.

Type definitions

DataSeriesInfo

Type definition

Type alias for TimeSeriesInfo.

Supertypes
TimeSeriesInfo