Chart.js: Reversing xAxes ticks doesn't seem to work.

Created on 14 Sep 2016  ·  5Comments  ·  Source: chartjs/Chart.js

Hi, I'm able to reverse the yAxes, but not the xAxes. Are the specs different for the xAxes?

See sample code: https://jsfiddle.net/marineboudeau/4awme3fp/3.

And the part of the code I'm talking about:

options: {
        scales: {
            yAxes: [{
                ticks: {
                    reverse: true, // this works
                    beginAtZero:true
                }
            }],
            xAxes: [{
                ticks: {
                    reverse: true, // this doesn't seem to work
                    beginAtZero: true
                }
            }]
        }
    }
help wanted enhancement

Most helpful comment

Hi! I have the same issue here. Reverse works on the y axes but not on x. Is there any news on this or a workaround? Thank you!

All 5 comments

@marineb i can't remember if the reverse setting only works for numeric axes or not. This needs some investigation before triaging as eithe a bug or enhancement.

Thanks @etimberg! I created a new fiddle with numeric axes and it still doesn't seem to work. https://jsfiddle.net/marineboudeau/4awme3fp/6.

I'll reverse them programmatically in the meantime. Thanks!

Hi! I have the same issue here. Reverse works on the y axes but not on x. Is there any news on this or a workaround? Thank you!

Also having the same problem here, would appreciate any help or update on the issue!

Any updates on this ?
I see that if the Y-Axis consists of numbers then setting the reversed flags works. But if the Y-Axis consists of letters than the reversed does not work.

Was this page helpful?
0 / 5 - 0 ratings