ox-it / OxfordIDN_htmlwidgets

Interactive visualisation templates with htmlwidgets and R
http://ox-it.github.io/OxfordIDN_htmlwidgets/
MIT License
3 stars 6 forks source link

Reduce repeating code in StackedBarCharts #25

Closed ToonTalk closed 7 years ago

ToonTalk commented 7 years ago

E.g. Normal Stacking repeats much of previous code sample. Harder to read since need to check the first two expressions are the same. Wouldn't it be better to just show the changed expression and mention in the text that the rest is unchanged?

ToonTalk commented 7 years ago

As was done later with

generated_chart %>% hc_legend(reversed = TRUE)

but shouldn't that include

generated_chart %>% hc_chart(type = "bar") %>% hc_plotOptions(series = list(stacking = "normal"))

?

charliejhadley commented 7 years ago

We discussed this and decided it was ok this one time