From 3c79d104d97aa7ed25ba4e9fc134809078a2f324 Mon Sep 17 00:00:00 2001 From: David Turbert <6975084+dcyou@users.noreply.github.com> Date: Wed, 16 Dec 2020 22:41:19 +0100 Subject: [PATCH] Add ArcElement to getting-started.md (#8174) * fix: add ArcElement to getting-started.md * fix: add all possible imports * fix: add text to integration.md --- docs/docs/getting-started/integration.md | 52 +++++++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/docs/docs/getting-started/integration.md b/docs/docs/getting-started/integration.md index 30fb28efd..86f70d30a 100644 --- a/docs/docs/getting-started/integration.md +++ b/docs/docs/getting-started/integration.md @@ -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, {...}); ``` -- 2.47.2