du.widgets.areachart.AreaChart(name[, parent])
The area chart widget class.
| arg | type | description |
|---|
| name | string | Identifier of the widget. |
| parent | object | Parent element to append widget to. If not specified, widget is appended to body. optional |
du.widgets.areachart.AreaChart.data(data)
Binds data to the area plot. Expected data format: array containing an object for each plot. A plot object has a
name property with the name of the plot and a
values property which is the array of
(x, y) coordinates. All plots are sorted by their
x values before plot.
| arg | type | description |
|---|
| data | Array | Data to plot. |
| return | description |
|---|
du.widgets.areachart.AreaChart | Reference to the current AreaChart. |
du.widgets.areachart.AreaChart.highlight(key, duration)
Highlights the specified plot.
| arg | type | description |
|---|
| key | string string[] | Single key or an array of keys of the area(s) to highlight. |
| duration | number | Duration of the highlight animation. |
| return | description |
|---|
du.widgets.areachart.AreaChart | Reference to the current AreaChart. |