Different colors for multiple (box) selections?

Hi, I’m kind of new to plotly and I was just wondering two things:

  1. Is there a way to differentiate between selections by automatically assigning a new stroke color to it? i.e. the first rectangle on the picture below should be green, while the second one should be red and so on?

  2. Can you assign a background color to your selections, in other words, can you fill the rectangles with a color?
    Thanks in advance!

Both your items are not possible at the moment via the plotly API. There’s probably a way to achieve that using plotly_selected and some CSS, but I’d would recommend doing so.

For the latest news on future selection development, I’d recommend subscribe to:

1 Like