Highcharts yaxis higher values displayed lower

2019-06-23 14:27发布

问题:

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?

回答1:

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