apexcharts / react-apexcharts

📊 React Component for ApexCharts
https://apexcharts.com
MIT License
1.31k stars 155 forks source link

Donut - color fade and total label issue #108

Closed gbala2412 closed 1 month ago

gbala2412 commented 4 years 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; `

github-actions[bot] commented 1 month ago

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.