import React from "react"; import { Line } from "react-chartjs-2"; import { Chart as ChartJS, LineElement, CategoryScale, LinearScale, PointElement, } from "chart.js"; import { PowerIcon, ProductionCapacityIcon } from "../../icons/analysis"; ChartJS.register(LineElement, CategoryScale, LinearScale, PointElement); const ThroughputSummary = () => { // Define all data internally within the component const timeRange = { startTime: "08:00 AM", endTime: "09:00 AM", }; const throughputData = { labels: ["08:00", "08:10", "08:20", "08:30", "08:40", "08:50"], data: [5, 10, 8, 10, 12, 10], totalThroughput: 1240, assetUsage: 85, }; const energyConsumption = { energyConsumed: 456, unit: "KWH", }; // Dynamic shift data const shiftUtilization = [ { shift: 1, percentage: 30, color: "#F3C64D" }, { shift: 2, percentage: 40, color: "#67B3F4" }, { shift: 3, percentage: 30, color: "#7981F5" }, ]; // Chart data configuration const chartData = { labels: throughputData.labels, datasets: [ { label: "Units/hour", data: throughputData.data, borderColor: "#B392F0", tension: 0.4, pointRadius: 0, // Hide points }, ], }; const chartOptions = { responsive: true, scales: { x: { display: false, // hide X axis completely }, y: { display: false, // hide Y axis completely min: 0, // force Y axis to start at 0 }, }, plugins: { legend: { display: false, }, tooltip: { enabled: true, }, }, }; return (