<p id="notice"><%= notice %></p>

<h3>Statistics for <%= @smoke_detector.location %></h3>

<table class="table">
  <thead>
    <tr>
      <th>Posts scanned</th>
      <th>At</th>
    </tr>
  </thead>

  <tbody>
    <% @statistics.each do |statistic| %>
      <tr>
        <td><%= statistic.posts_scanned %></td>
        <td><%= time_ago_in_words statistic.created_at %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<p id="notice"><%= notice %></p>

<h3>Statistics for <%= @smoke_detector.location %></h3>

<%= line_chart @statistics.group_by_hour(:created_at, range: 3.days.ago.to_date..Time.now).sum(:posts_scanned) %>

<table class="table">
  <thead>
    <tr>
      <th>Posts scanned</th>
      <th>At</th>
    </tr>
  </thead>

  <tbody>
    <% @statistics.each do |statistic| %>
      <tr>
        <td><%= statistic.posts_scanned %></td>
        <td><%= time_ago_in_words statistic.created_at %></td>
      </tr>
    <% end %>
  </tbody>
</table>

Add line chart to statistics page
Add line chart to statistics page
