From b7139dbbef9ae978a5e26029bc1620b54c7652b4 Mon Sep 17 00:00:00 2001 From: Simon Brunel Date: Sun, 6 Jan 2019 15:56:58 +0100 Subject: [PATCH] Use `Chart.min.js` in samples (#5958) 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. --- samples/advanced/data-labelling.html | 131 ------------------- samples/advanced/progress-bar.html | 2 +- samples/charts/area/line-boundaries.html | 2 +- samples/charts/area/line-datasets.html | 2 +- samples/charts/area/line-stacked.html | 2 +- samples/charts/area/radar.html | 2 +- samples/charts/bar/horizontal.html | 2 +- samples/charts/bar/multi-axis.html | 2 +- samples/charts/bar/stacked-group.html | 2 +- samples/charts/bar/stacked.html | 2 +- samples/charts/bar/vertical.html | 2 +- samples/charts/bubble.html | 2 +- samples/charts/combo-bar-line.html | 2 +- samples/charts/doughnut.html | 2 +- samples/charts/line/basic.html | 2 +- samples/charts/line/interpolation-modes.html | 2 +- samples/charts/line/line-styles.html | 2 +- samples/charts/line/multi-axis.html | 2 +- samples/charts/line/point-sizes.html | 2 +- samples/charts/line/point-styles.html | 2 +- samples/charts/line/skip-points.html | 2 +- samples/charts/line/stepped.html | 2 +- samples/charts/pie.html | 2 +- samples/charts/polar-area.html | 2 +- samples/charts/radar-skip-points.html | 2 +- samples/charts/radar.html | 2 +- samples/charts/scatter/basic.html | 2 +- samples/charts/scatter/multi-axis.html | 2 +- samples/legend/point-style.html | 2 +- samples/legend/positioning.html | 2 +- samples/samples.js | 3 - samples/scales/filtering-labels.html | 2 +- samples/scales/gridlines-display.html | 2 +- samples/scales/gridlines-style.html | 2 +- samples/scales/linear/min-max-suggested.html | 2 +- samples/scales/linear/min-max.html | 2 +- samples/scales/linear/step-size.html | 2 +- samples/scales/logarithmic/line.html | 2 +- samples/scales/logarithmic/scatter.html | 2 +- samples/scales/multiline-labels.html | 2 +- samples/scales/non-numeric-y.html | 2 +- samples/scales/time/combo.html | 2 +- samples/scales/time/financial.html | 2 +- samples/scales/time/line-point-data.html | 2 +- samples/scales/time/line.html | 2 +- samples/scales/toggle-scale-type.html | 2 +- samples/scriptable/bar.html | 2 +- samples/scriptable/bubble.html | 2 +- samples/tooltips/border.html | 2 +- samples/tooltips/callbacks.html | 2 +- samples/tooltips/custom-line.html | 2 +- samples/tooltips/custom-pie.html | 2 +- samples/tooltips/custom-points.html | 4 +- samples/tooltips/interactions.html | 2 +- samples/tooltips/positioning.html | 2 +- 55 files changed, 54 insertions(+), 188 deletions(-) delete mode 100644 samples/advanced/data-labelling.html diff --git a/samples/advanced/data-labelling.html b/samples/advanced/data-labelling.html deleted file mode 100644 index 52eb07b8fd3..00000000000 --- a/samples/advanced/data-labelling.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - Labelling Data Points - - - - - - -
- -
- - - - - diff --git a/samples/advanced/progress-bar.html b/samples/advanced/progress-bar.html index b9c72446e59..4736546ba48 100644 --- a/samples/advanced/progress-bar.html +++ b/samples/advanced/progress-bar.html @@ -2,7 +2,7 @@ Animation Callbacks - +