UNPKG

chartnew.js

Version:

Simple HTML5 Charts using the canvas element

44 lines (39 loc) 1.16 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="450" width="800"></canvas> <script> var LineData = { labels : ["January","February","March","April","May","June","July"], datasets : [ { strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", data : [250,1.559,1.590,1.581,1.556,1.555,1.540], title : "First data" }, { strokeColor : "rgba(151,187,205,1)", pointColor : "rgba(151,187,205,1)", pointStrokeColor : "#fff", data : [28,1.548,1.540,1.519,1.596,1.527,1.580], title : "Second data" } ] } var opts = { logarithmic: true } window.onload = function() { var myBar = new Chart(document.getElementById("mycanvas").getContext("2d")).Line(LineData,opts); } </script> </body> </html>