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

Plotly 4.0 changes #55

Open charliejhadley opened 7 years ago

charliejhadley commented 7 years ago

Any plotly code written prior to September 2016 is likely based on Plotly <4.0

There were significant breaking changes to the plotly library as detailed here: http://moderndata.plot.ly/upgrading-to-plotly-4-0-and-above/

An important one for many charts is bar order, which is now controlled as:

aggregate_mean %>%
  arrange(Desktop.Items) %>%
  plot_ly(
        type = "bar",
        y = ~Operating.System,
        x = ~Desktop.Items,
        orientation = "h") %>%
  layout(yaxis = list(categoryorder = "trace"))