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

181
Visualizações
Display maximum value of a highcharts stacked column on the bottom

Does anyone know if it's possible to specify the order of display of stacked columns in highcharts ?

I would like to display the biggest value (in %) from the bottom, and I can't find a way to do it.

Thank you

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can try use special setting for shows sume value yAxis.stackLabels on stacked series. , but it is a setting that shows the sum of column values. To get the maximum value, you should dig into the core and create a wrapp extending-highcharts.

Highcharts.chart('container', {
  chart: {
    type: 'column'
  },
  plotOptions: {
    column: {
      stacking: 'normal',
    }
  },

  yAxis: {
    allowDecimals: false,
    min: 0,
    title: {
      text: 'Number of fruits'
    },
    stackLabels: {
      enabled: true,
            verticalAlign: 'bottom',
      style: {
        fontWeight: 'bold'
      },
      formatter: function() {
        var val = this.total;
        if (val > 0) {
          return val;
        }
        return '';
      },

    }
  },
  series: [{
      data: [4, 3, 5, 6, 2, 3]
    },
    {
      data: [4, 3, 5, 6, 2, 3].reverse()
    }
  ]

});

Demo: https://jsfiddle.net/BlackLabel/80dcmj2e/1/

about 4 years ago · Santiago Trujillo 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