<commit_before><%= render 'header' %>
<div class="contextual">
  <%= link_to l(:timetable), ttevents_path, class: 'icon icon-calendar' %>
</div>
<h2>
  <%= l(:statistics)%>
</h2>
<% html_title l(:statistics) %>
<%= render 'notice' %>
<h3>月ごとの終了イベント数と作業時間（直近１０ヶ月）</h3>
<div id="chart"></div>
<% if @ttevents.present? %>
  <table class="list">
    <tr>
      <th>年月</th>
      <th>個数</th>
      <th>時間</th>
    </tr>
    <% @ttevents.each do |ttevent| %>
      <tr>
        <td>
          <%= ttevent.year %> / <%= ttevent.month %>
        </td>
        <td>
          <%= ttevent.count %>
        </td>
        <td>
          <%= ttevent.sum %>
        </td>
      </tr>
    <% end %>
  </table>
<% else %>
  <p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<% content_for :sidebar do %>
  <%= render 'side_bar' %>
<% end %>
<script>
  console.log(gon.ttevents)
  var chart = c3.generate({
    bindto: '#chart',
    data: {
      x: 'x',
      columns: gon.ttevents,
      type: 'bar',
      axes: {
        個数: 'y2'
      }
    },
    axis: {
      y2: {
        show: true
      }
    },
    bar: {
      width: {<commit_msg>fix bug c3.js timeseries at monthly view<commit_after><%= render 'header' %>
<div class="contextual">
  <%= link_to l(:timetable), ttevents_path, class: 'icon icon-calendar' %>
</div>
<h2>
  <%= l(:statistics)%>
</h2>
<% html_title l(:statistics) %>
<%= render 'notice' %>
<h3>月ごとの終了イベント数と作業時間（直近１０ヶ月）</h3>
<div id="chart"></div>
<% if @ttevents.present? %>
  <table class="list">
    <tr>
      <th>年月</th>
      <th>個数</th>
      <th>時間</th>
    </tr>
    <% @ttevents.each do |ttevent| %>
      <tr>
        <td>
          <%= ttevent.year %> / <%= ttevent.month %>
        </td>
        <td>
          <%= ttevent.count %>
        </td>
        <td>
          <%= ttevent.sum %>
        </td>
      </tr>
    <% end %>
  </table>
<% else %>
  <p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<% content_for :sidebar do %>
  <%= render 'side_bar' %>
<% end %>
<script>
  console.log(gon.ttevents)
  var chart = c3.generate({
    bindto: '#chart',
    data: {
      x: 'x',
      xFormat: '%Y%m%d',
      columns: gon.ttevents,
      type: 'bar',
      axes: {
        個数: 'y2'
      }
    },
    axis: {
      x : {
        type: 'timeseries',
        tick: {
          format: '%Y/%m'
        }
      },
      y2: {
        show: true
      }
    },
    bar: {
      width: {
{'fraction_non_alphanumeric': 0.2201569599339116, 'fraction_numerical': 0.00784799669558034, 'mean_word_length': 1.9040767386091126, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6978307', 'n_tokens_mistral': 1088, 'n_tokens_neox': 987, 'n_words': 180}