|  | @@ -4,6 +4,7 @@ import { Container, Row, Col, Card, CardHeader, CardBody } from "reactstrap";
 | 
	
		
			
				|  |  |  import { connect } from "react-redux";
 | 
	
		
			
				|  |  |  import { jumlahLaporan } from "@/actions/pelaporan";
 | 
	
		
			
				|  |  |  import dynamic from "next/dynamic";
 | 
	
		
			
				|  |  | +import { getjumlahStatusLaporan } from "../../actions/graph";
 | 
	
		
			
				|  |  |  const ReactApexChart = dynamic(() => import("react-apexcharts"), { ssr: false });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -11,7 +12,7 @@ class ChartRadarA extends React.Component {
 | 
	
		
			
				|  |  |      constructor(props) {
 | 
	
		
			
				|  |  |          super(props);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        this.radar = {
 | 
	
		
			
				|  |  | +        this.state = {
 | 
	
		
			
				|  |  |              series: [{
 | 
	
		
			
				|  |  |                  name: 'Penjadwalan Evaluasi',
 | 
	
		
			
				|  |  |                  data: [8, 5, 3, 4, 5, 1, 6, 8, 3, 9, 5, 2, 9, 6, 4, 2],
 | 
	
	
		
			
				|  | @@ -23,7 +24,6 @@ class ChartRadarA extends React.Component {
 | 
	
		
			
				|  |  |                  data: [4, 6, 8, 5, 7, 5, 6, 8, 9, 4, 3, 2, 4, 5, 6, 7],
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              ],
 | 
	
		
			
				|  |  | -            colors: ['#1ab7ea', '#0084ff', '#39539E', '#0077B5'],
 | 
	
		
			
				|  |  |              options: {
 | 
	
		
			
				|  |  |                  chart: {
 | 
	
		
			
				|  |  |                      height: 150,
 | 
	
	
		
			
				|  | @@ -48,12 +48,29 @@ class ChartRadarA extends React.Component {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          };
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +    async componentDidMount() {
 | 
	
		
			
				|  |  | +        const { token } = this.props;
 | 
	
		
			
				|  |  | +        const data = await getjumlahStatusLaporan(this.props.token);
 | 
	
		
			
				|  |  | +        this.setState((prevState) => ({
 | 
	
		
			
				|  |  | +            ...prevState,
 | 
	
		
			
				|  |  | +            series: [{ data: data.data.map((e) => e.jumlah_jadwal_evaluasi), name: "penjadwalan Evaluasi" }
 | 
	
		
			
				|  |  | +                , { data: data.data.map((e) => e.jumlah_pemeriksaan), name: "Pemeriksaan" },
 | 
	
		
			
				|  |  | +            { data: data.data.map((e) => e.jumlah_sanksi), name: "sanksi" }],
 | 
	
		
			
				|  |  | +            options: {
 | 
	
		
			
				|  |  | +                ...prevState,
 | 
	
		
			
				|  |  | +                xaxis: {
 | 
	
		
			
				|  |  | +                    categories: data.data.map((data) => data.pembina.name),
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +        }));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      render() {
 | 
	
		
			
				|  |  |          return (
 | 
	
		
			
				|  |  |              <Card className="card-default">
 | 
	
		
			
				|  |  |                  <CardBody>
 | 
	
		
			
				|  |  |                      <div id="chart">
 | 
	
		
			
				|  |  | -                        <ReactApexChart options={this.radar.options} series={this.radar.series} type="radar" height={400} />
 | 
	
		
			
				|  |  | +                        <ReactApexChart options={this.state.options} series={this.state.series} type="radar" height={400} />
 | 
	
		
			
				|  |  |                      </div>
 | 
	
		
			
				|  |  |                  </CardBody>
 | 
	
		
			
				|  |  |              </Card>
 |