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

157
Visualizações
Change color of polar chart rings using anycharts?

Is it possible to change color of individual rings in polar chart using anychart charting library?

Code:

drawPolarChart() {

      // create data set on our data
      var chartData = {
        rows: [
          ['Flow', 10],
          ['Energy', 20],
          ['Commitment', 100],
        ]
      };
  
      // sort data by X - // set series type - // disable y-axis - // set x-scale
      this.chart.sortPointsByX(true).defaultSeriesType('column').yAxis(true).xScale('ordinal');
  
      // set max y-axis values.
      this.chart.yScale().maximum(100).ticks().interval(10);

      // set 50th percentile to red dotted ring.
      
  
      // set chart data
      this.chart.data(chartData);
  
      // set title margin
      this.chart.title().margin().bottom(20);
  
      // set stack mod
      this.chart.yScale().stackMode('value');
  
      // set tooltip settings
      this.chart.tooltip().valuePostfix('%').displayMode('union');
  
      // set chart container id
      this.chart.container('chartContainer');
  
      // initiate chart drawing
      this.chart.draw();

  }

I intend to change the ring labeled '50' to any color of my choice?

enter image description here

Edit Similar to this but I am unable to make it work for other specific rings.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you want to customize the charts you can use custom theme option, https://docs.anychart.com/Appearance_Settings/Themes#out_of_the_box_themes

Out of the box Themes can be located either at Themes Section at AnyChart CDN or in the AnyChart Downloadable Package, these themes change the look, feel and layout of every chart, map, gauge, treemap or stock chart. You are free to use and modify these themes as you want. To use any of these themes you need, just with any External theme reference the proper file in HTML document and then apply theme by name:

<head>
<!--Link to the files with out of the box themes -->
<script src="https://cdn.anychart.com/themes/2.0.0/coffee.min.js"></script>
<script src="https://cdn.anychart.com/themes/2.0.0/dark_blue.min.js"></script>
<script>
  anychart.onDocumentReady(function () {
  // data
  var data = [
    ["Department Stores", 637166],
    ["Discount Stores", 721630],
    ["Men's/Women's Specialty Stores", 148662],
    ["All other outlets", 90000]
  ];

  // apply coffee theme
  anychart.theme(anychart.themes.coffee);

  // apply dark blue theme
  // anychart.theme(anychart.themes.darkBlue);

  // create and display chart
  var chart = anychart.bar();
  chart.bar(data);

  chart.container("container");
  chart.draw();
 });
</script>
</head>
about 4 years ago · Juan Pablo Isaza Relatório
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