New to Kendo UI for jQuery? Download free 30-day trial

Data Binding

The Sparkline charts can visualize series that are bound to both local and remote data.

Binding to Local Data

Binding to local data can be done by using any of the following approaches:

  • Passing an array with values to the component constructor.
  • Setting the root-level data field to an array with values.
  • Configuring a series and setting its data option.

    // The following configurations are identical.

    $("#sparkline").kendoSparkline([200, 450, 300, 125]);

    $("#sparkline").kendoSparkline({ type: "line", data: [200, 450, 300, 125] });

    $("#sparkline").kendoSparkline({ series: [{ type: "line", data: [200, 450, 300, 125] }] });

Binding to Remote Data

For more information, refer to the article on binding Telerik UI Charts to a data source.

See Also

In this article