-
-
Notifications
You must be signed in to change notification settings - Fork 62
Description
We are now showing interesting conference stats in the stats page.
One of the stats we're showing is the breakdown of volunteers by region and we currently use a bar chart for it.
It would be good to use GeoChart instead.
Technical info
We use Google Charts: https://developers.google.com/chart/interactive/docs?_gl=1*1qkhxlv*_up*MQ..*_ga*MTI4OTkyOTg1LjE3NjE4NDA2NzU.*_ga_SM8HXJ53K2*czE3NjE4NDA2NzUkbzEkZzAkdDE3NjE4NDA2NzUkajYwJGwwJGgw
Currently we use the Material Bar Chart: https://developers.google.com/chart/interactive/docs/gallery/barchart#creating-material-bar-charts
It would be good to use the Geo Chart: https://developers.google.com/chart/interactive/docs/gallery/geochart?_gl=1*1n98u7s*_up*MQ..*_ga*MTUwODQxNzI4Ny4xNzYxODQwNzQw*_ga_SM8HXJ53K2*czE3NjE4NDA3MzkkbzEkZzAkdDE3NjE4NDA3MzkkajYwJGwwJGgw
The Charts are currently hardcoded as barchart in this file: https://github.com/pyladies/pyladiescon-portal/blob/main/templates/volunteer/volunteer_charts.html
And the backend data is coming from: https://github.com/pyladies/pyladiescon-portal/blob/main/portal/common.py#L462-L474
Suggested change
- The backend could send an additional flag to the frontend to identify which data should be rendered as a barchart, and which data is a geochart.
- The frontend template can render different chart based on the flag sent by the backend.