File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -146,8 +146,10 @@ function axisKy(
146146              this . frameAnchor  =  `${ cla } ${ anchor }  ; 
147147              this . rotate  =  0 ; 
148148            } 
149-             this . dy  =  cla  ===  "top"  ? 3  -  marginTop  +  inset  : cla  ===  "bottom"  ? marginBottom  -  3  -  inset  : inset ; 
150-             this . dx  =  anchor  ===  "right"  ? clo  : - clo ; 
149+             this . dy  = 
150+               ( options . dy  ??  0 )  + 
151+               ( cla  ===  "top"  ? 3  -  marginTop  +  inset  : cla  ===  "bottom"  ? marginBottom  -  3  -  inset  : inset ) ; 
152+             this . dx  =  ( options . dx  ??  0 )  +  ( anchor  ===  "right"  ? clo  : - clo ) ; 
151153            this . ariaLabel  =  `${ k }  ; 
152154            return  { 
153155              facets : [ [ 0 ] ] , 
@@ -247,8 +249,10 @@ function axisKx(
247249              this . textAnchor  =  cla  ===  "right"  ? "end"  : "start" ; 
248250            } 
249251            this . lineAnchor  =  anchor ; 
250-             this . dy  =  anchor  ===  "top"  ? - clo  : clo ; 
251-             this . dx  =  cla  ===  "right"  ? marginRight  -  3  -  inset  : cla  ===  "left"  ? 3  -  marginLeft  +  inset  : inset ; 
252+             this . dy  =  ( options . dy  ??  0 )  +  ( anchor  ===  "top"  ? - clo  : clo ) ; 
253+             this . dx  = 
254+               ( options . dx  ??  0 )  + 
255+               ( cla  ===  "right"  ? marginRight  -  3  -  inset  : cla  ===  "left"  ? 3  -  marginLeft  +  inset  : inset ) ; 
252256            this . ariaLabel  =  `${ k }  ; 
253257            return  { 
254258              facets : [ [ 0 ] ] , 
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ export async function federalFunds() {
1313        tickSize : 0 ,  // don’t draw ticks 
1414        dx : 32 ,  // offset right 
1515        dy : - 6 ,  // offset up 
16+         labelOffset : 29 ,  // compensate label offset, 
17+         inset : 6 , 
1618        lineAnchor : "bottom" ,  // draw labels above grid lines 
1719        tickFormat : ( d )  =>  ( d  ===  10  ? `${ d }   : `${ d }  )  // right-align numbers, not % 
1820      } ) , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments