@@ -8,51 +8,54 @@ def global_options
8
8
end
9
9
end
10
10
11
- def build_annual_dojos ( source )
11
+ def build_annual_dojos ( source , lang = 'ja' )
12
12
data = annual_chart_data_from ( source )
13
+ title_text = lang == 'en' ? 'Number of Dojos' : '道場数の推移'
13
14
14
15
LazyHighCharts ::HighChart . new ( 'graph' ) do |f |
15
- f . title ( text : '道場数の推移' )
16
+ f . title ( text : title_text )
16
17
f . xAxis ( categories : data [ :years ] )
17
- f . series ( type : 'column' , name : '増加数' , yAxis : 0 , data : data [ :increase_nums ] )
18
- f . series ( type : 'line' , name : '累積合計' , yAxis : 1 , data : data [ :cumulative_sums ] )
18
+ f . series ( type : 'column' , name : lang == 'en' ? 'New' : '増加数' , yAxis : 0 , data : data [ :increase_nums ] )
19
+ f . series ( type : 'line' , name : lang == 'en' ? 'Total' : '累積合計' , yAxis : 1 , data : data [ :cumulative_sums ] )
19
20
f . yAxis [
20
- { title : { text : '増加数' } , tickInterval : 15 , max : 75 } ,
21
- { title : { text : '累積合計' } , tickInterval : 50 , max : 250 , opposite : true }
21
+ { title : { text : lang == 'en' ? 'New' : '増加数' } , tickInterval : 15 , max : 75 } ,
22
+ { title : { text : lang == 'en' ? 'Total' : '累積合計' } , tickInterval : 50 , max : 250 , opposite : true }
22
23
]
23
24
f . chart ( width : HIGH_CHARTS_WIDTH , alignTicks : false )
24
25
f . colors ( [ "#A0D3B5" , "#505D6B" ] )
25
26
end
26
27
end
27
28
28
- def build_annual_event_histories ( source )
29
+ def build_annual_event_histories ( source , lang = 'ja' )
29
30
data = annual_chart_data_from ( source )
31
+ title_text = lang == 'en' ? 'Number of Events' : '開催回数の推移'
30
32
31
33
LazyHighCharts ::HighChart . new ( 'graph' ) do |f |
32
- f . title ( text : '開催回数の推移' )
34
+ f . title ( text : title_text )
33
35
f . xAxis ( categories : data [ :years ] )
34
- f . series ( type : 'column' , name : '開催回数' , yAxis : 0 , data : data [ :increase_nums ] )
35
- f . series ( type : 'line' , name : '累積合計' , yAxis : 1 , data : data [ :cumulative_sums ] )
36
+ f . series ( type : 'column' , name : lang == 'en' ? 'Events' : '開催回数' , yAxis : 0 , data : data [ :increase_nums ] )
37
+ f . series ( type : 'line' , name : lang == 'en' ? 'Total' : '累積合計' , yAxis : 1 , data : data [ :cumulative_sums ] )
36
38
f . yAxis [
37
- { title : { text : '開催回数' } , tickInterval : 500 , max : 2000 } ,
38
- { title : { text : '累積合計' } , tickInterval : 3000 , max : 12000 , opposite : true }
39
+ { title : { text : lang == 'en' ? 'Events' : '開催回数' } , tickInterval : 500 , max : 2000 } ,
40
+ { title : { text : lang == 'en' ? 'Total' : '累積合計' } , tickInterval : 3000 , max : 12000 , opposite : true }
39
41
]
40
42
f . chart ( width : HIGH_CHARTS_WIDTH , alignTicks : false )
41
43
f . colors ( [ "#F4C34F" , "#BD2561" ] )
42
44
end
43
45
end
44
46
45
- def build_annual_participants ( source )
47
+ def build_annual_participants ( source , lang = 'ja' )
46
48
data = annual_chart_data_from ( source )
49
+ title_text = lang == 'en' ? 'Number of Participants' : '参加者数の推移'
47
50
48
51
LazyHighCharts ::HighChart . new ( 'graph' ) do |f |
49
- f . title ( text : '参加者数の推移' )
52
+ f . title ( text : title_text )
50
53
f . xAxis ( categories : data [ :years ] )
51
- f . series ( type : 'column' , name : '参加者数' , yAxis : 0 , data : data [ :increase_nums ] )
52
- f . series ( type : 'line' , name : '累積合計' , yAxis : 1 , data : data [ :cumulative_sums ] )
54
+ f . series ( type : 'column' , name : lang == 'en' ? 'Participants' : '参加者数' , yAxis : 0 , data : data [ :increase_nums ] )
55
+ f . series ( type : 'line' , name : lang == 'en' ? 'Total' : '累積合計' , yAxis : 1 , data : data [ :cumulative_sums ] )
53
56
f . yAxis [
54
- { title : { text : '参加者数' } , tickInterval : 2500 , max : 12500 } ,
55
- { title : { text : '累積合計' } , tickInterval : 14000 , max : 64000 , opposite : true }
57
+ { title : { text : lang == 'en' ? 'Participants' : '参加者数' } , tickInterval : 2500 , max : 12500 } ,
58
+ { title : { text : lang == 'en' ? 'Total' : '累積合計' } , tickInterval : 14000 , max : 64000 , opposite : true }
56
59
]
57
60
f . chart ( width : HIGH_CHARTS_WIDTH , alignTicks : false )
58
61
f . colors ( [ "#EF685E" , "#35637D" ] )
0 commit comments