diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-14 15:14:08 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-14 15:14:08 +0300 |
commit | 6579ba3e7733d061c77d56cdd7aa98b7c38a94d6 (patch) | |
tree | 0d21ccfbd7363c0979b4e2129b6af3f49e9c07ed /app/assets | |
parent | ddaa1f1fe6bfaeac4ddc9ef6301163e2fe69c1e7 (diff) | |
download | gitlab-ce-6579ba3e7733d061c77d56cdd7aa98b7c38a94d6.tar.gz |
Increase graphs height
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/stat_graph_contributors_graph.js.coffee | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/app/assets/javascripts/stat_graph_contributors_graph.js.coffee b/app/assets/javascripts/stat_graph_contributors_graph.js.coffee index 29583a18246..48443644169 100644 --- a/app/assets/javascripts/stat_graph_contributors_graph.js.coffee +++ b/app/assets/javascripts/stat_graph_contributors_graph.js.coffee @@ -1,8 +1,8 @@ class window.ContributorsGraph MARGIN: top: 20 - right: 20 - bottom: 30 + right: 20 + bottom: 30 left: 50 x_domain: null y_domain: null @@ -38,7 +38,7 @@ class window.ContributorsGraph @y = d3.scale.linear().range([height, 0]).nice() draw_x_axis: -> @svg.append("g").attr("class", "x axis").attr("transform", "translate(0, #{@height})") - .call(@x_axis); + .call(@x_axis) draw_y_axis: -> @svg.append("g").attr("class", "y axis").call(@y_axis) set_data: (data) -> @@ -51,7 +51,7 @@ class window.ContributorsMasterGraph extends ContributorsGraph else @width = 870 - @height = 125 + @height = 200 @x = null @y = null @x_axis = null @@ -61,7 +61,7 @@ class window.ContributorsMasterGraph extends ContributorsGraph @brush = null @x_max_domain = null process_dates: (data) -> - dates = @get_dates(data) + dates = @get_dates(data) @parse_dates(data) ContributorsGraph.set_dates(dates) get_dates: (data) -> @@ -87,14 +87,16 @@ class window.ContributorsMasterGraph extends ContributorsGraph @area = d3.svg.area().x((d) -> x(d.date) ).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") create_brush: -> @brush = d3.svg.brush().x(@x).on("brushend", @update_content) draw_path: (data) -> @svg.append("path").datum(data).attr("class", "area").attr("d", @area) 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: => ContributorsGraph.set_x_domain(if @brush.empty() then @x_max_domain else @brush.extent()) $("#brush_change").trigger('change') @@ -126,8 +128,8 @@ class window.ContributorsAuthorGraph extends ContributorsGraph @width = 490 else @width = 380 - - @height = 130 + + @height = 200 @x = null @y = null @x_axis = null |