Add reverse support to category scale#6342
Conversation
|
Added a boundary check at the end of |
|
Just FYI, I did something similar the other day. Handled the reverse thing in core.scale. Its based on layout refactor, so can't PR yet (also not near computer for weekend) |
benmccann
left a comment
There was a problem hiding this comment.
you may also be able to use the new method in scale.linear/logarithmic.getPixelForValue/getValueForPixel
| convertTicksToLabels: function() { | ||
| var me = this; | ||
|
|
||
| me._tickValues = me.ticks.slice(); |
There was a problem hiding this comment.
can we either make this not necessary or add a comment explaining why it's needed? it seems redundant to me that we would store ticks in both ticks and _tickValues
There was a problem hiding this comment.
Comment added. The labels need to be stored because they can be modified by the user callback while getPixelForValue requires the original label value.
|
|
|
@kurkle I'm happy to review your code once the layout refactoring completes. |
4201620 to
7d9f281
Compare
|
Any updates on this ? |
This PR adds
ticks.reversesupport to category scale as well as the refactoring discussed in #6323 (comment).This PR: https://jsfiddle.net/nagix/at8vfh6x/

Closes #3306