Commit 278d2aba authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

show commits count when hover chart on stats page

parent d9ab7ba6
...@@ -4,9 +4,18 @@ ...@@ -4,9 +4,18 @@
init: (labels, values, title) -> init: (labels, values, title) ->
r = Raphael('activity-chart') r = Raphael('activity-chart')
fin = ->
@flag = r.popup(@bar.x, @bar.y, @bar.value or "0").insertBefore(this)
fout = ->
@flag.animate
opacity: 0, 300, -> @remove()
r.text(160, 10, title).attr font: "13px sans-serif" r.text(160, 10, title).attr font: "13px sans-serif"
r.barchart( r.barchart(
10, 10, 400, 160, 10, 20, 560, 200,
[values], [values],
{colors:["#456"]} {colors:["#456"]}
).label(labels, true) ).label(labels, true)
.hover(fin, fout)
...@@ -555,3 +555,8 @@ img.emoji { ...@@ -555,3 +555,8 @@ img.emoji {
text-shadow: 0 1px 1px #111; text-shadow: 0 1px 1px #111;
font-weight: normal; font-weight: normal;
} }
.chart {
overflow: hidden;
height: 220px;
}
= render "commits/head" = render "commits/head"
.row .row
.span5 .span6
%h4 %div#activity-chart.chart
Stats: %hr
%p %p
%b Total commits: %b Total commits:
%span= @stats.commits_count %span= @stats.commits_count
...@@ -13,9 +13,8 @@ ...@@ -13,9 +13,8 @@
%b Authors: %b Authors:
%span= @stats.authors_count %span= @stats.authors_count
%br
%div#activity-chart .span6
.span7
%h4 Top 50 Committers: %h4 Top 50 Committers:
%ol.styled %ol.styled
- @stats.authors[0...50].each do |author| - @stats.authors[0...50].each do |author|
......
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