mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-03 23:14:02 +01:00
Fix import names in integration example (#8039)
This commit is contained in:
committed by
GitHub
parent
effe31166b
commit
d063f654cf
@@ -25,9 +25,9 @@ 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, LineElement, PointElement, LinearScale, CategoryScale, Title, Tooltip, Filler, Legend } from 'chart.js';
|
||||
|
||||
Chart.register(LineController, Line, Point, LinearScale, CategoryScale, Title, Tooltip, Filler, Legend);
|
||||
Chart.register(LineController, LineElement, PointElement, LinearScale, CategoryScale, Title, Tooltip, Filler, Legend);
|
||||
|
||||
var myChart = new Chart(ctx, {...});
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user