Commits

Chris Leonello  committed 6e7adfd

Fixed #130 where stacked data (_stackData, _plotData, _prevPlotData) wasn't being sorted with series data the first time plot was rendered.

  • Participants
  • Parent commits 2322218

Comments (0)

Files changed (1)

File src/jqplot.core.js

         
         // sort the series data in increasing order.
         function sortData(series) {
-            var d, ret;
+            var d, sd, pd, ppd, ret;
             for (var i=0; i<series.length; i++) {
                 d = series[i].data;
+                sd = series[i]._stackData;
+                pd = series[i]._plotData;
+                ppd = series[i]._prevPlotData;
                 var check = true;
                 if (series[i]._stackAxis == 'x') {
                     for (var j = 0; j < d.length; j++) {
                     }
                     if (check) {
                         d.sort(function(a,b) { return a[1] - b[1]; });
+                        sd.sort(function(a,b) { return a[1] - b[1]; });
+                        pd.sort(function(a,b) { return a[1] - b[1]; });
+                        ppd.sort(function(a,b) { return a[1] - b[1]; });
                     }
                 }
                 else {
                     }
                     if (check) {
                         d.sort(function(a,b) { return a[0] - b[0]; });
+                        sd.sort(function(a,b) { return a[0] - b[0]; });
+                        pd.sort(function(a,b) { return a[0] - b[0]; });
+                        ppd.sort(function(a,b) { return a[0] - b[0]; });
                     }
                 }
             }