From: David Turbert <6975084+dcyou@users.noreply.github.com> Date: Wed, 16 Dec 2020 21:41:19 +0000 (+0100) Subject: Add ArcElement to getting-started.md (#8174) X-Git-Tag: v3.0.0-beta.8~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c79d104d97aa7ed25ba4e9fc134809078a2f324;p=thirdparty%2FChart.js.git 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 --- 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, {...}); ```