Commits

Chris Leonello committed fe5644a

Added option to disable stacking on individual data series.
Cleaned up documentation a little.

  • Participants
  • Parent commits 6be2b3d

Comments (0)

Files changed (3)

File src/jqplot.core.js

         // If true will stroke the line (with color this.color) as well as fill under it.
         // Applies only when fill is true.
         this.fillAndStroke = false;
+        // prop: disableStack
+        // true to not stack this series with other series in the plot.
+        // To render properly, non-stacked series must come after any stacked series
+        // in the plot's data series array.  So, the plot's data series array would look like:
+        // > [stackedSeries1, stackedSeries2, ..., nonStackedSeries1, nonStackedSeries2, ...]
+        // disableStack will put a gap in the stacking order of series, and subsequent
+        // stacked series will not fill down through the non-stacked series and will
+        // most likely not stack properly on top of the non-stacked series.
+        this.disableStack = false;
         // _stack is set by the Plot if the plot is a stacked chart.
         // will stack lines or bars on top of one another to build a "mountain" style chart.
         // May not be implemented in all renderers.
             this._stackData = [];
             series._stackData = [];
             series._plotData = [];
-            if (this.stackSeries) {
+            if (this.stackSeries && !series.disableStack) {
                 series._stack = true;
                 var sidx = series._stackAxis == 'x' ? 0 : 1;
                 var idx = sidx ? 0 : 1;

File src/plugins/jqplot.canvasAxisLabelRenderer.js

     * Class: $.jqplot.CanvasAxisLabelRenderer
     * Renderer to draw axis labels with a canvas element to support advanced
     * featrues such as rotated text.  This renderer uses a separate rendering engine
-    * to draw the text on the canvas.  Two modes of rendering the text are used.
+    * to draw the text on the canvas.  Two modes of rendering the text are available.
     * If the browser has native font support for canvas fonts (currently Mozila 3.5
-    * and Safari 4), Text will be rendered with the canvas fillText method.
-    * In these browsers, you supply a css spec for the font family.
+    * and Safari 4), you can enable text rendering with the canvas fillText method.
+    * You do so by setting the "enableFontSupport" option to true. 
     * 
     * Browsers lacking native font support will have the text drawn on the canvas
-    * using the Hershey font metrics.  This behaviour can be forced for all browsers
-    * by setting the "disableFontSupport" option to true.
+    * using the Hershey font metrics.  Even if the "enableFontSupport" option is true
+    * non-supporting browsers will still render with the Hershey font.
     * 
     */
     $.jqplot.CanvasAxisLabelRenderer = function(options) {

File src/plugins/jqplot.canvasAxisTickRenderer.js

     *  Class: $.jqplot.CanvasAxisTickRenderer
     * Renderer to draw axis ticks with a canvas element to support advanced
     * featrues such as rotated text.  This renderer uses a separate rendering engine
-    * to draw the text on the canvas.  Two modes of rendering the text are used.
-    * If the browser has native font support for canvs fonts (currently Mozila 3.5
-    * and Safari 4), Text will be rendered with the canvas fillText method.
-    * In these browsers, you supply a css spec for the font family.
+    * to draw the text on the canvas.  Two modes of rendering the text are available.
+    * If the browser has native font support for canvas fonts (currently Mozila 3.5
+    * and Safari 4), you can enable text rendering with the canvas fillText method.
+    * You do so by setting the "enableFontSupport" option to true. 
     * 
     * Browsers lacking native font support will have the text drawn on the canvas
-    * using the Hershey font metrics.  This behaviour can be forced for all browsers
-    * by setting the "disableFontSupport" option to true.
+    * using the Hershey font metrics.  Even if the "enableFontSupport" option is true
+    * non-supporting browsers will still render with the Hershey font.
     */
     $.jqplot.CanvasAxisTickRenderer = function(options) {
         // Group: Properties