File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def build_chart
83
83
built [ :chart ] . merge! ( {
84
84
id : @options [ :chartId ] || @options [ :id ] ,
85
85
group : @options . delete ( :group ) ,
86
- height : @options . delete ( :height ) { target ? 180 : 400 } ,
86
+ height : @options . delete ( :height ) { target ? 180 : nil } ,
87
87
width : @options . delete ( :width ) ,
88
88
stacked : @options . delete ( :stacked ) ,
89
89
animations : enabled ( @options . delete ( :animations ) ) ,
Original file line number Diff line number Diff line change @@ -89,11 +89,14 @@ def css_class
89
89
end
90
90
91
91
def height
92
- "#{ options [ :chart ] [ :height ] . to_i } px"
92
+ chart_height = options . dig ( :chart , :height )
93
+ if chart_height
94
+ "#{ chart_height . to_i } px"
95
+ end
93
96
end
94
97
95
98
def style
96
- "height: #{ height } ; #{ attributes . delete ( :style ) } "
99
+ "#{ height && "height : #{ height } ; " } #{ attributes . delete ( :style ) } "
97
100
end
98
101
99
102
def window_apex
Original file line number Diff line number Diff line change 44
44
expect ( chart . more_options ) . to eq ( { } )
45
45
expect ( chart . instance_variable_get ( :@series ) ) . to eq ( expected_series )
46
46
expect ( chart . instance_variable_get ( :@options ) ) . to eq (
47
- chart : {
48
- height : 400 , id : 'chart-1' , type : 'area'
49
- } ,
47
+ chart : { id : 'chart-1' , type : 'area' } ,
50
48
defer : false ,
51
49
div : { id : 'chart-1' } ,
52
50
module : false ,
You can’t perform that action at this time.
0 commit comments