From 7d963d84f40ee3db3b51c557fb596aa9febf82bb Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 27 Mar 2017 12:04:48 +0200 Subject: optimize js bundles (#1855) --- .../js/components/SourceViewer/views/measures-overlay.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js') 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; }; -- cgit v1.2.3