ZoomCharts Documentation
TimeChart.settings.data
Properties
Specifies if the cached values from a multiple of a unit may be used when retreiving the data for a larger unit. For example, whether data for "M" be used for "3 M"
This does nothing when useSmallerUnitCache is true, since that setting allows all smaller units to be used regardless of whether they are multiples.
When useSmallerUnitCache is false, this specifies whether that applies to all base units and multiples of base unitsor just for all base units
Maximum number of data entries to store per data unit.
A delegate that will be Load more chart data.
Parameters
UTC timestamp for the start of the time range for which data is required
UTC timestamp for the end of the time range for which data is required
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.
Callback function to execute when data arrived correctly.
Parameters
Callback function to execute when error occure while loading data.
Parameters
The current display timezone for the chart. Only specified if the unit is days or larger, null
otherwise.
Data loading format. Currently most charts only support JSON.
Data id used for series to reference specific data source.
Whether to request only when scrolling/scaling has stopped.
Max number of parallel data requests to issue. More requests will result in faster loading, but might put heavy load on server.
Delegate that can be used to process data returned by the server for the HTTP request issued by the chart.
Parameters
The raw data received from the server.
Return value
The data object that will be further processed by the chart.
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.
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.
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.
Timeout in milliseconds for data requests. This timeout only applies to HTTP requests issued by the chart directly.
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.
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.
timeZone
in the data response.Data time zone offset in minutes.
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.
5 m
).Time steps at what data can be fetched.
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.
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.
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.