]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add ArcElement to getting-started.md (#8174)
authorDavid Turbert <6975084+dcyou@users.noreply.github.com>
Wed, 16 Dec 2020 21:41:19 +0000 (22:41 +0100)
committerGitHub <noreply@github.com>
Wed, 16 Dec 2020 21:41:19 +0000 (16:41 -0500)
* fix: add ArcElement to getting-started.md
* fix: add all possible imports
* fix: add text to integration.md

docs/docs/getting-started/integration.md

index 30fb28efd449634574b7aac4441609c773b5ac17..86f70d30ab78fdd1d909c8190aaa6a0e607e251d 100644 (file)
@@ -24,10 +24,58 @@ 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.
 
+For all available imports see the example below.
 ```javascript
-import { Chart, LineController, LineElement, PointElement, LinearScale, CategoryScale, Title, Tooltip, Filler, Legend } from 'chart.js';
+import {
+  Chart,
+  ArcElement,
+  LineElement,
+  BarElement,
+  PointElement,
+  BarController,
+  BubbleController,
+  DoughnutController,
+  LineController,
+  PieController,
+  PolarAreaController,
+  RadarController,
+  ScatterController,
+  CategoryScale,
+  LinearScale,
+  LogarithmicScale,
+  RadialLinearScale,
+  TimeScale,
+  TimeSeriesScale,
+  Filler,
+  Legend,
+  Title,
+  Tooltip
+} from 'chart.js';
 
-Chart.register(LineController, LineElement, PointElement, LinearScale, CategoryScale, Title, Tooltip, Filler, Legend);
+Chart.register(
+  ArcElement,
+  LineElement,
+  BarElement,
+  PointElement,
+  BarController,
+  BubbleController,
+  DoughnutController,
+  LineController,
+  PieController,
+  PolarAreaController,
+  RadarController,
+  ScatterController,
+  CategoryScale,
+  LinearScale,
+  LogarithmicScale,
+  RadialLinearScale,
+  TimeScale,
+  TimeSeriesScale,
+  Filler,
+  Legend,
+  Title,
+  Tooltip
+);
 
 var myChart = new Chart(ctx, {...});
 ```