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