Commits

Chris Leonello committed 16f4431

Examples. More fixes and tweaks.

  • Participants
  • Parent commits e80c44a

Comments (0)

Files changed (13)

         <copy todir="${BUILD_DIR}/examples">
           <fileset dir="examples">
             <exclude name="_*" />
+            <exclude name="~*" />
             <exclude name="bug*" />
             <exclude name="footer.inc" />
           </fileset>

examples/.htaccess

 # This works on my local apache (with mod_php)
-AddType application/x-httpd-php .php .html .htm
+# AddType application/x-httpd-php .php .html .htm
 
 # This works for dreamhost (php as fast cgi)
 # AddType php-cgi .php .html .htm

examples/.htaccess.remote

-# This works on my local apache (with mod_php)
-# AddType application/x-httpd-php .php .html .htm
-
-# This works for dreamhost (php as fast cgi)
-AddType php-cgi .php .html .htm
-
-IndexOptions +FancyIndexing +SuppressDescription NameWidth=* +FoldersFirst
-

examples/dashboardWidget.php

 <?php include "opener.php"; ?>
 
 <!-- Example scripts go here -->
-    <link rel="stylesheet" type="text/css" href="jquery-ui/css/ui-lightness/jquery-ui.css" />
+    <link class="include" rel="stylesheet" type="text/css" href="jquery-ui/css/ui-lightness/jquery-ui.css" />
 
     <style type="text/css">
         .jqplot-target {
         </div>
     </div>
 
+    <pre class="code brush:js"></pre>
+
     <script class="code" type="text/javascript">
 
         $(document).ready(function () {
             $.jqplot._noToImageButton = true;
-            $.jqplot._noCodeBlock = true;
             var prevYear = [["2011-08-01",398], ["2011-08-02",255.25], ["2011-08-03",263.9], ["2011-08-04",154.24], 
             ["2011-08-05",210.18], ["2011-08-06",109.73], ["2011-08-07",166.91], ["2011-08-08",330.27], ["2011-08-09",546.6], 
             ["2011-08-10",260.5], ["2011-08-11",330.34], ["2011-08-12",464.32], ["2011-08-13",432.13], ["2011-08-14",197.78], 
             ["2011-09-25",2785.93], ["2011-09-26",4329.7], ["2011-09-27",3493.72], ["2011-09-28",4440.55], 
             ["2011-09-29",5235.81], ["2011-09-30",6473.25]];
 
-            plot1 = $.jqplot("chart1", [prevYear, currYear], {
+            var plot1 = $.jqplot("chart1", [prevYear, currYear], {
                 seriesColors: ["rgba(78, 135, 194, 0.7)", "rgb(211, 235, 59)"],
                 title: 'Monthly TurnKey Revenue',
                 highlighter: {
                 }
             });
 
-              // Add animation to the bars and line.
-              // use jquery-ui to initially hide the canvases for the series.
-              // Then use the 'blind' effect to show the canvases.
-
-              // plot1.series[0].canvas._elem.hide();
-              // plot1.series[1].canvas._elem.hide();
-              // plot1.series[0].canvas._elem.jqplotEffect('blind', {mode: 'show', direction: 'left'}, 3000);
-              // plot1.series[1].canvas._elem.jqplotEffect('blind', {mode: 'show', direction: 'left'}, 3000);
-
               $('.jqplot-highlighter-tooltip').addClass('ui-corner-all')
         });
 
 <!-- End Don't touch this! -->
 
 <!-- Additional plugins go here -->
-    <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.dateAxisRenderer.js"></script>
-    <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.logAxisRenderer.js"></script>
-    <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.canvasTextRenderer.js"></script>
-    <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.canvasAxisTickRenderer.js"></script>
-    <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.highlighter.js"></script>
+    <script class="include" type="text/javascript" src="../src/plugins/jqplot.dateAxisRenderer.js"></script>
+    <script class="include" type="text/javascript" src="../src/plugins/jqplot.logAxisRenderer.js"></script>
+    <script class="include" type="text/javascript" src="../src/plugins/jqplot.canvasTextRenderer.js"></script>
+    <script class="include" type="text/javascript" src="../src/plugins/jqplot.canvasAxisTickRenderer.js"></script>
+    <script class="include" type="text/javascript" src="../src/plugins/jqplot.highlighter.js"></script>
 
 <!-- End additional plugins -->
 

examples/dateAxisRenderer.php

 $(document).ready(function(){
         
     plot3 = $.jqplot('chart3',[ohlc],{
-        title: 'Pad = 2.02',
         axesDefaults:{},
         axes: {
             xaxis: {

examples/kcp_pyramid.php

 <?php 
-    $title = "Probability Density Function Chart";
+    $title = "Pyramid Charts";
     // $plotTargets = array (array('id'=>'chart1', 'width'=>600, 'height'=>400));
 ?>
 <?php include "opener.php"; ?>
 
         var d = new $.jsDate();
         $('div.jqplot-datestamp').html('Generated on '+d.strftime('%v'));
+    
+        $("div.chart-container").resizable({delay:20});    
+
+        $("div.chart-container").bind("resize", function(event, ui) {
+            plot1.replot();
+        });
 
     });
     </script>

examples/kcp_pyramid2.php

 <?php 
-    $title = "Probability Density Function Chart";
+    $title = "Pyramid Charts 2";
     // $plotTargets = array (array('id'=>'chart1', 'width'=>600, 'height'=>400));
 ?>
 <?php include "opener.php"; ?>
 
         var d = new $.jsDate();
         $("div.jqplot-datestamp").html("Generated on "+d.strftime("%v"));
+    
+        $("div.chart-container").resizable({delay:20});    
+
+        $("div.chart-container").bind("resize", function(event, ui) {
+            plot1.replot();
+        });
 
     });
     </script>
 <div class="example-nav">
   <?php
     $tmpnames = scandir('./');
-    $skip = array('opener.php', 'bodyOpener.php', 'nav.php', 'closer.html', 'commonScripts.html', 'topbanner.html');
+    $skip = array('opener.php', 'bodyOpener.php', 'nav.php', 'closer.html', 'commonScripts.html', 'topbanner.html', 'index.php');
     
     foreach( $tmpnames as $value) {
         if (preg_match('/^[a-z0-9][a-z0-9_\-]+\.(html|php)$/i', $value)) {

examples/pieTest4.php

 <?php 
-    $title = "Pie Charts and Options";
+    $title = "Pie Charts and Options 2";
     // $plotTargets = array (array('id'=>'chart1', 'width'=>600, 'height'=>400));
 ?>
 <?php include "opener.php"; ?>

examples/smoothedLine.php

 <?php 
-    $title = "Probability Density Function Chart";
+    $title = "Smoothed Lines";
     // $plotTargets = array (array('id'=>'chart1', 'width'=>600, 'height'=>400));
 ?>
 <?php include "opener.php"; ?>
 
 <!-- Example scripts go here -->
 
-  <link class="include" type="text/css" href="jquery-ui/css/ui-lightness/jquery-ui.min.css" rel="Stylesheet" /> 
-
     <style type="text/css">
         body {
             background-color: #f3f3f3;

examples/theming.php

 <?php 
-    $title = "Probability Density Function Chart";
+    $title = "Chart Theming";
     // $plotTargets = array (array('id'=>'chart1', 'width'=>600, 'height'=>400));
 ?>
 <?php include "opener.php"; ?>
 }
 </style>
 
-  <link class="include" type="text/css" href="jquery-ui/css/ui-lightness/jquery-ui.min.css" rel="Stylesheet" /> 
-
 <p>jqPlot has basic theming support for commonly styled atributes of plot elements.  Upon creation, each plot will have a "themeEngine" that controls modificaition, adding, removing and activating of plot themes.  In addition, each plot will have a "Default" theme which corresponds to the styling of the plot at plot creation.<p>
     
 <p>Creation of new themes is easy.  A "style" object is created with properties for the various plot elements to be styles.  Attached to each of those is an ojbect with the actual styling properties.  A simple style object might look like:</p>

examples/waterfall.php

 <?php 
-    $title = "Probability Density Function Chart";
+    $title = "Waterfall Charts";
     // $plotTargets = array (array('id'=>'chart1', 'width'=>600, 'height'=>400));
 ?>
 <?php include "opener.php"; ?>

examples/waterfall2.php

 <?php 
-    $title = "Probability Density Function Chart";
+    $title = "Waterfall charts 2";
     // $plotTargets = array (array('id'=>'chart1', 'width'=>600, 'height'=>400));
 ?>
 <?php include "opener.php"; ?>