Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
Plotly sunburst sub-section custom color JavaScript

I'm working with plotly in JS, trying to draw a sunburst chart. Everything works, but i would like to make it so that the child sections on the chart each have a different color. I cant seem to figure it out, any help is extremely appreciated.

Here is how my sunburst looks:

enter image description here

Notice that "Enos" and "Noam" have the same color, I would like them to have either different colors, or at least different opacities.

Like so:

enter image description here

Here is my code:

        var data = [{
            "type": "sunburst",
            "labels": ["Eve", "Awan", "Seth", "Enos", "Noam", "Enoch"],
            "parents": ["", "Eve", "Eve", "Seth", "Seth", "Awan"],
            "values": [100, 20, 80, 60, 20, 20]
        }];
        var layout = {
            sunburstcolorway: ["#636efa", "#ef553b"]
        };
        Plotly.newPlot('myChart', data, layout)
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!