Closed SamirMokiem closed 4 years ago
i have this same problem have you figured it out? i'm trying to work it out now
Not a good solution. But i skipped this repository and i am now using react-chartjs-2. The code i used is this:
import {Pie} from 'react-chartjs-2'
const data = { datasets: [{ data: [this.props.profileComplete, 100 - this.props.profileComplete], backgroundColor: [ '#34AE92', '#E1E1E0' ], }] };
<Pie data={data} height={100} options={{ maintainAspectRatio: false, tooltips: {enabled: false}, hover: {mode: null}, legend: { display: false, } }} />
nice i skipped this repository too and found one that works-- react minimal pie chart
thanks for the quick response
Hi! As I see if you try to display the same data two or more times the only the first gets rendered. My workaround is that i modify the data a little bit.
Closing. Repo is deprecated
When i try to show multiple pie-charts. Only the first one is showing up. I think the problem is that the charts have the same classNames
Here you can see the first one, but not the second one.
Is this a bug. Or do i need to set a prop for the pie-chart?
<PieChart size={100} data={[ {value: 100, color: '#34AE92'}, {value: 100, color: '#E1E1E0'}, ]} /> <PieChart size={100} data={[ {value: 100, color: '#34AE92'}, {value: 100, color: '#E1E1E0'}, ]} />