diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-25 12:39:58 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-25 12:39:58 +0300 |
commit | 8fb84104e4c50c77d1ec66ebf207b057fa58f043 (patch) | |
tree | 109f57586b2d1b79d8f0507e8aa4f89213c1ecf3 /app/assets | |
parent | d40e6bc228ce68cb3e77161e1ef62b039b41fef5 (diff) | |
download | gitlab-ce-8fb84104e4c50c77d1ec66ebf207b057fa58f043.tar.gz |
Use graph ticks to make axis more readable
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/stat_graph_contributors_graph.js.coffee | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/stat_graph_contributors_graph.js.coffee b/app/assets/javascripts/stat_graph_contributors_graph.js.coffee index e7a120fb572..15cf68ff31b 100644 --- a/app/assets/javascripts/stat_graph_contributors_graph.js.coffee +++ b/app/assets/javascripts/stat_graph_contributors_graph.js.coffee @@ -71,7 +71,7 @@ class window.ContributorsMasterGraph extends ContributorsGraph super @width, @height create_axes: -> @x_axis = d3.svg.axis().scale(@x).orient("bottom") - @y_axis = d3.svg.axis().scale(@y).orient("left") + @y_axis = d3.svg.axis().scale(@y).orient("left").ticks(5) create_svg: -> @svg = d3.select("#contributors-master").append("svg") .attr("width", @width + @MARGIN.left + @MARGIN.right) @@ -130,8 +130,8 @@ class window.ContributorsAuthorGraph extends ContributorsGraph create_scale: -> super @width, @height create_axes: -> - @x_axis = d3.svg.axis().scale(@x).orient("bottom").tickFormat(d3.time.format("%m/%d")); - @y_axis = d3.svg.axis().scale(@y).orient("left") + @x_axis = d3.svg.axis().scale(@x).orient("bottom").ticks(8) + @y_axis = d3.svg.axis().scale(@y).orient("left").ticks(5) create_area: (x, y) -> @area = d3.svg.area().x((d) -> parseDate = d3.time.format("%Y-%m-%d").parse @@ -148,7 +148,7 @@ class window.ContributorsAuthorGraph extends ContributorsGraph .append("g") .attr("transform", "translate(" + @MARGIN.left + "," + @MARGIN.top + ")") draw_path: (data) -> - @svg.append("path").datum(data).attr("class", "area-contributor").attr("d", @area); + @svg.append("path").datum(data).attr("class", "area-contributor").attr("d", @area) draw: -> @create_scale() @create_axes() |