summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-11-24 16:01:01 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-12-18 16:13:35 -0600
commitbe60cca90d510061a91a7be36df4c0fb6469587a (patch)
tree9e335771968da6d8e8d29dd563f13968af6cf1bd /app
parent49bc458ad792a095c5ab5ebfc6b3cdf2f655bb92 (diff)
downloadgitlab-ce-be60cca90d510061a91a7be36df4c0fb6469587a.tar.gz
fixed specs and the non-rendering stat_graph_contributors_graph
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/common_d3/index.js2
-rw-r--r--app/assets/javascripts/graphs/stat_graph_contributors_graph.js11
2 files changed, 6 insertions, 7 deletions
diff --git a/app/assets/javascripts/common_d3/index.js b/app/assets/javascripts/common_d3/index.js
index f833e9840a0..2032f89b815 100644
--- a/app/assets/javascripts/common_d3/index.js
+++ b/app/assets/javascripts/common_d3/index.js
@@ -36,5 +36,5 @@ export {
} from 'd3-axis';
export {
- brush,
+ brushX,
} from 'd3-brush';
diff --git a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js
index a7c7d36e45f..8d2150a92cf 100644
--- a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js
+++ b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js
@@ -5,13 +5,12 @@ import {
extent as d3Extent,
max as d3Max,
select as d3Select,
- selectAll as d3SelectAll,
scaleTime as d3ScaleTime,
scaleLinear as d3ScaleLinear,
axisLeft as d3AxisLeft,
axisBottom as d3AxisBottom,
area as d3Area,
- brush as d3Brush,
+ brushX as d3BrushX,
timeParse as d3TimeParse,
} from '../common_d3/index';
@@ -163,11 +162,11 @@ export const ContributorsMasterGraph = (function(superClass) {
}).y0(this.height).y1(function(d) {
d.commits = d.commits || d.additions || d.deletions;
return y(d.commits);
- }).interpolate("basis");
+ });
};
ContributorsMasterGraph.prototype.create_brush = function() {
- return this.brush = d3Brush().x(this.x).on("brushend", this.update_content);
+ return this.brush = d3BrushX(this.x).on("end", this.update_content);
};
ContributorsMasterGraph.prototype.draw_path = function(data) {
@@ -257,11 +256,11 @@ export const ContributorsAuthorGraph = (function(superClass) {
return y(0);
}
};
- })(this)).interpolate("basis");
+ })(this));
};
ContributorsAuthorGraph.prototype.create_svg = function() {
- this.list_item = d3SelectAll(".person")[0].pop();
+ this.list_item = document.querySelectorAll('.person')[0];
return this.svg = d3Select(this.list_item).append("svg").attr("width", this.width + this.MARGIN.left + this.MARGIN.right).attr("height", this.height + this.MARGIN.top + this.MARGIN.bottom).attr("class", "spark").append("g").attr("transform", "translate(" + this.MARGIN.left + "," + this.MARGIN.top + ")");
};