Commits

Anonymous committed 5e44e0b

Added another chart to example.

Comments (0)

Files changed (1)

examples/barTest2.html

   <script language="javascript" type="text/javascript" src="../src/jquery.jqplot.js"></script>
   <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.barRenderer.js"></script>
   <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.categoryAxisRenderer.js"></script>
+  <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.cursor.js"></script>
   <!-- END: load jqplot -->
 
   <style type="text/css">
     });
   });
   </script>
+  
+  <script class="code" type="text/javascript">
+  $(document).ready(function(){
+    var s1 = [[2006, 850], [2007, 960], [2008, 700], [2009, 600], [2010, 700], [2011, 900]];
+
+    plot2 = $.jqplot('chart2', [s1], {
+      cursor: {
+        show: true,
+        zoom: true
+      },
+      seriesDefaults:{
+        renderer:$.jqplot.BarRenderer,
+        rendererOptions: {fillToZero: true}
+      },
+      series:[
+        {label:'Hotel'},
+        {label:'Event Regristration'},
+        {label:'Airfare'}
+      ],
+      legend: {
+        show: true,
+        placement: 'outsideGrid'
+      },
+      axes: {
+        xaxis: {
+          renderer: $.jqplot.CategoryAxisRenderer
+        },
+        yaxis: {
+          autoscale: true,
+          tickOptions: {formatString: '$%d'}
+        }
+      }
+    });
+  });
+  </script>
 
 <script type="text/javascript" src="example.js"></script> 
     
 <?php include "nav.inc"; ?>
         
     <div id="chart1" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
-    <pre class="code"></pre>
+    <div id="chart2" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
 
   </body>
 </html>