<commit_before><%= content_for :sidebar do %>
	<li class="nav-header"><%= t('categories.sidebar.headers.categories') %></li>
	<li>
		<% icn = '<i class="icon-pencil"></i>' %>
		<% ttl = t('categories.sidebar.categories.new') %>
		<%= link_to "#{icn} #{ttl}".html_safe, new_category_path %>
	</li>
	<%= render "sidebar/shortcuts" %>
<% end %>
<div class="page-header">
	<h1><%= @category.display_name.titleize %></h1>
</div>
<div class="row-fluid">
	<div class="span6">
		<h2>Spending by month</h2>
		<table class="table table-striped" id="data">
			<thead>
			<tr>
				<th>Month</th>
				<th>Amount</th>
			</tr>
			</thead>
			<tbody>
			<% @months.each do |month| %>
			<tr>
				<td class="month"><%= month[:title] %></td>
				<td class="amount"><%= number_to_currency month[:amount] %></td>
			</tr>
			<% end %>
			</tbody>
		</table>
	</div>
	<div class="span6">
		<div id="barchart"></div>
	</div>
</div>
<script type="text/javascript" charset="utf-8">
$(function() {
	var r = Raphael("barchart", 352, 150);
	
	// Grab the data
  var labels = [],
      data = [];
  $("#data td.month").each(function () {
      labels.push($(this).html());
  });
  $("#data td.amount").each(function () {
      data.push(parseFloat($(this).html()));
  });

	var bc = r.barchart(10, 10, 330, 120, [data]);
	bc.hover(function () {
		this.bar.stop();
		this.bar.scale(1.1, 1.1, this.cx, this.cy);
	}, function () {
		this.bar.animate({ transform: 's1 1 ' + this.cx + ' ' + this.cy }, 500, "bounce");
	});
	
});	
</script><commit_msg>remove scale on hover and add tooltip to category chart<commit_after><%= content_for :sidebar do %>
	<li class="nav-header"><%= t('categories.sidebar.headers.categories') %></li>
	<li>
		<% icn = '<i class="icon-pencil"></i>' %>
		<% ttl = t('categories.sidebar.categories.new') %>
		<%= link_to "#{icn} #{ttl}".html_safe, new_category_path %>
	</li>
	<%= render "sidebar/shortcuts" %>
<% end %>
<div class="page-header">
	<h1><%= @category.display_name.titleize %></h1>
</div>
<div class="row-fluid">
	<div class="span6">
		<h2>Spending by month</h2>
		<table class="table table-striped" id="data">
			<thead>
			<tr>
				<th>Month</th>
				<th>Amount</th>
			</tr>
			</thead>
			<tbody>
			<% @months.each do |month| %>
			<tr>
				<td class="month"><%= month[:title] %></td>
				<td class="amount"><%= number_to_currency month[:amount] %></td>
			</tr>
			<% end %>
			</tbody>
		</table>
	</div>
	<div class="span6">
		<div id="barchart"></div>
	</div>
</div>
<script type="text/javascript" charset="utf-8">
$(function() {
	var r = Raphael("barchart", 352, 150);
	
	// Grab the data
  var labels = [],
      data = [];
  $("#data td.month").each(function () {
      labels.push($(this).html());
  });
  $("#data td.amount").each(function () {
      data.push(parseFloat($(this).html()));
  });

	var bc = r.barchart(10, 10, 330, 120, [data]);
	bc.hover(function () {
		this.flag = r.popup(this.bar.x, this.bar.y, this.bar.value || "0").insertBefore(this);
	}, function () {
		this.flag.animate({opacity: 0}, 300, function () {this.remove();});
	});
});	
</script>
{'fraction_non_alphanumeric': 0.25234855847100746, 'fraction_numerical': 0.019436345966958212, 'mean_word_length': 3.615844544095665, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 107, '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': '6324920', 'n_tokens_mistral': 1363, 'n_tokens_neox': 1181, 'n_words': 233}