Closed gbala2412 closed 1 month ago
I am not able to insert the label 'Total' and resolve the color fade issue, Please correct my code.
`import React, { Component } from 'react'; import Chart from 'react-apexcharts';
class Report extends Component { constructor(props) { super(props); this.state = { options: { colors:['#FF6384', '#36A2EB', '#FFCE56', '#DAF7A6'], legend: { position: 'left' }, labels: ['Status 1', 'Status 2', 'Status 3', 'Status 4'], states: [{ normal: { filter: { type: 'none' } } }], plotOptions: { pie: { donut: { total: { show: true, label: 'Total', color: '#373d3f' } } } } }, series: [44, 17, 41, 55] } }
render() { return ( <div className="chart"> <Chart options={this.state.options} series={this.state.series} type="donut" width="400"/> </div> ); }
}
export default Report; `
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am not able to insert the label 'Total' and resolve the color fade issue, Please correct my code.
`import React, { Component } from 'react'; import Chart from 'react-apexcharts';
class Report extends Component { constructor(props) { super(props);
this.state = { options: { colors:['#FF6384', '#36A2EB', '#FFCE56', '#DAF7A6'], legend: { position: 'left' }, labels: ['Status 1', 'Status 2', 'Status 3', 'Status 4'], states: [{ normal: { filter: { type: 'none' } } }], plotOptions: { pie: { donut: { total: { show: true, label: 'Total', color: '#373d3f' } } } }
}, series: [44, 17, 41, 55] } }
}
export default Report; `