1
1
class HighChartsBuilder
2
+ HIGH_CHARTS_WIDTH = 600
3
+
2
4
class << self
3
5
def global_options
4
6
LazyHighCharts ::HighChartGlobals . new do |f |
@@ -18,7 +20,7 @@ def build_annual_dojos(source)
18
20
{ title : { text : '増加数' } , tickInterval : 15 , max : 75 } ,
19
21
{ title : { text : '累積合計' } , tickInterval : 50 , max : 250 , opposite : true }
20
22
]
21
- f . chart ( width : 600 , alignTicks : false )
23
+ f . chart ( width : HIGH_CHARTS_WIDTH , alignTicks : false )
22
24
f . colors ( [ "#A0D3B5" , "#505D6B" ] )
23
25
end
24
26
end
@@ -35,7 +37,7 @@ def build_annual_event_histories(source)
35
37
{ title : { text : '開催回数' } , tickInterval : 500 , max : 2000 } ,
36
38
{ title : { text : '累積合計' } , tickInterval : 3000 , max : 12000 , opposite : true }
37
39
]
38
- f . chart ( width : 600 , alignTicks : false )
40
+ f . chart ( width : HIGH_CHARTS_WIDTH , alignTicks : false )
39
41
f . colors ( [ "#F4C34F" , "#BD2561" ] )
40
42
end
41
43
end
@@ -52,7 +54,7 @@ def build_annual_participants(source)
52
54
{ title : { text : '参加者数' } , tickInterval : 2500 , max : 12500 } ,
53
55
{ title : { text : '累積合計' } , tickInterval : 14000 , max : 64000 , opposite : true }
54
56
]
55
- f . chart ( width : 600 , alignTicks : false )
57
+ f . chart ( width : HIGH_CHARTS_WIDTH , alignTicks : false )
56
58
f . colors ( [ "#EF685E" , "#35637D" ] )
57
59
end
58
60
end
0 commit comments