Forum

Char.js - Uncaught ...
 
Notifications
Clear all

Char.js - Uncaught Error: "linear" is not a registered scale.

1 Posty
1 Users
0 Reactions
11.1 K Widok
0
Topic starter

or

app.js:15051 Uncaught Error: "category" is not a registered scale.
    at Registry._get (app.js:15051)
    at Registry.getScale (app.js:15005)
    at app.js:15647
    at each (app.js:20978)
    at Chart.buildOrUpdateScales (app.js:15634)
    at Chart.update (app.js:15751)
    at new Chart (app.js:15529)
    at Module../resources/js/app.js (app.js:5023)
    at __webpack_require__ (app.js:66622)
    at app.js:66785
1 Answer
0
Topic starter

Based on installation instructions https://www.chartjs.org/docs/latest/getting-started/v3-migration.html

 

how to register Chart.js in right way

import { Chart, LineController, LineElement, PointElement, LinearScale, Title,CategoryScale } from 'chart.js';

Chart.register(LineController, LineElement, PointElement, LinearScale, Title, CategoryScale);

and put this code before </body>

 

Odpowiedź

Author Name

Author Email

Your question *

 
Preview 0 Revisions Saved
Share: