JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div class="w3-container" style="border:2px solid #f76707; border-radius:5px">
<div class="w3-col-row">
<div class="w3-col w3-container" style="width:25%">
Performance Report
</div>
<div class="w3-col w3-yellow w3-container" style="width:25%">
Supervisor
</div>
<div class="w3-col w3-container" style="width:25%">
Mark Hanson
</div>
</div>
<div class="w3-row">
<div class="w3-col w3-yellow w3-container" style="width:16%">
Employee Name
</div>
<div class="w3-col w3-container" style="width:16%">
Mark Smith
</div>
<div class="w3-col w3-yellow w3-container" style="width:16%">
Department
</div>
<div class="w3-col w3-container" style="width:16%">
Bay 4
</div>
<div class="w3-col w3-yellow w3-container" style="width:16%">
Shift
</div>
<div class="w3-col w3-container" style="width:16%">
2
</div>
</div>
<div class="w3-row">
<div class="w3-col w3-yellow w3-container" style="width:25%">
4th Quarter Report
</div>
<div class="w3-col w3-yellow w3-container" style="width:25%">
10/1/2023 - 12/31/2023
</div>
</div>
</div>
<div class="w3-container" style="border:2px solid #f76707; border-radius:5px">
<div class="w3-row w3-container">
<div class="w3-col w3-container detail-line" style="width:45%">
<div class="w3-col w3-yellow w3-container detail-line" style="width:33%">
...
CSS
.detail-line {
border-style: solid;
border-width: 1px;
}
.chart-area {
border-style: solid;
border-width: 1px;
}
JavaScript
var theContainer = $("#ProductivityChartContainer");
var theContainerParent = theContainer.parent();
var theContainerGrandparent = theContainerParent.parent();
var theHeight = theContainerGrandparent.height();
var chart1 = new CanvasJS.Chart("ProductivityChartContainer", {
title: {
text: "Productivity"
},
height: theHeight,
data: [{
type: "column",
dataPoints: [
{ label: "Utilization", y: 85 },
{ label: "Utilization Goal", y: 89 },
{ label: "Lost Time", y: 0 },
{ label: "Lost Time Goal", y: 10 }
]
}]
});
theContainer = $("#QualityChartContainer");
theContainerParent = theContainer.parent();
theContainerGrandparent = theContainerParent.parent();
theHeight = theContainerGrandparent.height();
var chart2 = new CanvasJS.Chart("QualityChartContainer", {
title: {
text: "Quality"
},
height: theHeight,
data: [{
type: "column",
dataPoints: [
{ label: "NCNs", y: 10 },
{ label: "NCNs Goal", y: 15 },
{ label: "Cost", y: 25 },
{ label: "Cost Goal", y: 30 },
{ label: "Suggestions", y: 25 },
{ label: "Suggestions Goal", y: 30 }
]
}]
});
theContainer = $("#SafetyChartContainer");
theContainerParent = theContainer.parent();
theContainerGrandparent = theContainerParent.parent();
theHeight = theContainerGrandparent.height();
var chart3 = new CanvasJS.Chart("SafetyChartContainer", {
title: {
text: "Safety"
},
height: theHeight,
data: [{
type:...