du.widgets.bubblechart

Module implementing a bubble chart.

Requires: d3@v4 du.Widget

BubbleChart

du.widgets.bubblechart.BubbleChart(name[, parent])

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

scale

du.widgets.bubblechart.BubbleChart.scale(factor)

Sets the scale of the bubbles' radius. Default is 1.
argtypedescription
factornumberScaling factor of the bubbles.
returndescription
du.widgets.bubblechart.BubbleChartReference to the current BubbleChart.

sizeLabel

du.widgets.bubblechart.BubbleChart.sizeLabel(label)

Sets the label for the bubble sizes. Default is 'size'.
argtypedescription
labelstringLabel to set to bubble size.
returndescription
du.widgets.bubblechart.BubbleChartReference to the current BubbleChart.

data

du.widgets.bubblechart.BubbleChart.data(data)

Binds data to the bubble chart. Expected data format: array of object with properties name (name of the bubble), x, y (bubble coordinates) and size (relative size of the bubble).
argtypedescription
dataArrayData to plot.
returndescription
du.widgets.bubblechart.BubbleChartReference to the current BubbleChart.

highlight

du.widgets.bubblechart.BubbleChart.highlight(key, duration)

Highlights the specified bubble.
argtypedescription
keystring string[]Single key or an array of keys of the bubble(s) to highlight.
durationnumberDuration of the highlight animation.
returndescription
du.widgets.bubblechart.BubbleChartReference to the current BubbleChart.