JavaScript
var chart = new CanvasJS.Chart("chartContainer",
{
title:{
text: "Heating temperatures"
},
axisX:{
valueFormatString: "DD-MMM-YY HH:mm" ,
labelAngle: -50,
intervalType: "hour"
},
data: [
{
// Readings, begin at "31/12/2014 14:49:00" every 10 mins.
type: "stackedArea",
xValueType: "dateTime",
dataPoints: [
{ x: 1420037340000, y: 18.36 },
{ x: 1420037640000, y: 18.20 },
{ x: 1420037940000, y: 18.20},
{ x: 1420038240000, y: 18.68 },
{ x: 1420038540000, y: 19.01 },
{ x: 1420038840000, y: 18.36 },
{ x: 1420039140000, y: 18.36 },
{ x: 1420039440000, y: 18.36 },
{ x: 1420039740000, y: 18.36 },
{ x: 1420040040000, y: 18.36 }
]
},
{
// Schedule. Once an hour for 24hrs.
// Updated since JS Date() using 0=Jan.
type: "stackedArea",
xValueType: "dateTime",
dataPoints: [
{ x: new Date(14, 11, 31, 0, 0, 0,0), y: 16 },
{ x: new Date(14, 11, 31, 1, 0, 0,0), y: 16 },
{ x: new Date(14, 11, 31, 2, 0, 0,0), y: 16 },
{ x: new Date(14, 11, 31, 3, 0, 0,0), y: 16 },
{ x: new Date(14, 11, 31, 4, 0, 0,0), y: 16 },
{ x: new Date(14, 11, 31, 5, 0, 0,0), y: 16 },
{ x: new Date(14, 11, 31, 6, 0, 0,0), y: 16 },
{ x: new Date(14, 11, 31, 7, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 8, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 9, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 10, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 11, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 12, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 13, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 14, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 15, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 16, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 17, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 18, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 19, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 20, 0, 0,0), y: 19 },
{ x: new Date(14, 11, 31, 21, 0, 0,0), y: 19 },
{ x: new...