Skip to content

Commit fe8b5c4

Browse files
committed
Fixed issue - column order changes on hover
1 parent a5577d9 commit fe8b5c4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/plots/plots.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3329,7 +3329,7 @@ function sortAxisCategoriesByValue(axList, gd) {
33293329

33303330
// Sort by aggregated value
33313331
categoriesAggregatedValue.sort(function(a, b) {
3332-
return a[1] - b[1];
3332+
return order === 'descending' ? b[1] - a[1] : a[1] - b[1];
33333333
});
33343334

33353335
ax._categoriesAggregatedValue = categoriesAggregatedValue;
@@ -3339,11 +3339,6 @@ function sortAxisCategoriesByValue(axList, gd) {
33393339
return c[0];
33403340
});
33413341

3342-
// Reverse if descending
3343-
if(order === 'descending') {
3344-
ax._initialCategories.reverse();
3345-
}
3346-
33473342
// Sort all matching axes
33483343
affectedTraces = affectedTraces.concat(ax.sortByInitialCategories());
33493344
}

0 commit comments

Comments
 (0)