JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 360px; width: 100%;"></div>
JavaScript
var liveOpenData=[
{x:new Date( "Fri Jan 01 1960 " + "10:30:00" + " GMT+0530 (IST)"),
y: 20},
{x:new Date( "Fri Jan 01 1960 " + "10:35:00" + " GMT+0530 (IST)"),
y: 20},
{x:new Date( "Fri Jan 01 1960 " + "10:40:00" + " GMT+0530 (IST)"),
y: 20},
{x:new Date( "Fri Jan 01 1960 " + "11:40:00" + " GMT+0530 (IST)"),
y: 20}
]
var chart = new CanvasJS.Chart("chartContainer", {
width: 820,
hieght: 200,
title: {
text: "Live"
},
axisX: {
valueFormatString: "HH:mm:ss",
interval: 1,
intervalType: "minute",
title: "Time",
gridColor: "white",
gridThickness: 0,
labelFontSize: 13
},
axisY: {
title: "Units"
},
dataPointMaxWidth: 20,
data: [{
// color: "#B0D0B0",
toolTipContent: "Time: {x} <br> Opens: <strong>{y} </strong>",
color: "#452323",
type: "column",
dataPoints: liveOpenData
},
]
});
chart.render();