ZoomCharts Documentation
Version: 1.21.3 (2025-04-07)
Switch to Version 2.0 (BETA)
Switch to Version 2.0 (BETA)
Supplying data for multiple layers
Charts on charts allows you to include different sources and display it in different ways - all in a single chart. All the charts of the multiple layers can have their own respective data sources, so when creating a chart you can pass the data as an array.
In order to reference one of the layers from a chart that will utilize it's data, you can specify ID's for your layers in the following manner:
var options = { data: [ {id: "foo", url: "/path/to/foo.json"}, {id: "bar", url: "/path/to/bar.json"} ] /* ... */ };
Referencing the data for a layer
When specifying layers, data can be referenced by specifying the layer id:
var options = { /* ... */ layers: [ { type: "shapes", data: {id: "foo"}, /* ... */ }, { type: "items", data: {id: "bar"}, /* ... */ } ] };