Integration with built-in charts and Google Charts using PrimeReact
P粉458913655
P粉458913655 2023-09-06 14:54:13
0
1
561

I'm using primereact and react-google-charts. However, they all require me to call the components Charts. When I write a chart, an error occurs. What solution should I follow?

(https://i.stack.imgur.com/4qGie.png)(https://i.stack.imgur.com/5dpNr.png)

I tried to call the component chart, but VSCode reported an error. Then I tried calling it Gantt but I got the above error.

P粉458913655
P粉458913655

reply all(1)
P粉563446579

You can use import alias

import {Chart as GoogleChart} from 'react-google-charts';
import {Chart as PrimeChart} from 'primereact';

Now you can use GoogleChart and PrimeChart anywhere

<GoogleChart />
<PrimeChart />
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!