0👍
I have a working example:https://stackblitz.com/edit/react-s2tmyz-n1nmzj
You were missing registering the plugin properly.
import React, { useState, useEffect } from 'react';
import { Chart as PrimeChart } from 'primereact/chart';
import { Chart } from 'chart.js';
import annotationPlugin from 'chartjs-plugin-annotation';
Chart.register(annotationPlugin);
- Chartjs-ChartJS get data from Controller
- Chartjs-How change all dates in array into date without time – laravel
Source:stackexchange.com