<commit_before><h1><%= @beer.name %></h1>

<div class="ink-form">
  <div class="column-group">
    <div class="all-50">
      <div class="control-group">
        <label>Price:</label>
        <div class="control control-value">
          &yen;<%= @beer.price %>
        </div>
      </div>
    </div>

    <div class="all-50">
      <div class="control-group">
        <label>Alcohol:</label>
        <div class="control control-value">
          <%= @beer.alcohol %>%
        </div>
      </div>
    </div>
  </div>

  <div class="control-group">
    <label>Memo:</label>
    <div class="control control-value-long">
      <%= hbr @beer.memo %>
    </div>
  </div>
</div>

<div class="chart-wrap">
  <canvas id="chart" width="640" height="640"></canvas>
</div>
<script>
var alchol = <%= @beer.alcohol %>;
alchol = ( alchol/15 ) * 5;

var data = {
    labels: ["Sweet", "Bitter", "Sour", "Smell", "Alchol"],
    datasets: [
        {
            label: "My First dataset",
            fillColor: "rgba(220,220,220,0.2)",
            strokeColor: "rgba(220,220,220,1)",
            pointColor: "rgba(220,220,220,1)",
            pointStrokeColor: "#fff",
            pointHighlightFill: "#fff",
            pointHighlightStroke: "rgba(220,220,220,1)",
            data: [<%= @beer.sweet %>, <%= @beer.bitter %>, <%= @beer.sour %>, <%= @beer.smell %>, alchol]
        }
    ]
};
var ctx = document.getElementById("chart").getContext("2d");
var myNewChart = new Chart(ctx).Radar(data);
</script>

<%= link_to @beer.counters.count.to_s + ' Drunk', edit_counter_path(@beer), :class=>'ink-button ink-button-bar green' %>
<%= link_to 'Edit', edit_beer_path(@beer), :class=>'ink-button ink-button-bar blue' %>
<%= link_to 'Delete', @beer, method: :delete, data: { confirm: 'Are you sure?' }, :class=>'ink-button ink-button-bar red' %>
<%= link_to 'Back', beers_path, :class=>'ink-button ink-button-bar' %><commit_msg>Edit Chart.js Option<commit_after><h1><%= @beer.name %></h1>

<div class="ink-form">
  <div class="column-group">
    <div class="all-50">
      <div class="control-group">
        <label>Price:</label>
        <div class="control control-value">
          &yen;<%= @beer.price %>
        </div>
      </div>
    </div>

    <div class="all-50">
      <div class="control-group">
        <label>Alcohol:</label>
        <div class="control control-value">
          <%= @beer.alcohol %>%
        </div>
      </div>
    </div>
  </div>

  <div class="control-group">
    <label>Memo:</label>
    <div class="control control-value-long">
      <%= hbr @beer.memo %>
    </div>
  </div>
</div>

<div class="chart-wrap">
  <canvas id="chart" width="640" height="640"></canvas>
</div>
<script>
var alchol = <%= @beer.alcohol %>;
alchol = Math.round( ( alchol/15 ) * 500 ) / 100;

var data = {
    labels: ["Sweet", "Bitter", "Sour", "Smell", "Alchol"],
    datasets: [
        {
            label: "My First dataset",
            fillColor: "rgba(220,220,220,0.2)",
            strokeColor: "rgba(220,220,220,1)",
            pointColor: "rgba(220,220,220,1)",
            pointStrokeColor: "#fff",
            pointHighlightFill: "#fff",
            pointHighlightStroke: "rgba(220,220,220,1)",
            data: [<%= @beer.sweet %>, <%= @beer.bitter %>, <%= @beer.sour %>, <%= @beer.smell %>, alchol]
        }
    ]
};
var ctx = document.getElementById("chart").getContext("2d");
var myNewChart = new Chart(ctx).Radar( data, {
  scaleOverride : true,
  scaleSteps : 5,
  scaleStepWidth : 1,
  scaleStartValue : 0
} );
</script>

<%= link_to @beer.counters.count.to_s + ' Drunk', edit_counter_path(@beer), :class=>'ink-button ink-button-bar green' %>
<%= link_to 'Edit', edit_beer_path(@beer), :class=>'ink-button ink-button-bar blue' %>
<%= link_to 'Delete', @beer, method: :delete, data: { confirm: 'Are you sure?' }, :class=>'ink-button ink-button-bar red' %>
<%= link_to 'Back', beers_path, :class=>'ink-button ink-button-bar' %>
{'fraction_non_alphanumeric': 0.21395939086294416, 'fraction_numerical': 0.030964467005076143, 'mean_word_length': 2.8713163064833007, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 105, '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': '2202902', 'n_tokens_mistral': 1555, 'n_tokens_neox': 1411, 'n_words': 269}