Commits

Anonymous committed c630d67

fixed bug where databounds nulled out prematurely.

  • Participants
  • Parent commits d3e4c8e

Comments (0)

Files changed (1)

File src/plugins/jqplot.dateAxisRenderer.js

                     d[j][0] = new $.jsDate(d[j][0]).getTime();
                     pd[j][0] = new $.jsDate(d[j][0]).getTime();
                     sd[j][0] = new $.jsDate(d[j][0]).getTime();
-                    if (d[j][0] < db.min || db.min == null) {
+                    if (db.min == null || d[j][1] < db.min) {
                         db.min = d[j][0];
                     }
-                    if (d[j][0] > db.max || db.max == null) {
+                    if (db.max == null || d[j][1] > db.max) {
                         db.max = d[j][0];
                     }
 					if (j>0) {
                     d[j][1] = new $.jsDate(d[j][1]).getTime();
                     pd[j][1] = new $.jsDate(d[j][1]).getTime();
                     sd[j][1] = new $.jsDate(d[j][1]).getTime();
-                    if (d[j][1] < db.min || db.min == null) {
+                    if (db.min == null || d[j][1] < db.min) {
                         db.min = d[j][1];
                     }
-                    if (d[j][1] > db.max || db.max == null) {
+                    if (db.max == null || d[j][1] > db.max) {
                         db.max = d[j][1];
                     }
 					if (j>0) {
 			stats.max = $.jqplot.arrayMax(stats.intervals);
 			stats.mean = sum/d.length;
 			this._intervalStats.push(stats);
-			db = stats = sum = s = d = pd = sd = null;
+			stats = sum = s = d = pd = sd = null;
         }
+		db = null;
 		
     };