plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

Legend name not passed when using frame animation

Open Balaika opened this issue 1 year ago • 0 comments

Hi,

Legend names are sometimes not passed when using frame option.

#This is working (without frame)
plot_ly()%>%add_markers(1:3,2:4)%>%add_markers(1:3,2:4,name="New name")

#This is not (with frame)
plot_ly()%>%add_markers(1:3,2:4,frame=c(1,1,2))%>%add_markers(1:3,2:4,frame=c(1,2,2),name="New name")

#This is working (with frame) ! 
#This works apparently because frame 1 is repeated twice (frame=c(1,1,2) is okay but frame=c(1,2,3) is not)
plot_ly()%>%add_markers(1:3,2:4,frame=c(1,1,2))%>%add_markers(1:3,2:4,frame=c(1,1,2),name="New name")

[Package plotly version 4.10.4]

Balaika avatar Mar 11 '24 13:03 Balaika