Stripline on Axis Y - CanvasJS
Stripline on Axis Y
by canvasjs
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: "Stripline on Axis Y"
},
axisX:{
valueFormatString: "####"
},
axisY:{
stripLines:[
{
value:0,
//thickness:3
}
]
},
data: [
{
type: "line",
color: "rgba(83, 223, 128, .6)",
dataPoints: [
{ x: 1910, y: -100000 },
{ x: 1920, y: -90000 },
{ x: 1930, y: 1700},
{ x: 1940, y: 25000},
{ x: 1950, y: -40000},
{ x: 1960, y: 1400},
{ x: 1970, y: 250000},
{ x: 1980, y: 1800},
{ x: 1990, y: -200000}
]
}
]
});
chart.render();