.series Property

Getter/Setter for series. Allows the developer to specify mappings between a dataset and specification inputs.

Getter Syntax

var series = chart.series;

Setter Syntax

chart.series = mySeriesObject;

Example Code

<div id='chartDiv'></div>

var chart = new Cedar({'specification': 'https://example.org/url_to_specification.json'})

//create dataset object
var datasets = [

var series = [
    "category": {"field":"District","label":"District"},
    "value": {"field":"Number_of","label":"Student Number_of"}

//assign to chart
chart.datasets = datasets;
chart.series = series;

//create and render a chart
  'elementId': '#chartDiv'


Edit this page on GitHub