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

179
Views
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 answers
Answer question

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 Report
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!