Spline Chart with axisY Maximum - CanvasJS JavaScript Charts

Spline Chart with axisY Maximum - 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: "Spline Chart"
	},
	axisY: {		
		maximum: 2500,
	},
	data: [
{
	type: "spline",

	dataPoints: [
	{ x: new Date(2012, 00, 1), y: 0 },
	{ x: new Date(2012, 01, 1), y: 1999 },
	{ x: new Date(2012, 02, 1), y: 1999 },
	{ x: new Date(2012, 03, 1), y: 1163 },
	{ x: new Date(2012, 04, 1), y: 950 },
	{ x: new Date(2012, 05, 1), y: 1201 },
	{ x: new Date(2012, 06, 1), y: 1186 },
	{ x: new Date(2012, 07, 1), y: 1281 },
	{ x: new Date(2012, 08, 1), y: 1438 },
	{ x: new Date(2012, 09, 1), y: 1305 },
	{ x: new Date(2012, 10, 1), y: 1480 },
	{ x: new Date(2012, 11, 1), y: 1291 }
	]
}

	]
});
  	chart.render();