Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

Zamaroth
Copy link

Added the axisColor option and its functionality to GridLines options, mentioned in issue #4041
Also updated the axes documentation.

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
@@ -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);
Copy link
Member

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zeroLineColor affects only the line at 0, which could be in the middle of the graph(e.g. min: -20, max: 20) or not displayed at all(e.g. min: 50, max: 100).
axisColor is always the border line near ticks

also zeroLineColor affects the other axis(see pic)
axiscolor_zerolinecolor demonstartion

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we do borderColor ?

Copy link
Member

@etimberg etimberg left a 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

@Zamaroth
Copy link
Author

Zamaroth commented Apr 6, 2017

Solved and extended by #4117

@Zamaroth Zamaroth closed this Apr 6, 2017
@simonbrunel simonbrunel removed this from the Version 2.6 milestone May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants