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

107
Views
How to display data from top to bottom in stacked bar-chart QuickChart?

I am making a stacked bar-chart using QuickChart. The stack loads the data from bottom to top. I want it to be top to bottom, having my first entry at the top. Referring to this post, I tried adding reversed like in Highcharts, but it doesn't help.

yAxis: {
   reversed: true,
}

My chart

I have attached the chart output. I need "Count of A" on top. But "Count of E" is on top. The code for my chart seems to be irrelevant to post here, but if needed, I can add the code here. Please see what can I add to make it work.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This is because quickchart by default still uses V2 and V2 syntax is different so you will need to put it like this:

options: {
  scales: {
    yAxes: [{
      ticks: {
        reverse: true
      }
    }]
  }
},

Edit:

Chart.js draws datasets in order the are in the datasets array by default (last to first if I remember correctly). So you would need to reorder your datasets.

You can also use the order property in the dataset to specify the draw order. To make the legend the way it still is you can try to accomplish it using the sort callback. If that doesn't work you will need to provide a custom generateLabels function where you can give the items back in the order you want

about 4 years ago · Juan Pablo Isaza 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!