du.widgets.progressbar

A progress bar widget.

Requires: d3@v4 du.Widget

ProgressBar

du.widgets.progressbar.ProgressBar(name[, parent])

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

trackColor

du.widgets.progressbar.ProgressBar.trackColor(color)

Sets the color of the progress bar track. Default is transparent.
argtypedescription
colorstringColor of the progress bar track.
returndescription
du.widgets.progressbar.ProgressBarReference to the current Progress bar.

thickness

du.widgets.progressbar.ProgressBar.thickness(value)

Sets the progress bar thickness in pixels. Default is 1px.
argtypedescription
valuenumberThickness value in pixels.
returndescription
du.widgets.progressbar.ProgressBarReference to the current Progress bar.

align

du.widgets.progressbar.ProgressBar.align(alignment)

Sets the text alignment for the label. Default is center.
argtypedescription
alignmentstringThe alignment to set.
returndescription
du.widgets.progressbar.ProgressBarReference to the current Progress bar.

percentage

du.widgets.progressbar.ProgressBar.percentage(value)

Sets the percentage of the progress bar.
argtypedescription
valuenumberValue ot percentage to set bar to.
returndescription
du.widgets.progressbar.ProgressBarReference to the current Progress bar.