Commit 51e14f6a authored by David Schnur's avatar David Schnur

Added a 'reverse' sorted option.

This orders the legend entries in reverse order of their series.
parent 410dd7db
......@@ -2315,6 +2315,8 @@ Licensed under the MIT license.
if (options.legend.sorted) {
if ($.isFunction(options.legend.sorted)) {
entries.sort(options.legend.sorted);
} else if (options.legend.sorted == "reverse") {
entries.reverse();
} else {
var ascending = options.legend.sorted != "descending";
entries.sort(function(a, b) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment