maxMaxineChen / COVID19-Worldwide-Stats

A Coronavirus COVID-19 global data statistics website built by Gatsby + Material UI + Recharts
https://maxmaxinechen.github.io/COVID19-Worldwide-Stats/
7 stars 3 forks source link

add a list of countries as parameter #7

Open muescha opened 4 years ago

muescha commented 4 years ago

when i open it again: https://maxmaxinechen.github.io/COVID19-Worldwide-Stats/?show=DE,RU,BB,PT then the graphs for this countries should show up immedatily so i have a overview of my favorite countries

maxMaxineChen commented 4 years ago

"?show=DE,RU,BB,PT" kind of a query API based on RESTful standard. This site uses GraphQL to handle data. So it seems a breaking change if I'd like to pass some query parameters to back-end.

An option way is adding routes for every country so that you can get a new page to show a single country chart.

For example, when you open: https://maxmaxinechen.github.io/COVID19-Worldwide-Stats/DE You can see a new page for DE.

But it is still a big change. I would say it nice to have in the future.

muescha commented 4 years ago

you just read the params from the location query string and use it on the page (not as a backend)