Do explicit imports for d3 instead of wildcards

This commit is contained in:
Adrian Hall
2020-05-11 07:10:04 +01:00
parent 8ef3aee7e7
commit 053a86c0d4
20 changed files with 136 additions and 118 deletions

View File

@@ -1,4 +1,4 @@
import * as d3 from 'd3';
import { arc as d3arc } from 'd3';
export const drawRect = function(elem, rectData) {
const rectElem = elem.append('rect');
@@ -53,8 +53,7 @@ export const drawFace = function(element, faceData) {
.attr('stroke', '#666');
function smile(face) {
const arc = d3
.arc()
const arc = d3arc()
.startAngle(Math.PI / 2)
.endAngle(3 * (Math.PI / 2))
.innerRadius(radius / 2)
@@ -67,8 +66,7 @@ export const drawFace = function(element, faceData) {
}
function sad(face) {
const arc = d3
.arc()
const arc = d3arc()
.startAngle((3 * Math.PI) / 2)
.endAngle(5 * (Math.PI / 2))
.innerRadius(radius / 2)