Multi Series Column Chart with 7 Day Simple Moving Average - CanvasJS JavaScript Charts

Multi Series Column Chart with 7 Day Simple Moving Average - 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", {
	title: {
		text: "Multi Series Column Chart with 7 Day Simple Moving Average"
	},
	toolTip: {
		shared: true
	},
	axisY: {
		includeZero: false
	},
	axisX: {
		valueFormatString: "DD-MMM"
	},
	data: [{
		color: "#6D78AD",
		type: "column",
		xValueFormatString: "DD(DDD) MMM",
		yValueFormatString: "#,##0.00",
		name: "Stock 1",
		dataPoints: [
		{x: new Date(2014,05,2 ), y:185.69 },
			{x: new Date(2014,05,3 ), y:184.37 },
			{x: new Date(2014,05,4 ), y:184.51 },
			{x: new Date(2014,05,5 ), y:185.98 },
			{x: new Date(2014,05,6 ), y:186.37 },
			{x: new Date(2014,05,9 ), y:186.22 },
			{x: new Date(2014,05,10), y:184.29 },
			{x: new Date(2014,05,11), y:182.25 },
			{x: new Date(2014,05,12), y:181.22 },
			{x: new Date(2014,05,13), y:182.56 },
			{x: new Date(2014,05,16), y:190.35 },
			{x: new Date(2014,05,17), y:202.26 },
			{x: new Date(2014,05,18), y:240.60 },
			{x: new Date(2014,05,19), y:182.82 },
			{x: new Date(2014,05,20), y:181.55 },
			{x: new Date(2014,05,23), y:200.14 },
			{x: new Date(2014,05,24), y:180.88 },
			{x: new Date(2014,05,25), y:180.72 },
			{x: new Date(2014,05,26), y:180.37 },
			{x: new Date(2014,05,27), y:181.71 }
		]
	},{
		type: "column",
		color: "#51CDA0",
		xValueFormatString: "DD(DDD) MMM",
		yValueFormatString: "#,##0.00",
		name: "Stock 2",
		dataPoints: [
			{x: new Date(2014,05,2 ), y:200.69 },
			{x: new Date(2014,05,3 ), y:160.37 },
			{x: new Date(2014,05,4 ), y:189.51 },
			{x: new Date(2014,05,5 ), y:165.98 },
			{x: new Date(2014,05,6 ), y:196.37 },
			{x: new Date(2014,05,9 ), y:116.22 },
			{x: new Date(2014,05,10), y:154.29 },
			{x: new Date(2014,05,11), y:192.25 },
			{x: new Date(2014,05,12), y:211.22 },
			{x: new Date(2014,05,13), y:132.56 },
			{x: new Date(2014,05,16), y:172.35 },
			{x: new Date(2014,05,17), y:142.26 },
			{x: new Date(2014,05,18), y:193.60 },
			{x: new Date(2014,05,19), y:232.82 },
			{x: new Date(2014,05,20), y:211.55 },
			{x: new...