Skip to content

Commit

Permalink
fixed doc multibar example #128
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiDittrich committed Jun 28, 2022
1 parent 04751ea commit f4dc172
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ const cliProgress = require('cli-progress');
// create new container
const multibar = new cliProgress.MultiBar({
clearOnComplete: false,
hideCursor: true

hideCursor: true,
format: ' {bar} | {filename} | {value}/{total}',
}, cliProgress.Presets.shades_grey);

// add bars
Expand All @@ -184,7 +184,8 @@ const b2 = multibar.create(1000, 0);

// control bars
b1.increment();
b2.update(20, {filename: "helloworld.txt"});
b2.update(20, {filename: "test1.txt"});
b1.update(20, {filename: "helloworld.txt"});

// stop all bars
multibar.stop();
Expand Down Expand Up @@ -290,6 +291,7 @@ The progressbar can be customized by using the following build-in placeholders.
- `{duration}` - elapsed time in seconds
- `{eta_formatted}` - expected time of accomplishment formatted into appropriate units
- `{duration_formatted}` - elapsed time formatted into appropriate units
- `{<payloadKeyName>}` - the payload value identified by its key

### Example ###

Expand Down

0 comments on commit f4dc172

Please sign in to comment.