@@ -870,13 +870,13 @@ module.exports = function setConvert(ax, fullLayout) {
870
870
}
871
871
} ;
872
872
873
+ ax . _emptyCategories = function ( ) {
874
+ ax . _categories = [ ] ;
875
+ ax . _categoriesMap = { } ;
876
+ } ;
877
+
873
878
// should skip if not category nor multicategory
874
879
ax . clearCalc = function ( ) {
875
- var emptyCategories = function ( ) {
876
- ax . _categories = [ ] ;
877
- ax . _categoriesMap = { } ;
878
- } ;
879
-
880
880
var matchGroups = fullLayout . _axisMatchGroups ;
881
881
882
882
if ( matchGroups && matchGroups . length ) {
@@ -903,14 +903,14 @@ module.exports = function setConvert(ax, fullLayout) {
903
903
ax . _categories = categories ;
904
904
ax . _categoriesMap = categoriesMap ;
905
905
} else {
906
- emptyCategories ( ) ;
906
+ ax . _emptyCategories ( ) ;
907
907
}
908
908
break ;
909
909
}
910
910
}
911
- if ( ! found ) emptyCategories ( ) ;
911
+ if ( ! found ) ax . _emptyCategories ( ) ;
912
912
} else {
913
- emptyCategories ( ) ;
913
+ ax . _emptyCategories ( ) ;
914
914
}
915
915
916
916
if ( ax . _initialCategories ) {
@@ -924,12 +924,8 @@ module.exports = function setConvert(ax, fullLayout) {
924
924
// returns the indices of the traces affected by the reordering
925
925
ax . sortByInitialCategories = function ( ) {
926
926
var affectedTraces = [ ] ;
927
- var emptyCategories = function ( ) {
928
- ax . _categories = [ ] ;
929
- ax . _categoriesMap = { } ;
930
- } ;
931
927
932
- emptyCategories ( ) ;
928
+ ax . _emptyCategories ( ) ;
933
929
934
930
if ( ax . _initialCategories ) {
935
931
for ( var j = 0 ; j < ax . _initialCategories . length ; j ++ ) {
0 commit comments