Commit 278d2abaafa97a709fdcf5a34ed1df858d9ca51d
1 parent
d9ab7ba6
Exists in
master
and in
4 other branches
show commits count when hover chart on stats page
Showing
3 changed files
with
20 additions
and
7 deletions
Show diff stats
app/assets/javascripts/chart.js.coffee
... | ... | @@ -4,9 +4,18 @@ |
4 | 4 | |
5 | 5 | init: (labels, values, title) -> |
6 | 6 | r = Raphael('activity-chart') |
7 | + | |
8 | + fin = -> | |
9 | + @flag = r.popup(@bar.x, @bar.y, @bar.value or "0").insertBefore(this) | |
10 | + | |
11 | + fout = -> | |
12 | + @flag.animate | |
13 | + opacity: 0, 300, -> @remove() | |
14 | + | |
7 | 15 | r.text(160, 10, title).attr font: "13px sans-serif" |
8 | 16 | r.barchart( |
9 | - 10, 10, 400, 160, | |
17 | + 10, 20, 560, 200, | |
10 | 18 | [values], |
11 | 19 | {colors:["#456"]} |
12 | 20 | ).label(labels, true) |
21 | + .hover(fin, fout) | ... | ... |
app/assets/stylesheets/common.scss
app/views/repositories/stats.html.haml
1 | 1 | = render "commits/head" |
2 | 2 | .row |
3 | - .span5 | |
4 | - %h4 | |
5 | - Stats: | |
3 | + .span6 | |
4 | + %div#activity-chart.chart | |
5 | + %hr | |
6 | 6 | %p |
7 | 7 | %b Total commits: |
8 | 8 | %span= @stats.commits_count |
... | ... | @@ -13,9 +13,8 @@ |
13 | 13 | %b Authors: |
14 | 14 | %span= @stats.authors_count |
15 | 15 | |
16 | - %br | |
17 | - %div#activity-chart | |
18 | - .span7 | |
16 | + | |
17 | + .span6 | |
19 | 18 | %h4 Top 50 Committers: |
20 | 19 | %ol.styled |
21 | 20 | - @stats.authors[0...50].each do |author| | ... | ... |