Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📊 2023年の統計データを追加した #1585

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/controllers/stats_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def show
return
end

# 2012年1月1日〜2022年12月31日までの集計結果
period = Time.zone.local(2012).beginning_of_year..Time.zone.local(2022).end_of_year
# 2012年1月1日〜2023年12月31日までの集計結果
period = Time.zone.local(2012).beginning_of_year..Time.zone.local(2023).end_of_year
stats = Stat.new(period)

# 推移グラフ
Expand Down Expand Up @@ -113,4 +113,3 @@ def show
# - @participants.each_value do |num|
# %td= num
# /%td= @participants.values.sum

4 changes: 2 additions & 2 deletions app/models/high_charts_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def build_annual_event_histories(source)
f.series(type: 'line', name: '累積合計', yAxis: 1, data: data[:cumulative_sums])
f.yAxis [
{ title: { text: '開催回数' }, tickInterval: 500, max: 2000 },
{ title: { text: '累積合計' }, tickInterval: 2000, max: 8000, opposite: true }
{ title: { text: '累積合計' }, tickInterval: 2500, max: 10000, opposite: true }
]
f.chart(width: 600, alignTicks: false)
f.colors(["#F4C34F", "#BD2561"])
Expand All @@ -50,7 +50,7 @@ def build_annual_participants(source)
f.series(type: 'line', name: '累積合計', yAxis: 1, data: data[:cumulative_sums])
f.yAxis [
{ title: { text: '参加者数' }, tickInterval: 2500, max: 12500 },
{ title: { text: '累積合計' }, tickInterval: 10000, max: 50000, opposite: true }
{ title: { text: '累積合計' }, tickInterval: 12000, max: 60000, opposite: true }
]
f.chart(width: 600, alignTicks: false)
f.colors(["#EF685E", "#35637D"])
Expand Down