import type TimeSeriesFieldTimeMapping from "./TimeSeriesFieldTimeMapping.js"; import type TimeExtent from "../../time/TimeExtent.js"; import type { ClonableMixin } from "../../core/Clonable.js"; import type { JSONSupport } from "../../core/JSONSupport.js"; import type { TimeSeriesFieldTimeMappingProperties } from "./TimeSeriesFieldTimeMapping.js"; import type { TimeExtentProperties } from "../../time/TimeExtent.js"; /** @since 5.1 */ export interface TimeSeriesInfoProperties extends Partial> { /** The mapping between field names and time values for the time series configuration. */ fieldTimeMappings?: TimeSeriesFieldTimeMappingProperties[] | null; /** * 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. */ timeExtent?: TimeExtentProperties | null; } /** * 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](https://developers.arcgis.com/javascript/latest/arcade/) * 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") * } * }]; * @since 5.1 */ export default class TimeSeriesInfo extends TimeSeriesInfoSuperclass { constructor(properties?: TimeSeriesInfoProperties); /** The mapping between field names and time values for the time series configuration. */ get fieldTimeMappings(): TimeSeriesFieldTimeMapping[] | null | undefined; set fieldTimeMappings(value: TimeSeriesFieldTimeMappingProperties[] | 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. */ accessor name: string | 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. */ get timeExtent(): TimeExtent | null | undefined; set timeExtent(value: TimeExtentProperties | 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`. */ accessor timeInterval: number | 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`. */ accessor timeIntervalUnits: "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "decades" | "centuries" | 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. */ accessor timeValueUnits: "days" | "hours" | "minutes" | "months" | "seconds" | "years" | 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. */ accessor title: string | null | undefined; /** * 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 "time-series-fields" */ get type(): "time-series-fields"; } declare const TimeSeriesInfoSuperclass: typeof JSONSupport & typeof ClonableMixin /** Type alias for [TimeSeriesInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeSeriesInfo/). */ export type DataSeriesInfo = TimeSeriesInfo;