File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3207,8 +3207,12 @@ function sortAxisCategoriesByValue(axList, gd) {
32073207 median : function ( values ) { return Lib . median ( values ) ; }
32083208 } ;
32093209
3210- function sortValues ( a , b , order ) {
3211- return order === 'descending' ? b [ 1 ] - a [ 1 ] : a [ 1 ] - b [ 1 ] ;
3210+ function sortAscending ( a , b ) {
3211+ return a [ 1 ] - b [ 1 ] ;
3212+ }
3213+
3214+ function sortDescending ( a , b ) {
3215+ return b [ 1 ] - a [ 1 ] ;
32123216 }
32133217
32143218 for ( i = 0 ; i < axList . length ; i ++ ) {
@@ -3332,7 +3336,7 @@ function sortAxisCategoriesByValue(axList, gd) {
33323336 }
33333337
33343338 // Sort by aggregated value
3335- categoriesAggregatedValue . sort ( ( a , b ) => sortValues ( a , b , order ) ) ;
3339+ categoriesAggregatedValue . sort ( order === 'descending' ? sortDescending : sortAscending ) ;
33363340
33373341 ax . _categoriesAggregatedValue = categoriesAggregatedValue ;
33383342
You can’t perform that action at this time.
0 commit comments