File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -951,9 +951,10 @@ axes.calcTicks = function calcTicks(ax, opts) {
951
951
} else {
952
952
axes . prepTicks ( mockAx , opts ) ;
953
953
}
954
-
954
+
955
955
if ( mockAx . tickmode === 'full domain' ) {
956
- nt = mockAx . nticks ; // does mockAx have nitkcs?
956
+ var nt = mockAx . nticks ; // does mockAx have nitkcs?
957
+ if ( nt === undefined ) nt = 0 ;
957
958
var tickVals = [ ] ;
958
959
if ( nt == 0 ) {
959
960
// pass
@@ -962,10 +963,10 @@ axes.calcTicks = function calcTicks(ax, opts) {
962
963
} else if ( nt == 2 ) {
963
964
tickVals = [ 0 , 1 ] ;
964
965
} else {
965
- var increment = 1 / ( nt - 2 ) ;
966
+ var increment = 1 / ( nt - 1 ) ; // (nt-2) + 1
966
967
tickVals . push ( 0 ) ;
967
968
for ( let i = 0 ; i < nt - 2 ; i ++ ) {
968
- tickVals . push ( ( i + 1 ) * incremente ) ;
969
+ tickVals . push ( ( i + 1 ) * increment ) ;
969
970
}
970
971
tickVals . push ( 1 ) ;
971
972
}
You can’t perform that action at this time.
0 commit comments