JavaScript
var chart = new CanvasJS.Chart("chartContainer", {
zoomEnabled: true,
data: [
{
color: "#8A2BE2",
type: "line",
markerType: "none",
toolTipContent: null,
lineDashType: "longDash",
dataPoints : [
{ 'x': 15, 'y': 80 },
{ 'x': 50, 'y': 80 },
]
},
{
color: "#8A2BE2",
type: "line",
markerType: "none",
toolTipContent: null,
lineDashType: "longDash",
dataPoints : [
{ 'x': 15, 'y': 48 },
{ 'x': 50, 'y': 48 },
]
},
{
color: "#383838",
type: "spline",
dataPoints: [
{ x: 10, y: 71 },
{ x: 20, y: 55},
{ x: 30, y: 50 },
{ x: 40, y: 65 },
{ x: 50, y: 77 },
{ x: 60, y: 68 },
{ x: 70, y: 28 },
{ x: 80, y: 34 },
{ x: 90, y: 14}
]
}],
axisX:{
stripLines:[ {startValue:15, endValue:50, color:"#e6f2f7"},
{value: 15, color:"#add8e6", thickness: 2, label: "15", labelPlacement: "outside", labelAlign: "center", labelBackgroundColor: "#add8e6", labelFontColor: "white", labelFontSize: 18},
{value: 50, color:"#add8e6", thickness: 2, label: "50", labelPlacement: "outside", labelAlign: "center", labelBackgroundColor: "#add8e6", labelFontColor: "white", labelFontSize: 18}],
}
});
chart.render();