Skip to content

Commit

Permalink
馃摉 DOC: Bars
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadawais committed Apr 23, 2020
1 parent 73432df commit b8cee57
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Binary file added .github/bars.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 19 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,25 @@ corona -s active -r

[![馃摕](./.github/sort.gif)](./../../)

### Charts: Regular & Logarithmic
### Bar Charts

```sh
# Print bar charts for max 10 countries.
corona --bar
corona -b

# Print bar charts for top 5 countries w.r.t deaths.
corona --bar --sort deaths --limit 5
corona -b -s deaths -l 5

# Print bar charts countries w.r.t recovered cases.
corona --bar --sort recovered
corona -b -s recovered
```

[![馃摕](./.github/bars.gif)](./../../)

### Line Charts: Regular & Logarithmic

```sh
# Print a country line chart.
Expand Down
2 changes: 1 addition & 1 deletion utils/getBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = async (
);

// Limit.
limit = limit > 12 ? 12 : limit;
limit = limit > 10 ? 10 : limit;
allCountries = allCountries.slice(0, limit);

let logScale = x => x;
Expand Down

0 comments on commit b8cee57

Please sign in to comment.