| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 | 
							- import FlotChart from "@/components/Charts/Flot.js";
 
- function CaseProgress({ data, user }) {
 
- 	console.log(data);
 
- 	const ChartPie = {
 
- 		data: [
 
- 			{
 
- 				label: "Ditindaklanjuti DIKTI",
 
- 				color: "#287DAD",
 
- 				data: data.jumlah_laporan.dikti,
 
- 			},
 
- 			{
 
- 				label: "Ditindaklanjuti LLDIKTI",
 
- 				color: "#52D489",
 
- 				data: data.jumlah_laporan.lldikti,
 
- 			},
 
- 			{
 
- 				label: "Ditutup",
 
- 				color: "#FD4233",
 
- 				data: data.jumlah_laporan.ditutup,
 
- 			},
 
- 		],
 
- 		options: {
 
- 			series: {
 
- 				pie: {
 
- 					show: true,
 
- 					innerRadius: 0,
 
- 					label: {
 
- 						show: true,
 
- 						radius: 0.8,
 
- 						formatter: function (label, series) {
 
- 							return (
 
- 								'<div class="flot-pie-label">' +
 
- 								//label + ' : ' +
 
- 								Math.round(series.percent) +
 
- 								"%</div>"
 
- 							);
 
- 						},
 
- 						background: {
 
- 							opacity: 0.8,
 
- 							color: "#222",
 
- 						},
 
- 					},
 
- 				},
 
- 			},
 
- 		},
 
- 	};
 
- 	const ChartBar = {
 
- 		data: [
 
- 			{
 
- 				// "label": "Complete",
 
- 				color: "#5ab1ef",
 
- 				data: [["Ditindaklanjuti DIKTI", data.jumlah_laporan.dikti]],
 
- 			},
 
- 			{
 
- 				// "label": "In Progress",
 
- 				color: "#f5994e",
 
- 				data: [["Ditindaklanjuti LLDIKTI", data.jumlah_laporan.lldikti]],
 
- 			},
 
- 			{
 
- 				// "label": "Cancelled",
 
- 				color: "#d87a80",
 
- 				data: [["Ditutup", data.jumlah_laporan.ditutup]],
 
- 			},
 
- 		],
 
- 		options: {
 
- 			series: {
 
- 				bars: {
 
- 					align: "center",
 
- 					lineWidth: 0,
 
- 					show: true,
 
- 					barWidth: 0.2,
 
- 					fill: 0.9,
 
- 				},
 
- 			},
 
- 			grid: {
 
- 				borderColor: "#eee",
 
- 				borderWidth: 1,
 
- 				hoverable: true,
 
- 				backgroundColor: "#fcfcfc",
 
- 			},
 
- 			tooltip: true,
 
- 			tooltipOpts: {
 
- 				content: (label, x, y) => x + " : " + y,
 
- 			},
 
- 			xaxis: {
 
- 				tickColor: "#fcfcfc",
 
- 				mode: "categories",
 
- 			},
 
- 			yaxis: {
 
- 				// position: 'right' or 'left'
 
- 				tickColor: "#eee",
 
- 			},
 
- 			shadowSize: 0,
 
- 		},
 
- 	};
 
- 	return (
 
- 		<div className="card b">
 
- 			<div className="card-body bb">
 
- 				<div className="header-1">
 
- 					<h2 className="card-title-1">Perkembangan</h2>
 
- 				</div>
 
- 				<div className="w-401">
 
- 					<FlotChart options={ChartBar.options} data={ChartBar.data} className="flot-chart" height="200px" />
 
- 					{/* <MorrisChart type={'Bar'} id="morris-bar" data={chartdata} options={barOptions} /> */}
 
- 				</div>
 
- 			</div>
 
- 			<div className="card-body">
 
- 				<div className="header-1">
 
- 					<h2 className="card-title-1">Rekapitulasi</h2>
 
- 				</div>
 
- 				<FlotChart options={ChartPie.options} data={ChartPie.data} className="flot-chart" height="250px" />
 
- 			</div>
 
- 		</div>
 
- 	);
 
- }
 
- export default CaseProgress;
 
 
  |