Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeetiss/covid-charts
https://github.com/jeetiss/covid-charts
charts covid-19 covid19
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeetiss/covid-charts
- Owner: jeetiss
- Created: 2020-03-16T09:36:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-18T08:47:14.000Z (over 2 years ago)
- Last Synced: 2024-12-25T13:01:55.893Z (26 days ago)
- Topics: charts, covid-19, covid19
- Language: JavaScript
- Homepage: https://jeetiss.github.io/covid-charts/
- Size: 825 KB
- Stars: 5
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# covid-charts
Interactive charts with the number of Coronavirus confirmed cases, deaths, and recovered cases for your country.
![example][example]
> Data from [pomber/covid19][data-link]
## install
#### with npm
```
npm i covid-charts
``````js
import createChart from "covid-charts";const chart = createChart(document.body, {
country: "France",
width: 400,
height: 300
});
```#### with CDN via unpkg
```html
const chart = createChart(document.body, {
country: "France",
width: 400,
height: 300
});```
## api
`createChart` params:
- dom element: chart will be added to this place to DOM
- options:
- width (default: 400)
- height (default: 300)
- country (default: 'China')`createChart` return object with next methods:
- remove: destroy and remove chart from DOM
- countries: return a promise with available countries
- changeCountry: change country to the specified# acknowledgements
Thanks @pomber for the [data][data-link].
Special thanks to [tradingview][tradingview] for [supa-dupa charts][tradingview-charts].
[example]: https://ucarecdn.com/49c9de71-21de-45a3-97b8-9b48b5fb8fac/
[data-link]: https://github.com/pomber/covid19
[tradingview]: http://tradingview.com/
[tradingview-charts]: https://github.com/tradingview/lightweight-charts