JSFiddle - React, Tailwind, and code Playground
by canvasjs
HTML
<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<br/><!-- Just so that JSFiddle's Result label doesn't overlap the Chart -->
<div id="chartContainer" style="height: 360px; width: 100%;"></div>
JavaScript
var chart = new CanvasJS.Chart("chartContainer",
{
zoomEnabled: true,
axisX: {
// Comment out the next line to make zoom and pan work
minimum: new Date("2015-10-05")
},
data: [
{
type: "line",
dataPoints: [
{ x: new Date("2015-10-10"), y: 71 },
{ x: new Date("2015-10-11"), y: 55},
{ x: new Date("2015-10-12"), y: 50 },
{ x: new Date("2015-10-13"), y: 65 },
{ x: new Date("2015-10-14"), y: 95 },
{ x: new Date("2015-10-15"), y: 68 },
{ x: new Date("2015-10-16"), y: 28 },
{ x: new Date("2015-10-17"), y: 34 },
{ x: new Date("2015-10-18"), y: 14}
]
}
]
});
chart.render();