A progress bar widget.
Requires: d3@v4 du.Widget
du.widgets.progressbar.ProgressBar(name[, parent])
The progress bar 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.progressbar.ProgressBar.trackColor(color)
Sets the color of the progress bar track. Default is transparent.
| arg | type | description |
|---|
| color | string | Color of the progress bar track. |
| return | description |
|---|
du.widgets.progressbar.ProgressBar | Reference to the current Progress bar. |
du.widgets.progressbar.ProgressBar.thickness(value)
Sets the progress bar thickness in pixels. Default is 1px.
| arg | type | description |
|---|
| value | number | Thickness value in pixels. |
| return | description |
|---|
du.widgets.progressbar.ProgressBar | Reference to the current Progress bar. |
du.widgets.progressbar.ProgressBar.align(alignment)
Sets the text alignment for the label. Default is center.
| arg | type | description |
|---|
| alignment | string | The alignment to set. |
| return | description |
|---|
du.widgets.progressbar.ProgressBar | Reference to the current Progress bar. |
du.widgets.progressbar.ProgressBar.percentage(value)
Sets the percentage of the progress bar.
| arg | type | description |
|---|
| value | number | Value ot percentage to set bar to. |
| return | description |
|---|
du.widgets.progressbar.ProgressBar | Reference to the current Progress bar. |