Highcharts yaxis higher values displayed lower

2019-06-23 13:40发布

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条回答
三岁会撩人
2楼-- · 2019-06-23 14:17

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

查看更多
登录 后发表回答