79409283

Date: 2025-02-03 15:47:40
Score: 4
Natty:
Report link

I managed to find a very ugly workaround to deal with this.

It seems that the figure starts with 3 colorscales. And, as soon as I trigger any hover/highlight event, 2 more colorscales are created, for a total of 5.

The default (viridis) colorscale seems to be always the 3rd one. Thus, I added a little JS snippet that hides its layer on window load:

```{js}
function code_default() {
    document.getElementsByClassName('infolayer')[0].getElementsByClassName('colorbar')[2].style.display = 'none'
}
window.onload = code_default;
```

Does anyone know of a better way to deal with this?

Reasons:
  • RegEx Blacklisted phrase (2): Does anyone know
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: dkysh