epiforecasts / RtD3

Rt visualisation in D3
https://epiforecasts.io/RtD3/
Other
6 stars 2 forks source link

Integrate RtD3s #49

Closed hamishgibbs closed 3 years ago

hamishgibbs commented 3 years ago

Integration of RtD3js React library with existing summaryWidget function.

I have removed some of the data checks as they were quite complex and it may be easier to write up the desired data format in the docs, instead of testing for possible data faults when instantiating the widget. If input data is incorrect, the widget will not render correctly. I think the best way to troubleshoot this would be the docs, not custom error messages.

Incorporates the new RtD3js library in the widget with new features (listed in the Readme).

Items still needing attention:

A potential issue: I have used Bootstrap 4 in RtD3js to make spacing and styling everything easy. Hopefully this will not conflict with other templates that are rendered on the main site but I am not positive how all the different styles will play on a page with a different style if there are conflicting classnames and if the Bootstrap styles are not scoped to the widget. We will see.

hamishgibbs commented 3 years ago

Changes:

To do:

Should be working and ready to go soon.

hamishgibbs commented 3 years ago

Pointer now aligned. Pausing here - will be back to address tests and docs.

hamishgibbs commented 3 years ago

Fixed tests by eliminating most of the data structure checks. We can discuss what the best approach is but this makes the R code simpler and easier to maintain. Could lead to more uncaught JavaScript errors which are harder to debug in Rstudio (but you can checkout from a Rmd opened in Chrome). Hopefully the docs provide enough info on the anticipated data structure to troubleshoot odd widgets.

Updated docs. We still need some info on how to create custom map legends for different variables and add custom colors to the timeseries. This can be added in the future.

Fixed various spelling errors and did a general review of docs.