diff --git a/README.md b/README.md index c0d1d3d..a26acf8 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ This simple application offers you the following features... * Simple layout and easy to understand. * By country query. * e.g. (```/country```). +* By country with History Chart + * e.g. (```/history//``` or append with ``````) * Windows CMD support. * e.g. (```/cmd``` or ```/cmd/country```). * Plain or Basic version. @@ -72,6 +74,22 @@ curl https://covid19tracker.xyz/philippines curl https://covid19tracker.xyz/ph ``` +#### Country with History Chart + ```/history//``` or append with `````` + + +```bash +curl https://covid19tracker.xyz/history/ph +``` + +```bash +curl https://covid19tracker.xyz/history/ph/cases +``` + +```bash +curl https://covid19tracker.xyz/history/ph/deaths +``` + ## Official Blog Many people asking me how to properly use my tracker. Here's the blog on [How to Track Coronavirus on Command Line](https://warengonza.ga/covid19-tracker-cli). diff --git a/lib/cli/chart.js b/lib/cli/chart.js index fd571e1..75e8f18 100644 --- a/lib/cli/chart.js +++ b/lib/cli/chart.js @@ -3,7 +3,7 @@ const chart = require('asciichart'); // generate chart for caes or deaths exports.generate = (data, type = 'cases') => { const config = { - height: 12, + height: 7, format: (x, i) => (' ' + x.toFixed(0)).slice(-' '.length) }; chartData = Object.values(data.timeline[type]).flat();