Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Reversing xAxes ticks doesn't seem to work.

Open marineb opened this issue 10 years ago • 5 comments

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
                }
            }]
        }
    }

marineb avatar Sep 14 '16 16:09 marineb

@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.

etimberg avatar Sep 14 '16 17:09 etimberg

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!

marineb avatar Sep 14 '16 17:09 marineb

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!

barothiz avatar Jun 20 '17 13:06 barothiz

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

AndrewNg avatar Oct 24 '18 04:10 AndrewNg

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.

DevidCIC avatar Jul 29 '19 14:07 DevidCIC