Top
You are looking at an outdated 7.4.1 version of this document. Switch to the 7.14.3 version to see the up to date information.

namespace anychart.data Improve this Doc

Classes for handling data structures/sources
The following data types/hierarchy is supported:

You can map any of these data sets to (anychart.data.View), and then work with it using anychart.data.Iterator iterator.

Functions Overview

mapAsTable()Maps passed data as an array of mappings. Data is expected to be a table, e.g. an array of arrays of values.
set()Return instance of class anychart.data.Set.
tree()Constructor function.

Classes Overview

anychart.data.Iteratoranychart.data.Iterator class is used to work with data in a View.
anychart.data.MappingSoecial View which allows to map anychart.data.Set storages.
anychart.data.SetLinear data storage.
anychart.data.TraverserTree data traverser.
anychart.data.TreeTree data model.
anychart.data.Tree.DataItemTree data item.
anychart.data.ViewView is a representation of raw data.

Functions Description

mapAsTable

Maps passed data as an array of mappings. Data is expected to be a table, e.g. an array of arrays of values. The function treats the table as a source for several series of points, that have the same X value. Each row of the table is treated as a bunch of points, one for each series. Column number 0 is treated as an X value. Other columns (number per series depends on the opt_mode) are treated as data values.

Params:

Name Type Description
data Array.<Array.<*>> Source data table.
mode anychart.enums.MapAsTableMode | string Mapping mode.
seriesCount number Explicit number of series to make mapping for. If not set, auto-determination by the first table row is used.

Returns:

Array.<anychart.data.Mapping> - Returns an array of mappings, one per series.

set

Return instance of class anychart.data.Set.

Params:

Name Type Description
data Array | string Data set raw data can be set here.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.data.Set - Self instance for method chaining.

Try it:

tree

Constructor function.

Params:

Name Type Description
data Array.<Object> Raw data.
fillMethod anychart.enums.TreeFillingMethod Fill method.

Returns:

anychart.data.Tree - Self instance for method chaining.

Try it: