40๐
โ
High probability primeng still only works with v2 of chart.js since v3 just released this month and had some breaking changes.
Downgrading chart.js to version 2.9.4 should resolve your issue
0๐
Change:
import chart from 'chart.js'
To:
import {chart} from 'chart.js'
0๐
I solved the issue by updating chart.js to 4.4.0 with latest version of ng2-charts
-1๐
Cahnge
import Chart from 'chart.js'
into
import { Chart, registerables } from 'chart.js';
import 'chartjs-adapter-moment'; // or another adapter to avoid moment
Chart.register(...registerables);
from here.
Source:stackexchange.com