@@ -24,10 +24,6 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option
24
24
return Lib . coerce ( containerIn , containerOut , layoutAttributes , attr , dflt ) ;
25
25
}
26
26
27
- function coerce2 ( attr , dflt ) {
28
- return Lib . coerce2 ( containerIn , containerOut , layoutAttributes , attr , dflt ) ;
29
- }
30
-
31
27
containerOut . type = 'linear' ; // no other types allowed for ternary
32
28
33
29
var dfltColor = coerce ( 'color' ) ;
@@ -57,8 +53,6 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option
57
53
handleTickMarkDefaults ( containerIn , containerOut , coerce , 'linear' ,
58
54
{ outerticks : false } ) ;
59
55
60
- // TODO - below is a bit repetitious from cartesian still...
61
-
62
56
var showTickLabels = coerce ( 'showticklabels' ) ;
63
57
if ( showTickLabels ) {
64
58
Lib . coerceFont ( coerce , 'tickfont' , {
@@ -72,23 +66,17 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option
72
66
73
67
coerce ( 'hoverformat' ) ;
74
68
75
- var lineColor = coerce2 ( 'linecolor' , dfltColor ) ,
76
- lineWidth = coerce2 ( 'linewidth' ) ,
77
- showLine = coerce ( 'showline' , ! ! lineColor || ! ! lineWidth ) ;
78
-
79
- if ( ! showLine ) {
80
- delete containerOut . linecolor ;
81
- delete containerOut . linewidth ;
69
+ var showLine = coerce ( 'showline' ) ;
70
+ if ( showLine ) {
71
+ coerce ( 'linecolor' , dfltColor ) ;
72
+ coerce ( 'linewidth' ) ;
82
73
}
83
74
84
- // default grid color is darker here (60%, vs cartesian default ~91%)
85
- // because the grid is not square so the eye needs heavier cues to follow
86
- var gridColor = coerce2 ( 'gridcolor' , colorMix ( dfltColor , options . bgColor , 60 ) . toRgbString ( ) ) ,
87
- gridWidth = coerce2 ( 'gridwidth' ) ,
88
- showGridLines = coerce ( 'showgrid' , ! ! gridColor || ! ! gridWidth ) ;
89
-
90
- if ( ! showGridLines ) {
91
- delete containerOut . gridcolor ;
92
- delete containerOut . gridwidth ;
75
+ var showGridLines = coerce ( 'showgrid' ) ;
76
+ if ( showGridLines ) {
77
+ // default grid color is darker here (60%, vs cartesian default ~91%)
78
+ // because the grid is not square so the eye needs heavier cues to follow
79
+ coerce ( 'gridcolor' , colorMix ( dfltColor , options . bgColor , 60 ) . toRgbString ( ) ) ;
80
+ coerce ( 'gridwidth' ) ;
93
81
}
94
82
} ;
0 commit comments