JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdn.canvasjs.com/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 360px; width: 100%;">
</div>
JavaScript
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer",
{
toolTip: {
shared: true
},
data: [
{
type: "stackedColumn",
showInLegend: true,
yValueFormatString: "# unit",
name: "SHUTDOWN",
dataPoints: [{x: 0, y: 2, label:"ABC437"}]
},
{
type: "stackedColumn",
showInLegend: true,
yValueFormatString: "# unit",
name: "POWERON",
dataPoints: [{x: 0, y: 2, label:"ABC437"}]
},
{
type: "stackedColumn",
showInLegend: true,
yValueFormatString: "# unit",
name: "Functional",
dataPoints: [{x: 1, y: 1, label:"ABC435"}]
},
{
type: "stackedColumn",
showInLegend: true,
yValueFormatString: "# unit",
name: "ERROR`",
dataPoints: [{x: 0, y: 2, label:"ABC437"}]
},
]
});
chart.render();
}