Home > Back-end >  Access color scale in Plotly javascript
Access color scale in Plotly javascript

Time:10-23

How can I get in javascript the color scales defined in the variable scales in enter image description here

Note: As mentioned in @Aifos answer, it was available but since version 2, Plotly no longer exposes .d3 property so if you use last version you will get an error

If you need them I'd recommend you to simply import the file yourself from the src file

CodePudding user response:

Does the below help you?

Plotly.d3.scale.category10();

As mentioned here: https://stackoverflow.com/a/40677409/19135131

  • Related