Chris Leonello avatar Chris Leonello committed 9575f0e

Fixed bug with stacked charts and null values.

Comments (0)

Files changed (1)

src/jqplot.core.js

         }
         this.data = temp;
 
-        console.log('series init: ', this.index, this.breakOnNull, this.data[2]);
-
         // parse the renderer options and apply default colors if not provided
         // Set color even if not shown, so series don't change colors when other
         // series on plot shown/hidden.
         // sets the plot target, checks data and applies user
         // options to plot.
         this.init = function(target, data, options) {
-            console.log('in init: ', data[2][2]);
             options = options || {};
             for (var i=0; i<$.jqplot.preInitHooks.length; i++) {
                 $.jqplot.preInitHooks[i].call(this, target, data, options);
             this.legend.init();
             this._sumy = 0;
             this._sumx = 0;
-            console.log('in init 2: ', this.data[2][2]);
             this.computePlotData();
             for (var i=0; i<this.series.length; i++) {
                 // set default stacking order for series canvases
 
 
             for (index=0, l=this.series.length; index<l; index++) {
-                console.log('index is: ', index);
                 series = this.series[index];
                 this._plotData.push([]);
                 this._stackData.push([]);
                 if (this.stackSeries && !series.disableStack) {
-                    // for first series, not stacking anything.
+                    series._stack = true;
                     var cd = series.data;
                     this._plotData[index] = $.extend(true, [], cd);
                     this._stackData[index] = $.extend(true, [], cd);
 
                         if (index > 0) {
                             for (var j=index; j--;) {
-                                console.log(index, j, k);
                                 var prevval = this._plotData[j][k][sidx];
                                 // only need to sum up the stack axis column of data
                                 // and only sum if it is of same sign.
                 // Need to know breakONNull during initializtion, so create an otptions object and pass
                 // it in just for breakOnNull support (for now).
                 var sopts = $.extend(true, {}, {seriesColors:this.seriesColors, negativeSeriesColors:this.negativeSeriesColors}, this.options.seriesDefaults, this.options.series[i], {rendererOptions:{animation:{show: this.animate}}});
-                console.log('parseOptions: ', sopts.breakOnNull);
                 var temp = new Series(sopts);
                 for (var j=0; j<$.jqplot.preParseSeriesOptionsHooks.length; j++) {
                     $.jqplot.preParseSeriesOptionsHooks[j].call(temp, this.options.seriesDefaults, this.options.series[i]);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.