ZoomCharts Documentation


Inheritance hierarchy

This type inherits from BaseSettingsData.


This type does not define any methods.


cacheSize: number
Version 1.14.0: default changed to 500000; the value will be automatically increased if the chart requires more entries at once to display the data.

Maximum number of data entries to store per data unit.

dataFunction: (from: number, to: number, unit: string, success: (data: TimeChartDataObject) => void, fail: (result: BaseDataErrorResponse) => void, timeZone: string) => void

A delegate that will be Load more chart data.

from: number

UTC timestamp for the start of the time range for which data is required

to: number

UTC timestamp for the end of the time range for which data is required

unit: string
Version 1.15.0: units like 5 m are now also supported, if specified in the data.units array.

The unit by which the data has to be aggregated. The data source can also return smaller units.

success: (data: TimeChartDataObject) => void
Version 1.12.0: the value has to be an object, JSON strings are no longer accepted.

Callback function to execute when data arrived correctly.

fail: (result: BaseDataErrorResponse) => void
Version 1.12.0: the value has to be an object, JSON strings are no longer accepted.

Callback function to execute when error occure while loading data.

timeZone: string
Introduced in version 1.12.0.

The current display timezone for the chart. Only specified if the unit is days or larger, null otherwise.

format: "JSON" | "GeoJSON"
Inherited from: BaseSettingsData

Data loading format. Currently most charts only support JSON.

id: string
Inherited from: BaseSettingsData

Data id used for series to reference specific data source.

minimizeRequests: boolean
Version 1.15.0: the setting also has effect during animations and not only during user interaction.

Whether to request only when scrolling/scaling has stopped.

numberOfParallelRequests: number
Inherited from: BaseSettingsData

Max number of parallel data requests to issue. More requests will result in faster loading, but might put heavy load on server.

postprocessorFunction: (data: string) => string
Inherited from: BaseSettingsData

Delegate that can be used to process data returned by the server for the HTTP request issued by the chart.

data: string

The raw data received from the server.

Return value
Data type: string

The data object that will be further processed by the chart.

prefetchRatio: number

How much data to load in advance. For example, if prefetchRatio=1, the chart will automatically load data so that the user can scroll a whole width of the chart to both sides without waiting for the data.

Inherited from: BaseSettingsData
Version 1.12.0: the value has to be an object, JSON strings are no longer accepted.

This property allows the data to be specified inline with the settings. Note that even if this is specified the chart might want to invoke url or dataFunction if the user selects a time range outside of what has been preloaded.

requestMaxUnits: number

Maximum number of data points to request in one go. Multiple requests will be issued if more data is needed.

Note that the server can opt to return less data in the response as well - more requests will be issued in this case as well.

requestTimeout: number
Inherited from: BaseSettingsData

Timeout in milliseconds for data requests. This timeout only applies to HTTP requests issued by the chart directly.

stringTimestampFormat: string | Array<string>
Introduced in version 1.12.0.

The format string (or strings) that is used to parse timestamps that are given as strings. Note that for optimal performance a single format string should be used (or even better, the numeric timestamps should be used instead).

When stringTimestampFormat is not specified the parser supports ISO 8601 formats (for details see moment documentation).

See moment documentation for details on the format strings.

suppressWarnings: boolean
Experimental property - the API might not be stable and is subject to change.

If set to true, the validation of the loaded data is not performed and warnings will not be displayed. Note that errors are not suppressed.

This setting should only be used when it is determined that the potential issues described by these warnings does not prevent the chart from working correctly. It should also be noted that a future version of the library might change the behavior of the situations the warnings are intended to prevent.

timeZoneOffset: string | number
Version 1.12.0: the property has been deprecated in favor of timeZone in the data response.

Data time zone offset in minutes.

timestampInSeconds: boolean

Specifies whether the numeric timestamps used with this data source are in seconds instead of milliseconds.

This applies to the from and to request parameters and all timestamps within the data response.

units: Array<string>
Version 1.15.0: multiples of units can now also be specified (for example, 5 m).

Time steps at what data can be fetched.

url: string
Inherited from: BaseSettingsData

URL that is used to load data. Additional query string parameters are added to the given url: from, to, unit and timeZone. See the documentation of dataFunction for the description of these parameters.

urlByUnit: Dictionary<string>

Allows specifying specific URL for each time unit. This can be useful if the data is pregenerated in static files, for example, to specify different data file where time aggregated by months or years - urlByUnit: { 'y': '/data/yearData.json', 'm': '/data/monthData.json' }. If this is specified, it overrides url property.

urlParameters: Array<{ name?: string; value?: string; }>
Inherited from: BaseSettingsData

List of extra parameters to pass with data URL.

name: string

Parameter name.

value: string

Parameter value.

useSmallerUnitCache: boolean
Introduced in version 1.15.0.

Specifies if the cached values from a smaller unit may be used when retrieving the data for a larger unit.

This should be set to false when the data source uses a custom aggregation specific to each individual unit.

Note that currently the smaller units are only used when they overlap the required range completely. For partial overlap the values are only used as a placeholder while the larger unit is requested from the data source.