Commit 6d07a974 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

move js code related to repo barchart to chart.js.coffee

parent 3fba2114
@Chart =
labels: []
values: []
init: (labels, values, title) ->
r = Raphael('activity-chart')
r.text(160, 10, title).attr font: "13px sans-serif"
r.barchart(
10, 10, 400, 160,
[values],
{colors:["#456"]}
).label(labels, true)
......@@ -31,11 +31,6 @@
$(function(){
var labels = [#{@graph.labels.to_json}];
var commits = [#{@graph.commits.join(', ')}];
var r = Raphael('activity-chart');
r.text(160, 10, "Commit activity for last #{@graph.weeks} weeks").attr({ font: "13px sans-serif" });
r.barchart(
10, 10, 400, 160,
[commits],
{colors:["#456"]}
).label(labels, true);
var title = "Commit activity for last #{@graph.weeks} weeks";
Chart.init(labels, commits, title);
})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment