epiforecasts / RtD3

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

Time series failing to plot #39

Closed hamishgibbs closed 3 years ago

hamishgibbs commented 3 years ago

India time series are failing to plot because of an issue with the ts_color_ref being passed from summaryWidget. I will see if I can replicate the error locally and then we can figure out how to fix it.

See: https://epiforecasts.io/covid/posts/national/india/

hamishgibbs commented 3 years ago

@seabbs

seabbs commented 3 years ago

Its fine in your docs: https://epiforecasts.io/RtD3/articles/subnational.html

Hmm - checking india implementation on the site for other problems.

hamishgibbs commented 3 years ago

Ok - when I create the dashboard locally - I get all the colors and it works fine.

Here is the error being thrown:

Screenshot 2020-10-05 at 10 09 46

This is caused by an incorrectly formatted ts_color_ref which is defined here:

https://github.com/epiforecasts/RtD3/blob/70512d7cbd426c6efd7c2f93a85b08aa4ab95ce1/R/default_ts_colors.R#L11-L19

And passed to rt_vis as ts_color_ref here:

https://github.com/epiforecasts/RtD3/blob/70512d7cbd426c6efd7c2f93a85b08aa4ab95ce1/R/summaryWidget.R#L60

hamishgibbs commented 3 years ago

Because the color_ref is a default and should be defined automatically - I am not sure where the issue is coming from atm

seabbs commented 3 years ago

I looked through the site implementation and I can't see anything. My thought is that maybe the update to rtD3 hit mid way through the rendering of the india page so it bugged out. I'll check the update in 2 hours and close if this goes away.

hamishgibbs commented 3 years ago

That is a strong possibility. Sounds good.

seabbs commented 3 years ago

oooops :)

hamishgibbs commented 3 years ago

Looks like this was solved by waiting for everything to update. Going to close.