We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 547ef52 commit 3e9500dCopy full SHA for 3e9500d
src/plots/plots.js
@@ -3207,7 +3207,7 @@ function sortAxisCategoriesByValue(axList, gd) {
3207
median: function(values) {return Lib.median(values);}
3208
};
3209
3210
- function sortValues(a, b) {
+ function sortValues(a, b, order) {
3211
return order === 'descending' ? b[1] - a[1] : a[1] - b[1];
3212
}
3213
@@ -3332,7 +3332,7 @@ function sortAxisCategoriesByValue(axList, gd) {
3332
3333
3334
// Sort by aggregated value
3335
- categoriesAggregatedValue.sort(sortValues);
+ categoriesAggregatedValue.sort((a,b) => sortValues(a, b, order));
3336
3337
ax._categoriesAggregatedValue = categoriesAggregatedValue;
3338
0 commit comments