03.html 1.11 KB
<!DOCTYPE HTML>
<html>

<head>
	<meta charset="UTF-8">
	<script>
		window.onload = function () {

			var chart = new CanvasJS.Chart("chartContainer", {
				animationEnabled: true,
				theme: "light2",
				title: {
					text: "Simple Line Chart"
				},
				axisY: {
					includeZero: false
				},
				data: [{
					type: "line",
					dataPoints: [{
							y: 450
						},
						{
							y: 414
						},
						{
							y: 520,
							indexLabel: "highest",
							markerColor: "red",
							markerType: "triangle"
						},
						{
							y: 460
						},
						{
							y: 450
						},
						{
							y: 500
						},
						{
							y: 480
						},
						{
							y: 480
						},
						{
							y: 410,
							indexLabel: "lowest",
							markerColor: "DarkSlateGrey",
							markerType: "cross"
						},
						{
							y: 500
						},
						{
							y: 480
						},
						{
							y: 510
						}
					]
				}]
			});
			chart.render();

		}
	</script>
</head>

<body>
	<div id="chartContainer" style="height: 370px; max-width: 920px; margin: 0px auto;"></div>
	<script src="../../asset/js/canvasjs/canvasjs.min.js"></script>
</body>

</html>