@@ -8,51 +8,54 @@ def global_options
88 end
99 end
1010
11- def build_annual_dojos ( source )
11+ def build_annual_dojos ( source , lang = 'ja' )
1212 data = annual_chart_data_from ( source )
13+ title_text = lang == 'en' ? 'Number of Dojos' : '道場数の推移'
1314
1415 LazyHighCharts ::HighChart . new ( 'graph' ) do |f |
15- f . title ( text : '道場数の推移' )
16+ f . title ( text : title_text )
1617 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 ] )
1920 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 }
2223 ]
2324 f . chart ( width : HIGH_CHARTS_WIDTH , alignTicks : false )
2425 f . colors ( [ "#A0D3B5" , "#505D6B" ] )
2526 end
2627 end
2728
28- def build_annual_event_histories ( source )
29+ def build_annual_event_histories ( source , lang = 'ja' )
2930 data = annual_chart_data_from ( source )
31+ title_text = lang == 'en' ? 'Number of Events' : '開催回数の推移'
3032
3133 LazyHighCharts ::HighChart . new ( 'graph' ) do |f |
32- f . title ( text : '開催回数の推移' )
34+ f . title ( text : title_text )
3335 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 ] )
3638 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 }
3941 ]
4042 f . chart ( width : HIGH_CHARTS_WIDTH , alignTicks : false )
4143 f . colors ( [ "#F4C34F" , "#BD2561" ] )
4244 end
4345 end
4446
45- def build_annual_participants ( source )
47+ def build_annual_participants ( source , lang = 'ja' )
4648 data = annual_chart_data_from ( source )
49+ title_text = lang == 'en' ? 'Number of Participants' : '参加者数の推移'
4750
4851 LazyHighCharts ::HighChart . new ( 'graph' ) do |f |
49- f . title ( text : '参加者数の推移' )
52+ f . title ( text : title_text )
5053 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 ] )
5356 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 }
5659 ]
5760 f . chart ( width : HIGH_CHARTS_WIDTH , alignTicks : false )
5861 f . colors ( [ "#EF685E" , "#35637D" ] )
0 commit comments