Wijmo UI for the Web
Create a Dynamic Line Chart
Show AllShow All
Hide AllHide All

Building on the Quick Start example, you can change the wijlinechart into a dynamic chart to which your users can add data points.

Note: If you used this functionality in the past, please note that data("wijlinechart") no longer works.
Instead, you must now use data("wijmoWijlinechart").

  1. In the <head> section of your HTML file, replace the script that includes the document ready function with this one, which does the following:
    • Sets up a data array.
    • Sets up the chart with a seriesList that consumes the data array.
    • Creates a click function that allows users to create a new data point and causes the chart to redraw with each click.

    Drop down and copy code

  2. No changes are necessary in the <body> section of your HTML file. The basic <div> tag is sufficient to create the chart.
  3. Save your HTML file and open it in a browser. The chart appears like the live widget below. Click within the chart area to add data points dynamically.

See Also

Widgets

Reference

 
Support Options