JavaScript
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
theme: "light1", // "light2", "dark1", "dark2"
animationEnabled: false, // change to true
title:{
text: "Shading Evening Hours"
},
axisX:{
gridThickness: 1,
valueFormatString: "H:mm" ,
interval: 1,
intervalType: "hour",
labelAngle: -50,
labelFontSize: 9,
stripLines: [
{
startValue: new Date(2012,1,1,0,0,0),
endValue: new Date(2012,1,1,7,0,0),
color: "lightblue"
},
{
startValue: new Date(2012,1,1,19,0,0),
endValue: new Date(2012,1,2,7,0,0),
color: "lightblue"
},
{
startValue: new Date(2012,1,2,19,0,0),
endValue: new Date(2012,1,3,7,0,0),
color: "lightblue"
},
]
},
axisY: {
title: "Mbps",
yValueFormatString: "#,##0.##\"%\"",
},
data: [
{
// Change type to "bar", "area", "spline", "pie",etc.
type: "line",
dataPoints: [
{ x: new Date(2012, 01, 1, 1, 0, 0), y: 27},
{ x: new Date(2012, 01, 1, 2, 0, 0), y: 44},
{ x: new Date(2012, 01, 1, 3, 0, 0), y: 12},
{ x: new Date(2012, 01, 1, 4, 0, 0), y: 23},
{ x: new Date(2012, 01, 1, 5, 0, 0), y: 23},
{ x: new Date(2012, 01, 1, 6, 0, 0), y: 41},
{ x: new Date(2012, 01, 1, 7, 0, 0), y: 34},
{ x: new Date(2012, 01, 1, 8, 0, 0), y: 50},
{ x: new Date(2012, 01, 1, 9, 0, 0), y: 48},
{ x: new Date(2012, 01, 1, 10, 0, 0), y: 7},
{ x: new Date(2012, 01, 1, 11, 0, 0), y: 27},
{ x: new Date(2012, 01, 1, 12, 0, 0), y: 30},
{ x: new Date(2012, 01, 1, 13, 0, 0), y: 26},
{ x: new Date(2012, 01, 1, 14, 0, 0), y: 8},
{ x: new Date(2012, 01, 1, 15, 0, 0), y: 18},
{ x: new Date(2012, 01, 1, 16, 0, 0), y: 45},
{ x: new...