du.widgets.violinplot.ViolinPlot(name[, parent])
The violin plot 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.violinplot.ViolinPlot.data(data)
Binds data to the violin plot. Expected data format: array containing the violin objects. Each violin needs to have a
name property denoting its name and a
data property that contains the array of corresponding values. The violins are calculated automatically.
| arg | type | description |
|---|
| data | object | Data to plot. |
| return | description |
|---|
du.widgets.violinplot.ViolinPlot | Reference to the current ViolinPlot. |
du.widgets.violinplot.ViolinPlot.highlight(key, duration)
Highlights the specified violin.
| arg | type | description |
|---|
| key | string string[] | Single key or an array of keys of the violin(s) to highlight. |
| duration | number | Duration of the highlight animation. |
| return | description |
|---|
du.widgets.violinplot.ViolinPlot | Reference to the current ViolinPlot. |