Chartjs-React js and chart js pie chart type

0👍

Try using react-apexcharts. this lets you create dynamic charts as your wish

0👍

You should make new component with chart.js pie and define props, too.
After receiving data from backend, you would import this component and send this data as props.

<Pie {...this.state.data} />

props: {
   data: Array,
   ....
}

computed() {
   pie() {
      return this.data || [];
   }
}

Leave a comment