feat: Update throughput chart data and styling; hide axes and add background pattern
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
||||
PointElement,
|
||||
} from "chart.js";
|
||||
import { PowerIcon, ProductionCapacityIcon } from "../../icons/analysis";
|
||||
import { ThroughputIcon } from "../../icons/3dChartIcons";
|
||||
|
||||
ChartJS.register(LineElement, CategoryScale, LinearScale, PointElement);
|
||||
|
||||
@@ -20,8 +19,8 @@ const ThroughputSummary = () => {
|
||||
};
|
||||
|
||||
const throughputData = {
|
||||
labels: ["08:00", "08:10", "08:20", "08:30", "08:40", "08:50", "09:00"],
|
||||
data: [100, 120, 110, 130, 125, 128, 132],
|
||||
labels: ["08:00", "08:10", "08:20", "08:30", "08:40", "08:50"],
|
||||
data: [5, 10, 8, 10, 12, 10],
|
||||
totalThroughput: 1240,
|
||||
assetUsage: 85,
|
||||
};
|
||||
@@ -56,22 +55,11 @@ const ThroughputSummary = () => {
|
||||
responsive: true,
|
||||
scales: {
|
||||
x: {
|
||||
grid: {
|
||||
display: false,
|
||||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
color: "#fff",
|
||||
},
|
||||
display: false, // hide X axis completely
|
||||
},
|
||||
y: {
|
||||
grid: {
|
||||
display: false,
|
||||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
color: "#fff",
|
||||
},
|
||||
display: false, // hide Y axis completely
|
||||
min: 0, // force Y axis to start at 0
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
@@ -83,6 +71,7 @@ const ThroughputSummary = () => {
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className="production analysis-card">
|
||||
@@ -166,3 +155,5 @@ const ThroughputSummary = () => {
|
||||
};
|
||||
|
||||
export default ThroughputSummary;
|
||||
|
||||
// Can we add dot pattern to background of lineChart and remove axis
|
||||
|
||||
Reference in New Issue
Block a user