-
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
Coloring an axis line separately from gridLines #4058
Conversation
AxisLine color can be set with axisColor option inside gridLines option Add default setting
* Update core.helpers.tests.js * Update scale.category.tests.js * Update scale.linear.tests.js * Update scale.logarithmic.tests.js * Update scale.radialLinear.tests.js * Update scale.time.tests.js
src/core/core.scale.js
Outdated
@@ -730,7 +731,7 @@ module.exports = function(Chart) { | |||
if (gridLines.drawBorder) { | |||
// Draw the line at the edge of the axis | |||
context.lineWidth = helpers.getValueAtIndexOrDefault(gridLines.lineWidth, 0); | |||
context.strokeStyle = helpers.getValueAtIndexOrDefault(gridLines.color, 0); | |||
context.strokeStyle = helpers.getValueAtIndexOrDefault(gridLines.axisColor, 0); |
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'm wondering what's the difference between zeroLineColor
and axisColor
?
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.
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.
Understood :) @etimberg what do you think about the option name axisColor
?
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.
Could we do borderColor
?
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.
Per my earlier comment, I think axisColor
should become borderColor
Solved and extended by #4117 |
Added the axisColor option and its functionality to GridLines options, mentioned in issue #4041
Also updated the axes documentation.