Range Area Chart to represent threshold region - CanvasJS JavaScript Charts

Range Area Chart to represent threshold region - CanvasJS JavaScript Charts

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",
	{
  axisY:{
  	minimum:-100
  },
	data: [
		{//dataseries to represent threshold
			type: "rangeArea",
      toolTipContent: "<b>{x}:</b> {y[1]}",
      markerSize:0,
			dataPoints: [ 
      	{ x: 0, y: [-100, 25] },
				{ x: 10, y: [-100, 30] },
				{ x: 20, y: [-100, -28] },
				{ x: 30, y: [-100, 32] },
				{ x: 40, y: [-100, -80] },
				{ x: 50, y: [-100, 28] }
			]
			}
		]
	});
	chart.render();