dygraphs
Version:
dygraphs is a fast, flexible open source JavaScript charting library.
40 lines (37 loc) • 1.38 kB
HTML
<html>
<head>
<meta charset="UTF-8">
<title>dygraph</title>
<link rel="stylesheet" type="text/css" href="../dist/dygraph.css" />
<link rel="stylesheet" type="text/css" href="../common/vextlnk.css" />
<script type="text/javascript" src="../dist/dygraph.js"></script>
</head>
<body>
<p>Minimal example of a dygraph chart:</p>
<div id="graphdiv"></div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
Dygraph.onDOMready(function onDOMready() {
g = new Dygraph(document.getElementById("graphdiv"),
"Date,Temperature\n" +
"2008-05-07,75\n" +
"2008-05-08,70\n" +
"2008-05-09,80\n");
});
//--><!]]></script>
<p>Same data, specified in a parsed format:</p>
<div id="graphdiv2"></div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
Dygraph.onDOMready(function onDOMready() {
g2 = new Dygraph(document.getElementById("graphdiv2"),
[ [ new Date("2008/05/07"), 75],
[ new Date("2008/05/08"), 70],
[ new Date("2008/05/09"), 80]
],
{
labels: [ "Date", "Temperature" ]
});
});
//--><!]]></script>
</body>
</html>