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

Allow canvas patterns instead of colors #2524

Merged
merged 6 commits into from
May 12, 2016
Merged

Conversation

ashiguruma
Copy link
Contributor

As discussed in #1323 it should be possible for canvas patterns to be used instead of colors. Using canvas patterns caused the hover color helper to fail. This update introduces a helper that allows canvas patterns while still maintaining the default hover behaviour for color values.

ashiguruma added 3 commits May 7, 2016 22:24
When a hover background isn't specified in the config for a chart a modified version of the default color is used. If the background color is a CanvasPattern object an error is triggered.

With this change the default background color will no longer be modified if it is a CanvasPattern.
Patterns could be used for style attributes other than background e.g. stroke. Updates  chartjs#1323
Updated all chart types to use the helper.getHoverColor. Pattern fills can now be specified for both fill and line portions of a chart. Updates chartjs#1323
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 75.297% when pulling 04d4add on ashiguruma:master into 64b9510 on chartjs:master.

@etimberg
Copy link
Member

+1 to merge

The core.helpers file was failing linting checks as the global CanvasPattern was not defined. Added the `/* global CanvasGradient */` statement to make linting pass. Updates chartjs#1323
@ashiguruma
Copy link
Contributor Author

Apologies, missed the jshint task.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 75.297% when pulling 44cc68d on ashiguruma:master into 64b9510 on chartjs:master.

The core.helpers file was failing linting checks as the global CanvasPattern was not defined. Added the `/* global CanvasGradient */` statement to make linting pass. Updates chartjs#1323
* 'master' of github.com:ashiguruma/Chart.js:
  Added CanvasPattern global flag for jshint
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 75.297% when pulling a8df9d9 on ashiguruma:master into 64b9510 on chartjs:master.

@etimberg etimberg merged commit 47f770c into chartjs:master May 12, 2016
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.

3 participants