-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to have several bar at the same time ? #26
Comments
hi @Tchoupinax , this feature is currently not supported, sry! best regards, Andi |
Ok, |
If you're still looking for an option for multiple progress bars, I've been using https://github.com/pitaj/multi-progress without issue. It uses CLI-Progress bars. |
Multiprogress support has been added to Example const _progress = require('cli-progress');
const files = {
'eta.js ': 187,
'generic-bar.js': 589,
'multi-bar.js ': 5342,
'options.js ': 42,
'single-bar.js ': 2123,
'terminal.js ': 4123
};
const bars = [];
// create new container
const multibar = new _progress.MultiBar({
format: ' {bar} | "{file}" | {value}/{total}',
hideCursor: true,
barCompleteChar: '\u2588',
barIncompleteChar: '\u2591'
});
console.log("Downloading files..\n");
// add bars
for (const filename in files){
const size = files[filename];
bars.push(multibar.create(size, 0, {file: filename}));
}
const timer = setInterval(function(){
// flag
let downloadPending = false;
// increment
for (let i=0; i<bars.length;i++){
const bar = bars[i];
// download complete ?
if (bar.value < bar.total){
downloadPending = true;
bar.increment();
}
}
// stop progress bar ?
if (downloadPending === false){
clearInterval(timer);
multibar.stop();
}
}, 10); |
Hello,
I would like to have 2 cliProgress at the same time, one above the other. How can I make it ? With two instance, it appears that two are merged and one is seen when just updated.
Thank you. :)
The text was updated successfully, but these errors were encountered: