View Source KinoProgressBar (KinoProgressBar v0.1.1)
Documentation for KinoProgressBar
.
Summary
Functions
Create a new progress bar.
Options:
range
: The range of values for the progress bar. Defaults to{0, 100}
.current
: Current value. Defaults to 0.width
: The width of the progress bar in pixels. Defaults to 600.format_current
: How to display the current value. Defaults to appending a percent symbol.color
: The color scheme for the current bar. Defaults to:blue
. Possible values::red
,:blue
,:gray
,:green
,{:color, CSS_COLOR_STRING}
.throttle
: Elixir can handle 10_000 messages per second without issue, but browsers react poorly if you try to update the DOM 10_000 times per second. So, this kino throttles the rate at which client updates are sent to at most one everythrottle
milliseconds. The default is 500, so at most two updates are sent per second.
Update the current value of the progress bar.
This is throttled per the throttle
parameter set when the progress
bar was created.