I'm using chartkick in an active admin dashboard and trying to track a cumulative user base over time.
Using groupdate to count by week I can successfully create a chart displaying point in time counts but struggling to display cumulative results.
Any suggestion on best way to approach as I have not found a similar question?
chart partial
<%= javascript_include_tag "https://www.gstatic.com/charts/loader.js" %>
<%= line_chart User.group_by_week(:created_at).count %>
dashboard.rb
column do
panel "Recent User Additions" do
table_for User.order("id desc").limit(10).each do |_user|
column(:email) { |user| link_to(user.email, admin_user_path(user)) }
column(:state_waters) { |user| link_to(user.state_waters, admin_user_path(user)) }
column(:state_waters) { |user| link_to(user.home_port, admin_user_path(user)) }
end
end