JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<body>
<div style="overflow: auto; width: 500px; height: 500px">
<div id="chartContainer" style="height: 550px; width: 1000px;">
</div>
</div>
</body>
JavaScript
var chart = new CanvasJS.Chart("chartContainer",
{
title: {
text: "Delhi Temperature (1 Apr - 7 Apr) 2014"
},
axisY: {
includeZero: false,
interval: 2,
valueFormatString: "#0.## °C"
},
axisX: {
interval: 1,
valueFormatString: "DD-MMM"
},
data: [
{
type: "rangeBar",
yValueFormatString: "#0.## °C",
dataPoints: [
{x: new Date(2014,03,1), y: [ 17,33]},
{x: new Date(2014,03,2), y: [ 18,35]},
{x: new Date(2014,03,3), y: [ 18,32]},
{x: new Date(2014,03,4), y: [ 18,32]},
{x: new Date(2014,03,5), y: [ 20,35]},
{x: new Date(2014,03,6), y: [ 20,38]},
{x: new Date(2014,03,7), y: [ 21,32]}
]
}
]
});
chart.render();