du.widgets.boxplot

Module implementing a box plot.

Requires: d3@v4 du.Widget

BoxPlot

du.widgets.boxplot.BoxPlot(name[, parent])

The box plot widget class.
argtypedescription
namestringIdentifier of the widget.
parentobjectParent element to append widget to. If not specified, widget is appended to body. optional

data

du.widgets.boxplot.BoxPlot.data(data)

Binds data to the box plot. Expected data format: array containing objects with a name property with the box name and a values property that contains the array of values for the box.
argtypedescription
dataobjectData to plot.
returndescription
du.widgets.boxplot.BoxPlotReference to the current BoxPlot.

highlight

du.widgets.boxplot.BoxPlot.highlight(key, duration)

Highlights the specified box.
argtypedescription
keystring string[]Single key or an array of keys of the box(es) to highlight.
durationnumberDuration of the highlight animation.
returndescription
du.widgets.boxplot.BoxPlotReference to the current BoxPlot.