series.data Array

The array of data items which represent the series data.

Can be set to :

  • Array of objects. Each point is bound to the field specified via the series.field option.
  • Array of numbers. Supported when the series.type option is set to "area", "bar", "column", "donut", "pie", "line" or "waterfall".
  • Array of arrays of numbers. Supported when the series.type option is set to "bubble", "scatter", "scatterLine", "ohlc", "rangeBar", "rangeArea" or polar series.
  • Bubble series need arrays of three values - X value, Y value and Size value e.g. [1, 1, 10]
  • Scatter and scatter line series need arrays of two values - X value and Y value
  • OHLC and candlestick series need arrays of four values - open, high, low and close
  • RangeBar and RangeArea series need arrays of two values - the from and to value.

Example - set the chart series data as array of objects

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    {
      field: "price",
      data: [
        { price: 1 },
        { price: 2 },
        { price: 3 }
      ]
    }
  ]
});
</script>

Example - set the chart series data as array of numbers

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

Example - set the chart series data as array of arrays

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    {
      type: "bubble",
      data: [
        [1, 2, 15],
        [2, 3, 4]
      ]
    }
  ]
});
</script>
In this article