Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Error after update: Multiple series at one plot

After package update i have an error with all my previous plots, that worked before.

I try to show two lines and one plot based on different columns in one dataframe and with two different y-axis. I used this code before:

ay <- list(
tickfont = list(color = “red”),
overlaying = “y”,
side = “right”
)
p5 <- plot_ly(b, x = category, y = core, type = “bar”, name=“Opp”) %>%
add_trace(b, x = category, y = ssp, type = “markers+lines”, name = “Ssp”, yaxis = “y2”) %>%
layout(title = “”, yaxis = list(title = “”), yaxis2 = ay,xaxis = list(title = “”))

p5

Now after package update this code doesn’t work and i have an error
"Error in FUN(X[[i]], …) :
‘options’ must be a fully named list, or have no names (NULL)"

How can i solve the problem

Hey pokynka,

I just ran into the same problem. After struggling for some while, I came to the solution.

In the old version of plot_ly, you needed to point to the data.frame you were looking for the columns to plot in the add_trace command. In your case the variable “b”.
In the new version you are not allowed to do that. So simply remove “b” from the “add_trace” command and it should run again.
I dindÄt test cour code, though.

Cheerz,
Smoff