I'm attempting to have Plotly choose unique colors for all lines that are being created on a chart. Currently, there are 5 lines, but in the future there could be more or less. I thought something like line = ~list(color = c("red", "purple")),
would work, but I can't get even two lines to be different colors in the chart.
Code:
fig <- plot_ly(theDataframe, x = ~start_date, y = ~score, type = 'scatter', mode = 'lines+markers',
marker = ~list(color="purple"),
line = ~list(color = c("red", "purple")),
source="master_results",
hoverinfo = 'text',