UNPKG

chartnew.js

Version:

Simple HTML5 Charts using the canvas element

43 lines (39 loc) 1.18 kB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="generator" content="PSPad editor, www.pspad.com"> <title></title> <!--[if lte IE 8]><SCRIPT src='source/excanvas.js'></script><![endif]--><SCRIPT src='../ChartNew.js'></script> </head> <body> <canvas id="mycanvas" height="600" width="800"></canvas> <script> var LineData = { labels : ["January","February","March","April","May","June","July"], datasets : [ { fillColor : "rgba(129, 172, 123, 0.5)", strokeColor : "rgba(129, 172, 123, 1)", pointColor : "rgba(129, 172, 123, 1)", pointStrokeColor : "#fff", data : [30,44,42,-90,90,-37,20], title : "line 1" }, { fillColor : "rgba(159, 90, 90, 0.5)", strokeColor : "rgba(159, 90, 90, 1)", pointColor : "rgba(159, 90, 90, 1)", pointStrokeColor : "#fff", data : [65,59,90,81,56,55,40], title : "Line 2" } ] } var opts= {}; window.onload = function() { var myBar = new Chart(document.getElementById("mycanvas").getContext("2d")).Line(LineData,opts); } </script> </body> </html>