cleonello  committed 3c3edc7

Fixed bug where if series specified with x values as string labels, IE would throw error trying to do numerical sort.
Note, if custom numerical labels are passed in with the data series as x values, they will be sorted! To get around this, either pass in labels as strings, or use custom ticks array.

  • Participants
  • Parent commits c4bf9c3

Comments (0)

Files changed (1)

File src/plugins/jqplot.categoryAxisRenderer.js

-            labels.sort(function (a, b) { return a - b;});
+            try {
+                // if labels are numbers, sort them
+                labels.sort(function (a, b) { return a - b;}); 
+            }
+            catch (e) {
+                // don't sort
+            }
             // now bin the data values to the right lables.
             for (var i=0; i<this._series.length; i++) {