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

Make Chart.defaults/Ticks/Interaction importable #4512

Merged
merged 1 commit into from
Jul 16, 2017

Conversation

simonbrunel
Copy link
Member

Default options can now be accessed by importing core/core.defaults. The returned object acts as a singleton and is populated when importing classes that expose their own default values (meaning that importing only code.defaults results in an empty object). Also make Chart.Ticks and Chart.Interaction importable since existing defaults rely on these values.

Add the defaults._set method that make easier declaring new defaults by merging given values with existing ones for a specific scope (global, scale, bar, etc).

Relates to #4478

Default options can now be accessed by importing `core/core.defaults`. The returned object acts as a singleton and is populated when importing classes that expose their own default values (meaning that importing only `code.defaults` results in an empty object). Also make `Chart.Ticks` and `Chart.Interaction` importable since existing defaults rely on these values.

Add the `defaults._set` method that make easier declaring new defaults by merging given values with existing ones for a specific scope (`global`, `scale`, `bar`, etc).
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.

looks good to me

@simonbrunel simonbrunel merged commit 889ecd5 into chartjs:master Jul 16, 2017
@simonbrunel simonbrunel deleted the defaults-modules branch July 16, 2017 17:38
yofreke pushed a commit to yofreke/Chart.js that referenced this pull request Dec 30, 2017
Default options can now be accessed by importing `core/core.defaults`. The returned object acts as a singleton and is populated when importing classes that expose their own default values (meaning that importing only `code.defaults` results in an empty object). Also make `Chart.Ticks` and `Chart.Interaction` importable since existing defaults rely on these values.

Add the `defaults._set` method that make easier declaring new defaults by merging given values with existing ones for a specific scope (`global`, `scale`, `bar`, etc).
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
Default options can now be accessed by importing `core/core.defaults`. The returned object acts as a singleton and is populated when importing classes that expose their own default values (meaning that importing only `code.defaults` results in an empty object). Also make `Chart.Ticks` and `Chart.Interaction` importable since existing defaults rely on these values.

Add the `defaults._set` method that make easier declaring new defaults by merging given values with existing ones for a specific scope (`global`, `scale`, `bar`, etc).
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.

2 participants