GeoDaCenter / covid

COVID Atlas alpha code
https://geodacenter.github.io/covid/
GNU General Public License v3.0
47 stars 19 forks source link

d3.js helper #23

Closed lixun910 closed 3 years ago

lixun910 commented 4 years ago

I don't realize there are so many volunteers here. Anyone who knows d3.js, you are welcome to improve the d3.js made charts: the line chart and the bar chart. E.g. add mouse over function to the line chart, or add a navigation line to the line chart etc.

The code to create the line char is in index.js in functions: addTrendLine() and updateTrendLine()

The code to create the bar chart is in index.js in function: createTimeSlider()

RandomFractals commented 4 years ago

@lixun910 if you are planning to add more charts to this dashbord, I would suggest you integrate vega-lite instead for faster configuration and better charts display with more polished look and feel, UX, export options, etc.

see: https://github.com/vega/vega-lite

It is built on d3.js, just more dev and user friendly.

nofurtherinformation commented 3 years ago

The new release of the Atlas refactors into React, and we have implemented ReCharts as our library of choice (for now). New figures include a more interactive line chart and two-week historical trend lines in the data report panel on the right for cases, deaths, and testing. Thanks @RandomFractals for your suggestions here!

image image