SelimSezer
SelimSezer

Reputation: 39

PrimeReact using built in Charts and Google Charts together

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

(https://i.sstatic.net/4qGie.png)(https://i.sstatic.net/5dpNr.png)

I tried calling the components as chart VSCode gave an error. Then I tried as Gantt and got the above error

Upvotes: 1

Views: 122

Answers (1)

jagjeet
jagjeet

Reputation: 595

you can use import aliases

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

now use GoogleChart and PrimeChart wherever you want

<GoogleChart />
<PrimeChart />

Upvotes: 2

Related Questions