File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -221,14 +221,18 @@ function makePadFn(ax, max) {
221221 extrappad = adjustPadForInsideLabelsOnAnchorAxis ( extrappad , ax , max ) ;
222222 extrappad = adjustPadForInsideLabelsOnThisAxis ( extrappad , ax , max ) ;
223223
224+ var pad0 = 0 ;
225+ pad0 = adjustPadForInsideLabelsOnAnchorAxis ( pad0 , ax , max ) ;
226+ pad0 = adjustPadForInsideLabelsOnThisAxis ( pad0 , ax , max ) ;
227+
224228 // domain-constrained axes: base extrappad on the unconstrained
225229 // domain so it's consistent as the domain changes
226230 if ( ( ax . constrain === 'domain' ) && ax . _inputDomain ) {
227231 extrappad *= ( ax . _inputDomain [ 1 ] - ax . _inputDomain [ 0 ] ) /
228232 ( ax . domain [ 1 ] - ax . domain [ 0 ] ) ;
229233 }
230234
231- return function getPad ( pt ) { return pt . pad + ( pt . extrapad ? extrappad : 0 ) ; } ;
235+ return function getPad ( pt ) { return pt . pad + ( pt . extrapad ? extrappad : pad0 ) ; } ;
232236}
233237
234238var TEXTPAD = 3 ;
You can’t perform that action at this time.
0 commit comments