JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://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", {
title:{
text: "Basic Column Chart"
},
axisX: {
labelAngle: 90,
stripLines: [{
value: new Date("2014-01-15"),
thickness: 0,
label: "—————",
labelBackgroundColor: "transparent",
labelPlacement: "outside",
labelFontColor: "#333",
color: "#333"
},{
value: new Date("2014-04-15"),
thickness: 0,
label: "—————",
labelBackgroundColor: "transparent",
labelPlacement: "outside",
labelFontColor: "#222",
color: "#222"
}]
},
data: [{
dataPoints: [
{ x: new Date("2014-01-01"), y: 71 },
{ x: new Date("2014-02-01"), y: 55},
{ x: new Date("2014-03-01"), y: 50 },
{ x: new Date("2014-04-01"), y: 65 },
{ x: new Date("2014-05-01"), y: 95 },
{ x: new Date("2014-06-01"), y: 68 },
{ x: new Date("2014-07-01"), y: 28 },
{ x: new Date("2014-08-01"), y: 34 },
{ x: new Date("2014-09-01"), y: 14}
]
}]
});
chart.render();