@@ -256,7 +256,7 @@ function drawBulletGauge(gd, plotGroup, cd, opts) {
256
256
var bulletLeft = domain . x [ 0 ] ;
257
257
var bulletRight = domain . x [ 0 ] + ( domain . x [ 1 ] - domain . x [ 0 ] ) * ( ( trace . _hasNumber || trace . _hasDelta ) ? ( 1 - cn . bulletNumberDomainSize ) : 1 ) ;
258
258
259
- ax = mockAxis ( gd , trace . gauge . axis , trace . gauge . axis . range ) ;
259
+ ax = mockAxis ( gd , trace . gauge . axis ) ;
260
260
ax . _id = 'xbulletaxis' ;
261
261
ax . domain = [ bulletLeft , bulletRight ] ;
262
262
ax . setScale ( ) ;
@@ -567,8 +567,10 @@ function drawNumbers(gd, plotGroup, cd, opts) {
567
567
}
568
568
569
569
function drawBignumber ( ) {
570
- // bignumber
571
- var bignumberAx = mockAxis ( gd , { tickformat : trace . number . valueformat } ) ;
570
+ var bignumberAx = mockAxis ( gd , { tickformat : trace . number . valueformat } , trace . _range ) ;
571
+ bignumberAx . setScale ( ) ;
572
+ Axes . calcTicks ( bignumberAx ) ;
573
+
572
574
var fmt = function ( v ) { return Axes . tickText ( bignumberAx , v ) . text ; } ;
573
575
var bignumberSuffix = trace . number . suffix ;
574
576
var bignumberPrefix = trace . number . prefix ;
@@ -607,8 +609,10 @@ function drawNumbers(gd, plotGroup, cd, opts) {
607
609
}
608
610
609
611
function drawDelta ( ) {
610
- // delta
611
- var deltaAx = mockAxis ( gd , { tickformat : trace . delta . valueformat } ) ;
612
+ var deltaAx = mockAxis ( gd , { tickformat : trace . delta . valueformat } , trace . _range ) ;
613
+ deltaAx . setScale ( ) ;
614
+ Axes . calcTicks ( deltaAx ) ;
615
+
612
616
var deltaFmt = function ( v ) { return Axes . tickText ( deltaAx , v ) . text ; } ;
613
617
var deltaValue = function ( d ) {
614
618
var value = trace . delta . relative ? d . relativeDelta : d . delta ;
@@ -797,34 +801,12 @@ function arcTween(arc, endAngle, newAngle) {
797
801
function mockAxis ( gd , opts , zrange ) {
798
802
var fullLayout = gd . _fullLayout ;
799
803
800
- var axisIn = {
801
- visible : opts . visible ,
804
+ var axisIn = Lib . extendFlat ( {
802
805
type : 'linear' ,
803
806
ticks : 'outside' ,
804
807
range : zrange ,
805
- tickmode : opts . tickmode ,
806
- nticks : opts . nticks ,
807
- tick0 : opts . tick0 ,
808
- dtick : opts . dtick ,
809
- tickvals : opts . tickvals ,
810
- ticktext : opts . ticktext ,
811
- ticklen : opts . ticklen ,
812
- tickwidth : opts . tickwidth ,
813
- tickcolor : opts . tickcolor ,
814
- showticklabels : opts . showticklabels ,
815
- tickfont : opts . tickfont ,
816
- tickangle : opts . tickangle ,
817
- tickformat : opts . tickformat ,
818
- exponentformat : opts . exponentformat ,
819
- separatethousands : opts . separatethousands ,
820
- showexponent : opts . showexponent ,
821
- showtickprefix : opts . showtickprefix ,
822
- tickprefix : opts . tickprefix ,
823
- showticksuffix : opts . showticksuffix ,
824
- ticksuffix : opts . ticksuffix ,
825
- title : opts . title ,
826
808
showline : true
827
- } ;
809
+ } , opts ) ;
828
810
829
811
var axisOut = {
830
812
type : 'linear' ,
0 commit comments