aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-03-27 12:04:48 +0200
committerGitHub <noreply@github.com>2017-03-27 12:04:48 +0200
commit7d963d84f40ee3db3b51c557fb596aa9febf82bb (patch)
tree7f761f198fae4ad898f4dd98703923921520098b /server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
parent48699b502c866ea5a309c57f8ad5e737d1933280 (diff)
downloadsonarqube-7d963d84f40ee3db3b51c557fb596aa9febf82bb.tar.gz
sonarqube-7d963d84f40ee3db3b51c557fb596aa9febf82bb.zip
optimize js bundles (#1855)
Diffstat (limited to 'server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js')
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
index 0ceca9b9952..4be08ed6802 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
@@ -18,9 +18,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import $ from 'jquery';
-import groupBy from 'lodash/groupBy';
-import sortBy from 'lodash/sortBy';
-import toPairs from 'lodash/toPairs';
+import { select } from 'd3-selection';
+import { arc as d3Arc, pie as d3Pie } from 'd3-shape';
+import { groupBy, sortBy, toPairs } from 'lodash';
import ModalView from '../../common/modals';
import Template from './templates/source-viewer-measures.hbs';
import { getMeasures } from '../../../api/measures';
@@ -68,11 +68,11 @@ export default ModalView.extend({
const options = { ...defaults, ...$(this).data() };
const radius = options.size / 2;
- const container = d3.select(this);
+ const container = select(this);
const svg = container.append('svg').attr('width', options.size).attr('height', options.size);
const plot = svg.append('g').attr('transform', trans(radius, radius));
- const arc = d3.svg.arc().innerRadius(radius - options.thickness).outerRadius(radius);
- const pie = d3.layout.pie().sort(null).value(d => d);
+ const arc = d3Arc().innerRadius(radius - options.thickness).outerRadius(radius);
+ const pie = d3Pie().sort(null).value(d => d);
const colors = function(i) {
return i === 0 ? options.color : options.baseColor;
};