Chris Leonello avatar Chris Leonello committed 143a0a3

Fixed bug #45, plot would crash with series of different lengths.
Some clean up.

Comments (0)

Files changed (3)

src/jqplot.core.js

         // Overrides the pad, padMin and padMax values.  Set to false
         // to use the pad, padMin and padMax options.  If both min and max
         // are specified, will not autoscale.
-        this.autoscale = true;
+        this.autoscale = false;
         // prop: pad
         // Padding to extend the range above and below the data bounds.
         // The data range is multiplied by this factor to determine minimum and maximum axis bounds.

src/jqplot.lineRenderer.js

         this._prevGridData = [];
         for (var i=0; i<this.data.length; i++) {
             this.gridData.push([xp.call(this._xaxis, data[i][0]), yp.call(this._yaxis, data[i][1])]);
-            if (pdata.length) {
+            if (pdata.length > i) {
                 this._prevGridData.push([xp.call(this._xaxis, pdata[i][0]), yp.call(this._yaxis, pdata[i][1])]);
             }
         }

src/jqplot.linearAxisRenderer.js

                 if (this.max == null) {
                     this.max = this.min + rrange;
                 }
-                    
-                console.log('min: %s, max: %s, newmin: %s, newmax: %s, interval: %s, newinterval: %s, margin: %s, number: %s', min, max, this.min, this.max, ti, this.tickInterval, margin, this.numberTicks);
             }
             
             else {
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.