Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda