Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts yaxis higher values displayed lower

I am looking for a javascript solution to display rankings across time.

Being familiar with Highcharts I am wondering if there is a way to display rankings in a "user-friendly way", by which I mean: with the #1 ranking being at the top of the chart, and the last ranking being at the bottom.

Does anyone know if this is possible? or of an alternative solution?

like image 596
Timothée HENRY Avatar asked Nov 22 '11 11:11

Timothée HENRY


1 Answers

You can reverse the Y axis to achieve this (see ref)

yAxis: {
    title: {
        text: 'Rank'
    },
    allowDecimals: false,
    reversed: true,
    min: 0.5,
    startOnTick: false,
    endOnTick: false,
    max: 3.5
}

I made a small example resulting in:

Source here: jsfiddle

like image 131
eolsson Avatar answered Nov 01 '22 16:11

eolsson