]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix import statement in docs (#7653)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Mon, 20 Jul 2020 19:54:46 +0000 (12:54 -0700)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2020 19:54:46 +0000 (15:54 -0400)
docs/docs/getting-started/integration.md
docs/docs/getting-started/v3-migration.md

index 0cd9bf4560a180f6ad923b2910167f379b31fb02..773e1c6890f8fcc88894c1e32e64768c3940506e 100644 (file)
@@ -25,7 +25,7 @@ var myChart = new Chart(ctx, {...});
 Chart.js 3 is tree-shakeable, so it is necessary to import and register the controllers, elements, scales and plugins you are going to use.
 
 ```javascript
-import Chart, LineController, Line, Point, LinearScale, CategoryScale, Title, Tooltip, Filler, Legend from 'chart.js';
+import { Chart, LineController, Line, Point, LinearScale, CategoryScale, Title, Tooltip, Filler, Legend } from 'chart.js';
 
 Chart.register(LineController, Line, Point, LinearScale, CategoryScale, Title, Tooltip, Filler, Legend);
 
index 102808e6845cdc6ae3af73c4293e87821e53b0c5..f45c42d0623bbb86fefb38f94f1277db7041a5db 100644 (file)
@@ -24,7 +24,7 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released
 * Chart.js 3 is tree-shakeable. So if you are using it as an `npm` module in a project, you need to import and register the controllers, elements, scales and plugins you want to use. You will not have to call `register` if importing Chart.js via a `script` tag, but will not get the tree shaking benefits in this case. Here is an example of registering components:
 
 ```javascript
-import Chart, LineController, Line, Point, LinearScale, Title from `chart.js`
+import { Chart, LineController, Line, Point, LinearScale, Title } from `chart.js`
 
 Chart.register(LineController, Line, Point, LinearScale, Title);