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

Added borderDash support for grid lines (#3136) #3142

Merged
merged 4 commits into from
Aug 12, 2016

Conversation

karthikiyengar
Copy link
Contributor

Please let me know if anything else is necessary here and I shall be happy to look into it.

@karthikiyengar
Copy link
Contributor Author

There seems to be a problem with this change. If the borderDash property is set for grid lines, it affects the point borders in the line graph too. Checking this out.

@karthikiyengar
Copy link
Contributor Author

Works after restoring the context once the line is drawn. Pardon my unfamiliarity with canvas drawing. Requesting a review.

context.lineWidth = itemToDraw.glWidth;
context.strokeStyle = itemToDraw.glColor;
if (itemToDraw.glBorderDash) {
Copy link
Member

Choose a reason for hiding this comment

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

this check should also check for the existence of context.setLineDash. On IE 9 and 10 this does not exist.

@etimberg
Copy link
Member

Thanks @karthikiyengar
+1 to merge

CC @simonbrunel @zachpanz88

@panzarino
Copy link
Contributor

👍

@simonbrunel
Copy link
Member

Looks good, +1

@etimberg etimberg merged commit 349a8a3 into chartjs:master Aug 12, 2016
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
* Added borderDash support for grid lines (chartjs#3136)

* Save and restore context to prevent border dash being applied to other elements

* Adds support for borderDashOffset, checks for setLineDash (IE9/IE10)

* Fixes tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants