1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
4 <title>PlotKit: Debug
</title>
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <link href=
"/css/page.css" media=
"screen" rel=
"Stylesheet"
8 <link href=
"tests.css" media=
"screen" rel=
"Stylesheet" type=
"text/css" />
9 <script src=
"/js/mochi/MochiKit.js" type=
"text/javascript"></script>
10 <script src=
"/js/plotkit-svn/excanvas.js" type=
"text/javascript"></script>
11 <script src=
"/js/plotkit-svn/Base.js" type=
"text/javascript"></script>
12 <script src=
"/js/plotkit-svn/Layout.js" type=
"text/javascript"></script>
13 <script src=
"/js/plotkit-svn/Canvas.js" type=
"text/javascript"></script>
14 <script src=
"/js/plotkit-svn/SweetCanvas.js" type=
"text/javascript"></script>
23 <div style=
"margin: 0 auto 0 auto; width: 500px;">
24 <div><canvas id=
"chart" width=
"500" height=
"300"></canvas></div>
26 <script type=
"text/javascript">
28 "padding": {left:
20, right:
0, top:
10, bottom:
30},
32 function drawGraph() {
35 "xOriginIsZero" : false,
36 "xTicks" : [ {v:
0}, {v:
1}, {v:
2}, {v:
3}, {v:
4}, {v:
5} ],
38 "yOriginIsZero" : false,
39 "yTicks" : [ {v:
0}, {v:
1}, {v:
2}, {v:
3}, {v:
4}, {v:
5} ]
41 var layout = new PlotKit.Layout(
"line", layoutOptions);
42 layout.addDataset(
"myDataset", [ [
1,
1], [
2,
2], [
3,
3], [
4,
4] ]);
45 var canvas = MochiKit.DOM.getElement(
"chart");
46 var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
49 MochiKit.DOM.addLoadEvent(drawGraph);
54 <div class=
"footer"><a href=
"http://www.liquidx.net/plotkit/">PlotKit
</a></div>