JavaScript
var chart = new CanvasJS.Chart("chartContainer",
{
title:{
//text: "Earthquakes - per month"
},
zoomEnabled: true,
legend: {
verticalAlign: "top",
horizontalAlign: "left"
},
data: [
{
type: "line",
showInLegend: true,
dataPoints: [
{ x: new Date(2012, 0, 1), y: 450 },
{ x: new Date(2012, 01, 1), y: 414 },
{ x: new Date(2012, 02, 1), y: 520 },
{ x: new Date(2012, 03, 1), y: 460 },
{ x: new Date(2012, 04, 1), y: 450 },
{ x: new Date(2012, 05, 1), y: 500 }
]
},
{
type: "line",
showInLegend: true,
dataPoints: [
{ x: new Date(2012, 0, 1), y: 550 },
{ x: new Date(2012, 01, 1), y: 514 },
{ x: new Date(2012, 02, 1), y: 620 },
{ x: new Date(2012, 03, 1), y: 560 },
{ x: new Date(2012, 04, 1), y: 550 },
{ x: new Date(2012, 05, 1), y: 600 }
]
},
{
type: "line",
showInLegend: true,
dataPoints: [
{ x: new Date(2012, 0, 1), y: 650 },
{ x: new Date(2012, 01, 1), y: 614 },
{ x: new Date(2012, 02, 1), y: 720 },
{ x: new Date(2012, 03, 1), y: 660 },
{ x: new Date(2012, 04, 1), y: 650 },
{ x: new Date(2012, 05, 1), y: 700 }
]
},
{
type: "line",
showInLegend: true,
dataPoints: [
{ x: new Date(2012, 0, 1), y: 350 },
{ x: new Date(2012, 01, 1), y: 314 },
{ x: new Date(2012, 02, 1), y: 420 },
{ x: new Date(2012, 03, 1), y: 360 },
{ x: new Date(2012, 04, 1), y: 350 },
{ x: new Date(2012, 05, 1), y: 400 }
]
},
{
type: "line",
showInLegend: true,
dataPoints: [
{ x: new Date(2012, 0, 1), y: 750 },
{ x: new Date(2012, 01, 1), y: 714 },
{ x: new Date(2012, 02, 1), y: 620 },
{ x: new Date(2012, 03, 1), y: 760 },
{ x: new Date(2012, 04, 1), y: 650 },
{ x:...