Chartjs-Show annotations for BarGraph using PrimeReact with Chart.js

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);

Leave a comment