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

Use Chart.min.js in samples #5958

Merged
merged 1 commit into from
Jan 6, 2019

Conversation

simonbrunel
Copy link
Member

Samples are supposed to show good practices and in most cases we don't use the time scale but require Chart.bundle.js, which is not correct. Instead, we should require the non-bundled version in its minified version (Chart.min.js). Paradoxically, time based examples don't use Chart.bundle.js but require moment manually side to Chart.min.js, which IMO is also the correct way since it allows users to configure and use moment globally (TZ, locales, etc.) and doesn't enforce a specific moment version.

Also remove the data-labelling.html example because we now have an official plugin that implements this feature and don't want to deal with user custom code anymore.

Samples are supposed to show good practices and in most cases we don't use the time scale but require `Chart.bundle.js`, which is not correct. Instead, we should require the non-bundled version in its minified version (`Chart.min.js`). Paradoxically, time based examples don't use `Chart.bundle.js` but require moment manually side to `Chart.min.js`, which IMO is also the correct way since it allows users to configure and use moment globally (TZ, locales, etc.) and doesn't enforce a specific moment version.

Also remove the `data-labelling.html` example because we now have an [official plugin](https://github.com/chartjs/chartjs-plugin-datalabels) that implements this feature and don't want to deal with user custom code anymore.
@etimberg etimberg merged commit b7139db into chartjs:master Jan 6, 2019
@simonbrunel simonbrunel deleted the chore/cleanup-samples-import branch January 6, 2019 17:39
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
Samples are supposed to show good practices and in most cases we don't use the time scale but require `Chart.bundle.js`, which is not correct. Instead, we should require the non-bundled version in its minified version (`Chart.min.js`). Paradoxically, time based examples don't use `Chart.bundle.js` but require moment manually side to `Chart.min.js`, which IMO is also the correct way since it allows users to configure and use moment globally (TZ, locales, etc.) and doesn't enforce a specific moment version.

Also remove the `data-labelling.html` example because we now have an [official plugin](https://github.com/chartjs/chartjs-plugin-datalabels) that implements this feature and don't want to deal with user custom code anymore.
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