Commit 6579ba3e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Increase graphs height

parent ddaa1f1f
...@@ -38,7 +38,7 @@ class window.ContributorsGraph ...@@ -38,7 +38,7 @@ class window.ContributorsGraph
@y = d3.scale.linear().range([height, 0]).nice() @y = d3.scale.linear().range([height, 0]).nice()
draw_x_axis: -> draw_x_axis: ->
@svg.append("g").attr("class", "x axis").attr("transform", "translate(0, #{@height})") @svg.append("g").attr("class", "x axis").attr("transform", "translate(0, #{@height})")
.call(@x_axis); .call(@x_axis)
draw_y_axis: -> draw_y_axis: ->
@svg.append("g").attr("class", "y axis").call(@y_axis) @svg.append("g").attr("class", "y axis").call(@y_axis)
set_data: (data) -> set_data: (data) ->
...@@ -51,7 +51,7 @@ class window.ContributorsMasterGraph extends ContributorsGraph ...@@ -51,7 +51,7 @@ class window.ContributorsMasterGraph extends ContributorsGraph
else else
@width = 870 @width = 870
@height = 125 @height = 200
@x = null @x = null
@y = null @y = null
@x_axis = null @x_axis = null
...@@ -87,14 +87,16 @@ class window.ContributorsMasterGraph extends ContributorsGraph ...@@ -87,14 +87,16 @@ class window.ContributorsMasterGraph extends ContributorsGraph
@area = d3.svg.area().x((d) -> @area = d3.svg.area().x((d) ->
x(d.date) x(d.date)
).y0(@height).y1((d) -> ).y0(@height).y1((d) ->
y(d.commits = d.commits ? d.additions ? d.deletions) xa = d.commits = d.commits ? d.additions ? d.deletions
console.log(xa)
y(xa)
).interpolate("basis") ).interpolate("basis")
create_brush: -> create_brush: ->
@brush = d3.svg.brush().x(@x).on("brushend", @update_content) @brush = d3.svg.brush().x(@x).on("brushend", @update_content)
draw_path: (data) -> draw_path: (data) ->
@svg.append("path").datum(data).attr("class", "area").attr("d", @area) @svg.append("path").datum(data).attr("class", "area").attr("d", @area)
add_brush: -> add_brush: ->
@svg.append("g").attr("class", "selection").call(@brush).selectAll("rect").attr("height", @height); @svg.append("g").attr("class", "selection").call(@brush).selectAll("rect").attr("height", @height)
update_content: => update_content: =>
ContributorsGraph.set_x_domain(if @brush.empty() then @x_max_domain else @brush.extent()) ContributorsGraph.set_x_domain(if @brush.empty() then @x_max_domain else @brush.extent())
$("#brush_change").trigger('change') $("#brush_change").trigger('change')
...@@ -127,7 +129,7 @@ class window.ContributorsAuthorGraph extends ContributorsGraph ...@@ -127,7 +129,7 @@ class window.ContributorsAuthorGraph extends ContributorsGraph
else else
@width = 380 @width = 380
@height = 130 @height = 200
@x = null @x = null
@y = null @y = null
@x_axis = null @x_axis = null
......
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