Display problems with charts

UI Components for React
Post Reply
flydeprutten
Posts: 1
Joined: 07 Mar 2023, 17:50

02 Apr 2023, 22:23

Hello everyone.

I have a problem with chart.js. I use primereact's integration by importing primereact/chart into the component that will show the graph. In addition, I have done nothing but install chart.js via npm. When I load the page there is no graph in 50% of the cases. In the other 50% it comes as it should. If Vite updates the page, the graph will always be included. There are no error messages in the console and I can see that it generates the casvas regardless of whether it displays a graph or not.

I don't know if I integrate chart.js correctly. To me it looks like a problem with the order of code being loaded. Does anyone know what the problem could be?

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

09 Apr 2023, 18:46

I would check the F12 browser console and look for JS errors.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: Charlestecak and 9 guests