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 a5577d9 commit fe8b5c4Copy full SHA for fe8b5c4
src/plots/plots.js
@@ -3329,7 +3329,7 @@ function sortAxisCategoriesByValue(axList, gd) {
3329
3330
// Sort by aggregated value
3331
categoriesAggregatedValue.sort(function(a, b) {
3332
- return a[1] - b[1];
+ return order === 'descending' ? b[1] - a[1] : a[1] - b[1];
3333
});
3334
3335
ax._categoriesAggregatedValue = categoriesAggregatedValue;
@@ -3339,11 +3339,6 @@ function sortAxisCategoriesByValue(axList, gd) {
3339
return c[0];
3340
3341
3342
- // Reverse if descending
3343
- if(order === 'descending') {
3344
- ax._initialCategories.reverse();
3345
- }
3346
-
3347
// Sort all matching axes
3348
affectedTraces = affectedTraces.concat(ax.sortByInitialCategories());
3349
}
0 commit comments