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", {
axisY:{
maximum: 45,
minimum: -45,
stripLines: [{value: -45, label: -45, labelPlacement: "outside", color:"black",labelFontColor:"black", labelBackgroundColor:"transparent"},
{value: 45, label: 45, labelPlacement: "outside", color:"black",labelFontColor:"black", labelBackgroundColor:"transparent"}]
},
data: [
{
type: "column",
dataPoints: [
{ x: 10, y: 21 },
{ x: 20, y: 34 },
{ x: 30, y: 23 },
{ x: 40, y: 36 },
{ x: 50, y: 13 },
{ x: 60, y: 28 },
{ x: 70, y: 28 },
{ x: 80, y: 34 },
{ x: 90, y: 14 }
]
}
]
});
chart.render();