You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case is tracking progress of a task with meaningful values that don't begin at zero. e.g., starts at element #1000 and completes at element #1100. If I apply 1000 as the start point and 1100 as the total value, my expectation is that when value is 1001 the progress bar would be a 1% and the percent complete would be at 1%. To the contrary, the calculations seem to be based off a 0 starting point. Is there an option to track completion against an arbitrary (non-zero) starting point?
EXAMPLE:
const cliProgress = require('cli-progress');
// create a new progress bar instance and use shades_classic theme
const bar1 = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
// start the progress bar with a total value of 200 and start value of 0
bar1.start(1100, 1000);
for (var i = 1000; i<=1100; i++) {
> //do something
>
> // update the current value in your application..
> bar1.increment();
}
// stop the progress bar
bar1.stop();
The text was updated successfully, but these errors were encountered:
My use case is tracking progress of a task with meaningful values that don't begin at zero. e.g., starts at element #1000 and completes at element #1100. If I apply 1000 as the start point and 1100 as the total value, my expectation is that when value is 1001 the progress bar would be a 1% and the percent complete would be at 1%. To the contrary, the calculations seem to be based off a 0 starting point. Is there an option to track completion against an arbitrary (non-zero) starting point?
EXAMPLE:
The text was updated successfully, but these errors were encountered: