anchor.diff:    <% content_for :scripts do %>
     <script>
       $(function() {
  -      var chart = {
  -        label: "Stars",
  -        data: <%= JSON.generate(current_page.week_history.map {|day| [day.timestamp * 1000, day.stars] }) %>
  +      <% ['stars', 'forks', 'issues'].each do |type| %>
  +      var chart_<%= type %> = {
  +        label: "<%= type.capitalize %>",
  +        data: <%= JSON.generate(current_page.week_history.map {|day| [day.timestamp * 1000, day.send(type)] }) %>
         };
  -      var options = {
  +      var options_<%= type %> = {
           yaxis: {
             tickDecimals: 0
           },
  
positive.code:           mode: "time"
          }
        };
  
        $.plot("#stars-chart", [chart] , options);
      });
  
    </script>
  
negative.code:       </div>
        <div class="charts">
          <div id="stars-chart" class="chart"></div>
          <div id="forks-chart" class="chart"></div>
          <div id="issues-chart" class="chart"></div>
        </div>
      </div>
    </div>
  