-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle reverse support in core.scale #6343
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't really reviewed yet. I like the idea that we could handle reverse
in core.scale
. It seems like some of the scales still know about reverse
though? E.g. I would have expected if all the logic is being done in core.scale
that this PR would be removing reverse
from scale.time
This comment has been minimized.
This comment has been minimized.
Chart.js/src/core/core.scale.js Lines 73 to 75 in 97f819d
lineValue -= Math.max(lineValue - scale._start, scale._end - lineValue); Also, Chart.js/src/core/core.scale.js Line 1137 in 97f819d
Chart.js/src/core/core.scale.js Line 1146 in 97f819d
scaleLabelX = me.left + me.width / 2; // midpoint of the width scaleLabelY = me.top + me.height / 2; |
Updated, all comments should be resolved. |
Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. just had one last question
* Move log10 from core.helpers to helpers.math * Refactor scales
_configure
scales after placing themticks.reverse
ingetPixelForDecimal
getDecimalForPixel
getPixelForDecimal
and_configure
results in scales-472-403 bytes (much of this by moving helpers.log10)Doing essentially the same thing as #6342, just a bit more abstractly.
Forked fiddle (notice
horizontalBar
reverse is reversed compared to 6342)Closes #3306
Closes #6342