move custom_rhino out of plotkit
[dygraphs.git] / plotkit_v091 / tests / quickstart-horiz.html
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">
3 <head>
4 <title>PlotKit: Quickstart Demo</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <link href="/css/page.css" media="screen" rel="Stylesheet"
7 type="text/css" />
8 <link href="tests.css" media="screen" rel="Stylesheet" type="text/css" />
9
10 <script src="/js/mochi/MochiKit.js" type="text/javascript"></script>
11 <script src="/js/plotkit-svn/excanvas.js" type="text/javascript"></script>
12 <script src="/js/plotkit-svn/PlotKit_Packed.js" type="text/javascript"></script>
13 </head>
14
15
16 <body>
17 <div id="body">
18 <h2>Quickstart Demo</h2>
19
20 <div style="margin: 0 auto 0 auto; width: 500px;">
21 <div><canvas id="chart" width="500" height="300"></canvas></div>
22
23 <br/>
24
25 <table id="values" class="data">
26 <thead>
27 <tr><td>x</td><td>y1</td><td>y2</td></tr>
28 </thead>
29 <tbody>
30 <tr><td>0</td><td>0</td><td>3</td></tr>
31 <tr><td>1</td><td>10</td><td>20</td></tr>
32 <tr><td>2</td><td>5</td><td>10</td></tr>
33 <tr><td>3</td><td>6</td><td>7</td></tr>
34 <tr><td>4</td><td>7</td><td>8</td></tr>
35 <tr><td>5</td><td>6</td><td>7</td></tr>
36 <tr><td>6</td><td>7</td><td>8</td></tr>
37 </tbody>
38 </table>
39
40 <script type="text/javascript">
41 var layout = new Layout("bar", {"barOrientation": "horizontal"});
42 layout.addDatasetFromTable("dataset2", $("values"), xcol = 0, ycol = 2);
43 layout.addDatasetFromTable("dataset1", $("values"), xcol = 0, ycol = 1);
44 layout.evaluate();
45
46 var chart = new SweetCanvasRenderer($("chart"), layout);
47 chart.render();
48 </script>
49 </div>
50
51 <div class="footer"><a href="http://www.liquidx.net/plotkit/">PlotKit</a></div>
52 </div>
53 </body></html>