@hpcc-js/chart 2.75.0 → 2.76.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es6.js +575 -597
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +578 -600
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +9 -25
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -3,8 +3,8 @@ import { select, scaleTime, timeParse, timeFormat, scaleLog, format, scalePow, s
|
|
|
3
3
|
import { normalizeRadians, degreesToRadians } from '@hpcc-js/util';
|
|
4
4
|
|
|
5
5
|
var PKG_NAME = "@hpcc-js/chart";
|
|
6
|
-
var PKG_VERSION = "2.
|
|
7
|
-
var BUILD_VERSION = "2.
|
|
6
|
+
var PKG_VERSION = "2.76.1";
|
|
7
|
+
var BUILD_VERSION = "2.102.4";
|
|
8
8
|
|
|
9
9
|
/*! *****************************************************************************
|
|
10
10
|
Copyright (c) Microsoft Corporation.
|
|
@@ -55,13 +55,13 @@ function __spreadArray(to, from, pack) {
|
|
|
55
55
|
ar[i] = from[i];
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
return to.concat(ar || from);
|
|
58
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
var pi = Math.PI,
|
|
62
|
-
tau = 2 * pi,
|
|
63
|
-
epsilon = 1e-6,
|
|
64
|
-
tauEpsilon = tau - epsilon;
|
|
61
|
+
var pi$3 = Math.PI,
|
|
62
|
+
tau$3 = 2 * pi$3,
|
|
63
|
+
epsilon$3 = 1e-6,
|
|
64
|
+
tauEpsilon = tau$3 - epsilon$3;
|
|
65
65
|
|
|
66
66
|
function Path() {
|
|
67
67
|
this._x0 = this._y0 = // start of current subpath
|
|
@@ -112,12 +112,12 @@ Path.prototype = path.prototype = {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
|
|
115
|
-
else if (!(l01_2 > epsilon));
|
|
115
|
+
else if (!(l01_2 > epsilon$3));
|
|
116
116
|
|
|
117
117
|
// Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
|
|
118
118
|
// Equivalently, is (x1,y1) coincident with (x2,y2)?
|
|
119
119
|
// Or, is the radius zero? Line to (x1,y1).
|
|
120
|
-
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
|
|
120
|
+
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon$3) || !r) {
|
|
121
121
|
this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -129,12 +129,12 @@ Path.prototype = path.prototype = {
|
|
|
129
129
|
l20_2 = x20 * x20 + y20 * y20,
|
|
130
130
|
l21 = Math.sqrt(l21_2),
|
|
131
131
|
l01 = Math.sqrt(l01_2),
|
|
132
|
-
l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
|
|
132
|
+
l = r * Math.tan((pi$3 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
|
|
133
133
|
t01 = l / l01,
|
|
134
134
|
t21 = l / l21;
|
|
135
135
|
|
|
136
136
|
// If the start tangent is not coincident with (x0,y0), line to.
|
|
137
|
-
if (Math.abs(t01 - 1) > epsilon) {
|
|
137
|
+
if (Math.abs(t01 - 1) > epsilon$3) {
|
|
138
138
|
this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -159,7 +159,7 @@ Path.prototype = path.prototype = {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
|
|
162
|
-
else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
|
|
162
|
+
else if (Math.abs(this._x1 - x0) > epsilon$3 || Math.abs(this._y1 - y0) > epsilon$3) {
|
|
163
163
|
this._ += "L" + x0 + "," + y0;
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -167,7 +167,7 @@ Path.prototype = path.prototype = {
|
|
|
167
167
|
if (!r) return;
|
|
168
168
|
|
|
169
169
|
// Does the angle go the wrong way? Flip the direction.
|
|
170
|
-
if (da < 0) da = da % tau + tau;
|
|
170
|
+
if (da < 0) da = da % tau$3 + tau$3;
|
|
171
171
|
|
|
172
172
|
// Is this a complete circle? Draw two arcs to complete the circle.
|
|
173
173
|
if (da > tauEpsilon) {
|
|
@@ -175,8 +175,8 @@ Path.prototype = path.prototype = {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
// Is this arc non-empty? Draw an arc!
|
|
178
|
-
else if (da > epsilon) {
|
|
179
|
-
this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
|
|
178
|
+
else if (da > epsilon$3) {
|
|
179
|
+
this._ += "A" + r + "," + r + ",0," + (+(da >= pi$3)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
182
|
rect: function(x, y, w, h) {
|
|
@@ -187,68 +187,68 @@ Path.prototype = path.prototype = {
|
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
function constant(x) {
|
|
190
|
+
function constant$3(x) {
|
|
191
191
|
return function constant() {
|
|
192
192
|
return x;
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
var abs = Math.abs;
|
|
196
|
+
var abs$1 = Math.abs;
|
|
197
197
|
var atan2 = Math.atan2;
|
|
198
198
|
var cos = Math.cos;
|
|
199
199
|
var max = Math.max;
|
|
200
200
|
var min = Math.min;
|
|
201
201
|
var sin = Math.sin;
|
|
202
|
-
var sqrt = Math.sqrt;
|
|
202
|
+
var sqrt$1 = Math.sqrt;
|
|
203
203
|
|
|
204
|
-
var epsilon$
|
|
205
|
-
var pi$
|
|
206
|
-
var halfPi = pi$
|
|
207
|
-
var tau$
|
|
204
|
+
var epsilon$2 = 1e-12;
|
|
205
|
+
var pi$2 = Math.PI;
|
|
206
|
+
var halfPi$1 = pi$2 / 2;
|
|
207
|
+
var tau$2 = 2 * pi$2;
|
|
208
208
|
|
|
209
209
|
function acos(x) {
|
|
210
|
-
return x > 1 ? 0 : x < -1 ? pi$
|
|
210
|
+
return x > 1 ? 0 : x < -1 ? pi$2 : Math.acos(x);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
function asin(x) {
|
|
214
|
-
return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
|
|
213
|
+
function asin$1(x) {
|
|
214
|
+
return x >= 1 ? halfPi$1 : x <= -1 ? -halfPi$1 : Math.asin(x);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
function arcInnerRadius(d) {
|
|
217
|
+
function arcInnerRadius$1(d) {
|
|
218
218
|
return d.innerRadius;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
function arcOuterRadius(d) {
|
|
221
|
+
function arcOuterRadius$1(d) {
|
|
222
222
|
return d.outerRadius;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
function arcStartAngle(d) {
|
|
225
|
+
function arcStartAngle$1(d) {
|
|
226
226
|
return d.startAngle;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
function arcEndAngle(d) {
|
|
229
|
+
function arcEndAngle$1(d) {
|
|
230
230
|
return d.endAngle;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
function arcPadAngle(d) {
|
|
233
|
+
function arcPadAngle$1(d) {
|
|
234
234
|
return d && d.padAngle; // Note: optional!
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
237
|
+
function intersect$1(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
238
238
|
var x10 = x1 - x0, y10 = y1 - y0,
|
|
239
239
|
x32 = x3 - x2, y32 = y3 - y2,
|
|
240
240
|
t = y32 * x10 - x32 * y10;
|
|
241
|
-
if (t * t < epsilon$
|
|
241
|
+
if (t * t < epsilon$2) return;
|
|
242
242
|
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
|
|
243
243
|
return [x0 + t * x10, y0 + t * y10];
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
// Compute perpendicular offset line of length rc.
|
|
247
247
|
// http://mathworld.wolfram.com/Circle-LineIntersection.html
|
|
248
|
-
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
|
248
|
+
function cornerTangents$1(x0, y0, x1, y1, r1, rc, cw) {
|
|
249
249
|
var x01 = x0 - x1,
|
|
250
250
|
y01 = y0 - y1,
|
|
251
|
-
lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),
|
|
251
|
+
lo = (cw ? rc : -rc) / sqrt$1(x01 * x01 + y01 * y01),
|
|
252
252
|
ox = lo * y01,
|
|
253
253
|
oy = -lo * x01,
|
|
254
254
|
x11 = x0 + ox,
|
|
@@ -262,7 +262,7 @@ function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
|
|
262
262
|
d2 = dx * dx + dy * dy,
|
|
263
263
|
r = r1 - rc,
|
|
264
264
|
D = x11 * y10 - x10 * y11,
|
|
265
|
-
d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),
|
|
265
|
+
d = (dy < 0 ? -1 : 1) * sqrt$1(max(0, r * r * d2 - D * D)),
|
|
266
266
|
cx0 = (D * dy - dx * d) / d2,
|
|
267
267
|
cy0 = (-D * dx - dy * d) / d2,
|
|
268
268
|
cx1 = (D * dy + dx * d) / d2,
|
|
@@ -287,13 +287,13 @@ function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
function d3Arc() {
|
|
290
|
-
var innerRadius = arcInnerRadius,
|
|
291
|
-
outerRadius = arcOuterRadius,
|
|
292
|
-
cornerRadius = constant(0),
|
|
290
|
+
var innerRadius = arcInnerRadius$1,
|
|
291
|
+
outerRadius = arcOuterRadius$1,
|
|
292
|
+
cornerRadius = constant$3(0),
|
|
293
293
|
padRadius = null,
|
|
294
|
-
startAngle = arcStartAngle,
|
|
295
|
-
endAngle = arcEndAngle,
|
|
296
|
-
padAngle = arcPadAngle,
|
|
294
|
+
startAngle = arcStartAngle$1,
|
|
295
|
+
endAngle = arcEndAngle$1,
|
|
296
|
+
padAngle = arcPadAngle$1,
|
|
297
297
|
context = null;
|
|
298
298
|
|
|
299
299
|
function arc() {
|
|
@@ -301,9 +301,9 @@ function d3Arc() {
|
|
|
301
301
|
r,
|
|
302
302
|
r0 = +innerRadius.apply(this, arguments),
|
|
303
303
|
r1 = +outerRadius.apply(this, arguments),
|
|
304
|
-
a0 = startAngle.apply(this, arguments) - halfPi,
|
|
305
|
-
a1 = endAngle.apply(this, arguments) - halfPi,
|
|
306
|
-
da = abs(a1 - a0),
|
|
304
|
+
a0 = startAngle.apply(this, arguments) - halfPi$1,
|
|
305
|
+
a1 = endAngle.apply(this, arguments) - halfPi$1,
|
|
306
|
+
da = abs$1(a1 - a0),
|
|
307
307
|
cw = a1 > a0;
|
|
308
308
|
|
|
309
309
|
if (!context) context = buffer = path();
|
|
@@ -312,13 +312,13 @@ function d3Arc() {
|
|
|
312
312
|
if (r1 < r0) r = r1, r1 = r0, r0 = r;
|
|
313
313
|
|
|
314
314
|
// Is it a point?
|
|
315
|
-
if (!(r1 > epsilon$
|
|
315
|
+
if (!(r1 > epsilon$2)) context.moveTo(0, 0);
|
|
316
316
|
|
|
317
317
|
// Or is it a circle or annulus?
|
|
318
|
-
else if (da > tau$
|
|
318
|
+
else if (da > tau$2 - epsilon$2) {
|
|
319
319
|
context.moveTo(r1 * cos(a0), r1 * sin(a0));
|
|
320
320
|
context.arc(0, 0, r1, a0, a1, !cw);
|
|
321
|
-
if (r0 > epsilon$
|
|
321
|
+
if (r0 > epsilon$2) {
|
|
322
322
|
context.moveTo(r0 * cos(a1), r0 * sin(a1));
|
|
323
323
|
context.arc(0, 0, r0, a1, a0, cw);
|
|
324
324
|
}
|
|
@@ -333,20 +333,20 @@ function d3Arc() {
|
|
|
333
333
|
da0 = da,
|
|
334
334
|
da1 = da,
|
|
335
335
|
ap = padAngle.apply(this, arguments) / 2,
|
|
336
|
-
rp = (ap > epsilon$
|
|
337
|
-
rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
|
|
336
|
+
rp = (ap > epsilon$2) && (padRadius ? +padRadius.apply(this, arguments) : sqrt$1(r0 * r0 + r1 * r1)),
|
|
337
|
+
rc = min(abs$1(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
|
|
338
338
|
rc0 = rc,
|
|
339
339
|
rc1 = rc,
|
|
340
340
|
t0,
|
|
341
341
|
t1;
|
|
342
342
|
|
|
343
343
|
// Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
|
|
344
|
-
if (rp > epsilon$
|
|
345
|
-
var p0 = asin(rp / r0 * sin(ap)),
|
|
346
|
-
p1 = asin(rp / r1 * sin(ap));
|
|
347
|
-
if ((da0 -= p0 * 2) > epsilon$
|
|
344
|
+
if (rp > epsilon$2) {
|
|
345
|
+
var p0 = asin$1(rp / r0 * sin(ap)),
|
|
346
|
+
p1 = asin$1(rp / r1 * sin(ap));
|
|
347
|
+
if ((da0 -= p0 * 2) > epsilon$2) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
|
|
348
348
|
else da0 = 0, a00 = a10 = (a0 + a1) / 2;
|
|
349
|
-
if ((da1 -= p1 * 2) > epsilon$
|
|
349
|
+
if ((da1 -= p1 * 2) > epsilon$2) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
|
|
350
350
|
else da1 = 0, a01 = a11 = (a0 + a1) / 2;
|
|
351
351
|
}
|
|
352
352
|
|
|
@@ -356,7 +356,7 @@ function d3Arc() {
|
|
|
356
356
|
y10 = r0 * sin(a10);
|
|
357
357
|
|
|
358
358
|
// Apply rounded corners?
|
|
359
|
-
if (rc > epsilon$
|
|
359
|
+
if (rc > epsilon$2) {
|
|
360
360
|
var x11 = r1 * cos(a11),
|
|
361
361
|
y11 = r1 * sin(a11),
|
|
362
362
|
x00 = r0 * cos(a00),
|
|
@@ -364,25 +364,25 @@ function d3Arc() {
|
|
|
364
364
|
oc;
|
|
365
365
|
|
|
366
366
|
// Restrict the corner radius according to the sector angle.
|
|
367
|
-
if (da < pi$
|
|
367
|
+
if (da < pi$2 && (oc = intersect$1(x01, y01, x00, y00, x11, y11, x10, y10))) {
|
|
368
368
|
var ax = x01 - oc[0],
|
|
369
369
|
ay = y01 - oc[1],
|
|
370
370
|
bx = x11 - oc[0],
|
|
371
371
|
by = y11 - oc[1],
|
|
372
|
-
kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),
|
|
373
|
-
lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
|
|
372
|
+
kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt$1(ax * ax + ay * ay) * sqrt$1(bx * bx + by * by))) / 2),
|
|
373
|
+
lc = sqrt$1(oc[0] * oc[0] + oc[1] * oc[1]);
|
|
374
374
|
rc0 = min(rc, (r0 - lc) / (kc - 1));
|
|
375
375
|
rc1 = min(rc, (r1 - lc) / (kc + 1));
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
// Is the sector collapsed to a line?
|
|
380
|
-
if (!(da1 > epsilon$
|
|
380
|
+
if (!(da1 > epsilon$2)) context.moveTo(x01, y01);
|
|
381
381
|
|
|
382
382
|
// Does the sector’s outer ring have rounded corners?
|
|
383
|
-
else if (rc1 > epsilon$
|
|
384
|
-
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
|
|
385
|
-
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
|
|
383
|
+
else if (rc1 > epsilon$2) {
|
|
384
|
+
t0 = cornerTangents$1(x00, y00, x01, y01, r1, rc1, cw);
|
|
385
|
+
t1 = cornerTangents$1(x11, y11, x10, y10, r1, rc1, cw);
|
|
386
386
|
|
|
387
387
|
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
388
388
|
|
|
@@ -402,12 +402,12 @@ function d3Arc() {
|
|
|
402
402
|
|
|
403
403
|
// Is there no inner ring, and it’s a circular sector?
|
|
404
404
|
// Or perhaps it’s an annular sector collapsed due to padding?
|
|
405
|
-
if (!(r0 > epsilon$
|
|
405
|
+
if (!(r0 > epsilon$2) || !(da0 > epsilon$2)) context.lineTo(x10, y10);
|
|
406
406
|
|
|
407
407
|
// Does the sector’s inner ring (or point) have rounded corners?
|
|
408
|
-
else if (rc0 > epsilon$
|
|
409
|
-
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
|
|
410
|
-
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
|
|
408
|
+
else if (rc0 > epsilon$2) {
|
|
409
|
+
t0 = cornerTangents$1(x10, y10, x11, y11, r0, -rc0, cw);
|
|
410
|
+
t1 = cornerTangents$1(x01, y01, x00, y00, r0, -rc0, cw);
|
|
411
411
|
|
|
412
412
|
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
413
413
|
|
|
@@ -433,36 +433,36 @@ function d3Arc() {
|
|
|
433
433
|
|
|
434
434
|
arc.centroid = function() {
|
|
435
435
|
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
|
|
436
|
-
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi$
|
|
436
|
+
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi$2 / 2;
|
|
437
437
|
return [cos(a) * r, sin(a) * r];
|
|
438
438
|
};
|
|
439
439
|
|
|
440
440
|
arc.innerRadius = function(_) {
|
|
441
|
-
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
|
|
441
|
+
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant$3(+_), arc) : innerRadius;
|
|
442
442
|
};
|
|
443
443
|
|
|
444
444
|
arc.outerRadius = function(_) {
|
|
445
|
-
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
|
|
445
|
+
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant$3(+_), arc) : outerRadius;
|
|
446
446
|
};
|
|
447
447
|
|
|
448
448
|
arc.cornerRadius = function(_) {
|
|
449
|
-
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
|
|
449
|
+
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant$3(+_), arc) : cornerRadius;
|
|
450
450
|
};
|
|
451
451
|
|
|
452
452
|
arc.padRadius = function(_) {
|
|
453
|
-
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
|
|
453
|
+
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant$3(+_), arc) : padRadius;
|
|
454
454
|
};
|
|
455
455
|
|
|
456
456
|
arc.startAngle = function(_) {
|
|
457
|
-
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
|
|
457
|
+
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$3(+_), arc) : startAngle;
|
|
458
458
|
};
|
|
459
459
|
|
|
460
460
|
arc.endAngle = function(_) {
|
|
461
|
-
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
|
|
461
|
+
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$3(+_), arc) : endAngle;
|
|
462
462
|
};
|
|
463
463
|
|
|
464
464
|
arc.padAngle = function(_) {
|
|
465
|
-
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
|
|
465
|
+
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$3(+_), arc) : padAngle;
|
|
466
466
|
};
|
|
467
467
|
|
|
468
468
|
arc.context = function(_) {
|
|
@@ -472,11 +472,11 @@ function d3Arc() {
|
|
|
472
472
|
return arc;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
-
function Linear(context) {
|
|
475
|
+
function Linear$1(context) {
|
|
476
476
|
this._context = context;
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
Linear.prototype = {
|
|
479
|
+
Linear$1.prototype = {
|
|
480
480
|
areaStart: function() {
|
|
481
481
|
this._line = 0;
|
|
482
482
|
},
|
|
@@ -501,21 +501,21 @@ Linear.prototype = {
|
|
|
501
501
|
};
|
|
502
502
|
|
|
503
503
|
function d3CurveLinear(context) {
|
|
504
|
-
return new Linear(context);
|
|
504
|
+
return new Linear$1(context);
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
-
function x(p) {
|
|
507
|
+
function x$1(p) {
|
|
508
508
|
return p[0];
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
-
function y(p) {
|
|
511
|
+
function y$1(p) {
|
|
512
512
|
return p[1];
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
function d3Line() {
|
|
516
|
-
var x
|
|
517
|
-
y
|
|
518
|
-
defined = constant(true),
|
|
516
|
+
var x = x$1,
|
|
517
|
+
y = y$1,
|
|
518
|
+
defined = constant$3(true),
|
|
519
519
|
context = null,
|
|
520
520
|
curve = d3CurveLinear,
|
|
521
521
|
output = null;
|
|
@@ -534,22 +534,22 @@ function d3Line() {
|
|
|
534
534
|
if (defined0 = !defined0) output.lineStart();
|
|
535
535
|
else output.lineEnd();
|
|
536
536
|
}
|
|
537
|
-
if (defined0) output.point(+x
|
|
537
|
+
if (defined0) output.point(+x(d, i, data), +y(d, i, data));
|
|
538
538
|
}
|
|
539
539
|
|
|
540
540
|
if (buffer) return output = null, buffer + "" || null;
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
line.x = function(_) {
|
|
544
|
-
return arguments.length ? (x
|
|
544
|
+
return arguments.length ? (x = typeof _ === "function" ? _ : constant$3(+_), line) : x;
|
|
545
545
|
};
|
|
546
546
|
|
|
547
547
|
line.y = function(_) {
|
|
548
|
-
return arguments.length ? (y
|
|
548
|
+
return arguments.length ? (y = typeof _ === "function" ? _ : constant$3(+_), line) : y;
|
|
549
549
|
};
|
|
550
550
|
|
|
551
551
|
line.defined = function(_) {
|
|
552
|
-
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined;
|
|
552
|
+
return arguments.length ? (defined = typeof _ === "function" ? _ : constant$3(!!_), line) : defined;
|
|
553
553
|
};
|
|
554
554
|
|
|
555
555
|
line.curve = function(_) {
|
|
@@ -564,11 +564,11 @@ function d3Line() {
|
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
function d3Area() {
|
|
567
|
-
var x0 = x,
|
|
567
|
+
var x0 = x$1,
|
|
568
568
|
x1 = null,
|
|
569
|
-
y0 = constant(0),
|
|
570
|
-
y1 = y,
|
|
571
|
-
defined = constant(true),
|
|
569
|
+
y0 = constant$3(0),
|
|
570
|
+
y1 = y$1,
|
|
571
|
+
defined = constant$3(true),
|
|
572
572
|
context = null,
|
|
573
573
|
curve = d3CurveLinear,
|
|
574
574
|
output = null;
|
|
@@ -616,27 +616,27 @@ function d3Area() {
|
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
area.x = function(_) {
|
|
619
|
-
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), x1 = null, area) : x0;
|
|
619
|
+
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$3(+_), x1 = null, area) : x0;
|
|
620
620
|
};
|
|
621
621
|
|
|
622
622
|
area.x0 = function(_) {
|
|
623
|
-
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), area) : x0;
|
|
623
|
+
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$3(+_), area) : x0;
|
|
624
624
|
};
|
|
625
625
|
|
|
626
626
|
area.x1 = function(_) {
|
|
627
|
-
return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : x1;
|
|
627
|
+
return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant$3(+_), area) : x1;
|
|
628
628
|
};
|
|
629
629
|
|
|
630
630
|
area.y = function(_) {
|
|
631
|
-
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), y1 = null, area) : y0;
|
|
631
|
+
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$3(+_), y1 = null, area) : y0;
|
|
632
632
|
};
|
|
633
633
|
|
|
634
634
|
area.y0 = function(_) {
|
|
635
|
-
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), area) : y0;
|
|
635
|
+
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$3(+_), area) : y0;
|
|
636
636
|
};
|
|
637
637
|
|
|
638
638
|
area.y1 = function(_) {
|
|
639
|
-
return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : y1;
|
|
639
|
+
return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant$3(+_), area) : y1;
|
|
640
640
|
};
|
|
641
641
|
|
|
642
642
|
area.lineX0 =
|
|
@@ -653,7 +653,7 @@ function d3Area() {
|
|
|
653
653
|
};
|
|
654
654
|
|
|
655
655
|
area.defined = function(_) {
|
|
656
|
-
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), area) : defined;
|
|
656
|
+
return arguments.length ? (defined = typeof _ === "function" ? _ : constant$3(!!_), area) : defined;
|
|
657
657
|
};
|
|
658
658
|
|
|
659
659
|
area.curve = function(_) {
|
|
@@ -671,17 +671,17 @@ function descending(a, b) {
|
|
|
671
671
|
return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
|
|
672
672
|
}
|
|
673
673
|
|
|
674
|
-
function identity(d) {
|
|
674
|
+
function identity$2(d) {
|
|
675
675
|
return d;
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
function d3Pie() {
|
|
679
|
-
var value = identity,
|
|
679
|
+
var value = identity$2,
|
|
680
680
|
sortValues = descending,
|
|
681
681
|
sort = null,
|
|
682
|
-
startAngle = constant(0),
|
|
683
|
-
endAngle = constant(tau$
|
|
684
|
-
padAngle = constant(0);
|
|
682
|
+
startAngle = constant$3(0),
|
|
683
|
+
endAngle = constant$3(tau$2),
|
|
684
|
+
padAngle = constant$3(0);
|
|
685
685
|
|
|
686
686
|
function pie(data) {
|
|
687
687
|
var i,
|
|
@@ -692,7 +692,7 @@ function d3Pie() {
|
|
|
692
692
|
index = new Array(n),
|
|
693
693
|
arcs = new Array(n),
|
|
694
694
|
a0 = +startAngle.apply(this, arguments),
|
|
695
|
-
da = Math.min(tau$
|
|
695
|
+
da = Math.min(tau$2, Math.max(-tau$2, endAngle.apply(this, arguments) - a0)),
|
|
696
696
|
a1,
|
|
697
697
|
p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),
|
|
698
698
|
pa = p * (da < 0 ? -1 : 1),
|
|
@@ -724,7 +724,7 @@ function d3Pie() {
|
|
|
724
724
|
}
|
|
725
725
|
|
|
726
726
|
pie.value = function(_) {
|
|
727
|
-
return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), pie) : value;
|
|
727
|
+
return arguments.length ? (value = typeof _ === "function" ? _ : constant$3(+_), pie) : value;
|
|
728
728
|
};
|
|
729
729
|
|
|
730
730
|
pie.sortValues = function(_) {
|
|
@@ -736,21 +736,21 @@ function d3Pie() {
|
|
|
736
736
|
};
|
|
737
737
|
|
|
738
738
|
pie.startAngle = function(_) {
|
|
739
|
-
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), pie) : startAngle;
|
|
739
|
+
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$3(+_), pie) : startAngle;
|
|
740
740
|
};
|
|
741
741
|
|
|
742
742
|
pie.endAngle = function(_) {
|
|
743
|
-
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), pie) : endAngle;
|
|
743
|
+
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$3(+_), pie) : endAngle;
|
|
744
744
|
};
|
|
745
745
|
|
|
746
746
|
pie.padAngle = function(_) {
|
|
747
|
-
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), pie) : padAngle;
|
|
747
|
+
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$3(+_), pie) : padAngle;
|
|
748
748
|
};
|
|
749
749
|
|
|
750
750
|
return pie;
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
-
function point(that, x, y) {
|
|
753
|
+
function point$6(that, x, y) {
|
|
754
754
|
that._context.bezierCurveTo(
|
|
755
755
|
(2 * that._x0 + that._x1) / 3,
|
|
756
756
|
(2 * that._y0 + that._y1) / 3,
|
|
@@ -779,7 +779,7 @@ Basis.prototype = {
|
|
|
779
779
|
},
|
|
780
780
|
lineEnd: function() {
|
|
781
781
|
switch (this._point) {
|
|
782
|
-
case 3: point(this, this._x1, this._y1); // proceed
|
|
782
|
+
case 3: point$6(this, this._x1, this._y1); // proceed
|
|
783
783
|
case 2: this._context.lineTo(this._x1, this._y1); break;
|
|
784
784
|
}
|
|
785
785
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
@@ -791,7 +791,7 @@ Basis.prototype = {
|
|
|
791
791
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
792
792
|
case 1: this._point = 2; break;
|
|
793
793
|
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed
|
|
794
|
-
default: point(this, x, y); break;
|
|
794
|
+
default: point$6(this, x, y); break;
|
|
795
795
|
}
|
|
796
796
|
this._x0 = this._x1, this._x1 = x;
|
|
797
797
|
this._y0 = this._y1, this._y1 = y;
|
|
@@ -857,7 +857,7 @@ var d3CurveBundle = (function custom(beta) {
|
|
|
857
857
|
return bundle;
|
|
858
858
|
})(0.85);
|
|
859
859
|
|
|
860
|
-
function point$
|
|
860
|
+
function point$5(that, x, y) {
|
|
861
861
|
that._context.bezierCurveTo(
|
|
862
862
|
that._x1 + that._k * (that._x2 - that._x0),
|
|
863
863
|
that._y1 + that._k * (that._y2 - that._y0),
|
|
@@ -868,12 +868,12 @@ function point$1(that, x, y) {
|
|
|
868
868
|
);
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
-
function Cardinal(context, tension) {
|
|
871
|
+
function Cardinal$1(context, tension) {
|
|
872
872
|
this._context = context;
|
|
873
873
|
this._k = (1 - tension) / 6;
|
|
874
874
|
}
|
|
875
875
|
|
|
876
|
-
Cardinal.prototype = {
|
|
876
|
+
Cardinal$1.prototype = {
|
|
877
877
|
areaStart: function() {
|
|
878
878
|
this._line = 0;
|
|
879
879
|
},
|
|
@@ -888,7 +888,7 @@ Cardinal.prototype = {
|
|
|
888
888
|
lineEnd: function() {
|
|
889
889
|
switch (this._point) {
|
|
890
890
|
case 2: this._context.lineTo(this._x2, this._y2); break;
|
|
891
|
-
case 3: point$
|
|
891
|
+
case 3: point$5(this, this._x1, this._y1); break;
|
|
892
892
|
}
|
|
893
893
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
894
894
|
this._line = 1 - this._line;
|
|
@@ -899,7 +899,7 @@ Cardinal.prototype = {
|
|
|
899
899
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
900
900
|
case 1: this._point = 2; this._x1 = x, this._y1 = y; break;
|
|
901
901
|
case 2: this._point = 3; // proceed
|
|
902
|
-
default: point$
|
|
902
|
+
default: point$5(this, x, y); break;
|
|
903
903
|
}
|
|
904
904
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
905
905
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
|
|
@@ -909,7 +909,7 @@ Cardinal.prototype = {
|
|
|
909
909
|
var d3CurveCardinal = (function custom(tension) {
|
|
910
910
|
|
|
911
911
|
function cardinal(context) {
|
|
912
|
-
return new Cardinal(context, tension);
|
|
912
|
+
return new Cardinal$1(context, tension);
|
|
913
913
|
}
|
|
914
914
|
|
|
915
915
|
cardinal.tension = function(tension) {
|
|
@@ -919,20 +919,20 @@ var d3CurveCardinal = (function custom(tension) {
|
|
|
919
919
|
return cardinal;
|
|
920
920
|
})(0);
|
|
921
921
|
|
|
922
|
-
function point$
|
|
922
|
+
function point$4(that, x, y) {
|
|
923
923
|
var x1 = that._x1,
|
|
924
924
|
y1 = that._y1,
|
|
925
925
|
x2 = that._x2,
|
|
926
926
|
y2 = that._y2;
|
|
927
927
|
|
|
928
|
-
if (that._l01_a > epsilon$
|
|
928
|
+
if (that._l01_a > epsilon$2) {
|
|
929
929
|
var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,
|
|
930
930
|
n = 3 * that._l01_a * (that._l01_a + that._l12_a);
|
|
931
931
|
x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
|
|
932
932
|
y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
|
|
933
933
|
}
|
|
934
934
|
|
|
935
|
-
if (that._l23_a > epsilon$
|
|
935
|
+
if (that._l23_a > epsilon$2) {
|
|
936
936
|
var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,
|
|
937
937
|
m = 3 * that._l23_a * (that._l23_a + that._l12_a);
|
|
938
938
|
x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
|
|
@@ -942,12 +942,12 @@ function point$2(that, x, y) {
|
|
|
942
942
|
that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
|
|
943
943
|
}
|
|
944
944
|
|
|
945
|
-
function CatmullRom(context, alpha) {
|
|
945
|
+
function CatmullRom$1(context, alpha) {
|
|
946
946
|
this._context = context;
|
|
947
947
|
this._alpha = alpha;
|
|
948
948
|
}
|
|
949
949
|
|
|
950
|
-
CatmullRom.prototype = {
|
|
950
|
+
CatmullRom$1.prototype = {
|
|
951
951
|
areaStart: function() {
|
|
952
952
|
this._line = 0;
|
|
953
953
|
},
|
|
@@ -982,7 +982,7 @@ CatmullRom.prototype = {
|
|
|
982
982
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
983
983
|
case 1: this._point = 2; break;
|
|
984
984
|
case 2: this._point = 3; // proceed
|
|
985
|
-
default: point$
|
|
985
|
+
default: point$4(this, x, y); break;
|
|
986
986
|
}
|
|
987
987
|
|
|
988
988
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
@@ -995,7 +995,7 @@ CatmullRom.prototype = {
|
|
|
995
995
|
var d3curveCatmullRom = (function custom(alpha) {
|
|
996
996
|
|
|
997
997
|
function catmullRom(context) {
|
|
998
|
-
return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
|
|
998
|
+
return alpha ? new CatmullRom$1(context, alpha) : new Cardinal$1(context, 0);
|
|
999
999
|
}
|
|
1000
1000
|
|
|
1001
1001
|
catmullRom.alpha = function(alpha) {
|
|
@@ -1005,7 +1005,7 @@ var d3curveCatmullRom = (function custom(alpha) {
|
|
|
1005
1005
|
return catmullRom;
|
|
1006
1006
|
})(0.5);
|
|
1007
1007
|
|
|
1008
|
-
function sign(x) {
|
|
1008
|
+
function sign$1(x) {
|
|
1009
1009
|
return x < 0 ? -1 : 1;
|
|
1010
1010
|
}
|
|
1011
1011
|
|
|
@@ -1013,17 +1013,17 @@ function sign(x) {
|
|
|
1013
1013
|
// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
|
|
1014
1014
|
// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
|
|
1015
1015
|
// NOV(II), P. 443, 1990.
|
|
1016
|
-
function slope3(that, x2, y2) {
|
|
1016
|
+
function slope3$1(that, x2, y2) {
|
|
1017
1017
|
var h0 = that._x1 - that._x0,
|
|
1018
1018
|
h1 = x2 - that._x1,
|
|
1019
1019
|
s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
|
|
1020
1020
|
s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),
|
|
1021
1021
|
p = (s0 * h1 + s1 * h0) / (h0 + h1);
|
|
1022
|
-
return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
|
|
1022
|
+
return (sign$1(s0) + sign$1(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
|
|
1023
1023
|
}
|
|
1024
1024
|
|
|
1025
1025
|
// Calculate a one-sided slope.
|
|
1026
|
-
function slope2(that, t) {
|
|
1026
|
+
function slope2$1(that, t) {
|
|
1027
1027
|
var h = that._x1 - that._x0;
|
|
1028
1028
|
return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
|
|
1029
1029
|
}
|
|
@@ -1040,11 +1040,11 @@ function point$3(that, t0, t1) {
|
|
|
1040
1040
|
that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
1043
|
-
function MonotoneX(context) {
|
|
1043
|
+
function MonotoneX$1(context) {
|
|
1044
1044
|
this._context = context;
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
1047
|
-
MonotoneX.prototype = {
|
|
1047
|
+
MonotoneX$1.prototype = {
|
|
1048
1048
|
areaStart: function() {
|
|
1049
1049
|
this._line = 0;
|
|
1050
1050
|
},
|
|
@@ -1060,7 +1060,7 @@ MonotoneX.prototype = {
|
|
|
1060
1060
|
lineEnd: function() {
|
|
1061
1061
|
switch (this._point) {
|
|
1062
1062
|
case 2: this._context.lineTo(this._x1, this._y1); break;
|
|
1063
|
-
case 3: point$3(this, this._t0, slope2(this, this._t0)); break;
|
|
1063
|
+
case 3: point$3(this, this._t0, slope2$1(this, this._t0)); break;
|
|
1064
1064
|
}
|
|
1065
1065
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
1066
1066
|
this._line = 1 - this._line;
|
|
@@ -1073,8 +1073,8 @@ MonotoneX.prototype = {
|
|
|
1073
1073
|
switch (this._point) {
|
|
1074
1074
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
1075
1075
|
case 1: this._point = 2; break;
|
|
1076
|
-
case 2: this._point = 3; point$3(this, slope2(this, t1 = slope3(this, x, y)), t1); break;
|
|
1077
|
-
default: point$3(this, this._t0, t1 = slope3(this, x, y)); break;
|
|
1076
|
+
case 2: this._point = 3; point$3(this, slope2$1(this, t1 = slope3$1(this, x, y)), t1); break;
|
|
1077
|
+
default: point$3(this, this._t0, t1 = slope3$1(this, x, y)); break;
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
1080
|
this._x0 = this._x1, this._x1 = x;
|
|
@@ -1083,27 +1083,12 @@ MonotoneX.prototype = {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
};
|
|
1085
1085
|
|
|
1086
|
-
function
|
|
1087
|
-
this
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
|
|
1091
|
-
MonotoneX.prototype.point.call(this, y, x);
|
|
1092
|
-
};
|
|
1093
|
-
|
|
1094
|
-
function ReflectContext(context) {
|
|
1095
|
-
this._context = context;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
ReflectContext.prototype = {
|
|
1099
|
-
moveTo: function(x, y) { this._context.moveTo(y, x); },
|
|
1100
|
-
closePath: function() { this._context.closePath(); },
|
|
1101
|
-
lineTo: function(x, y) { this._context.lineTo(y, x); },
|
|
1102
|
-
bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }
|
|
1086
|
+
(Object.create(MonotoneX$1.prototype)).point = function(x, y) {
|
|
1087
|
+
MonotoneX$1.prototype.point.call(this, y, x);
|
|
1103
1088
|
};
|
|
1104
1089
|
|
|
1105
1090
|
function monotoneX(context) {
|
|
1106
|
-
return new MonotoneX(context);
|
|
1091
|
+
return new MonotoneX$1(context);
|
|
1107
1092
|
}
|
|
1108
1093
|
|
|
1109
1094
|
function Natural(context) {
|
|
@@ -1172,12 +1157,12 @@ function d3CurveNatural(context) {
|
|
|
1172
1157
|
return new Natural(context);
|
|
1173
1158
|
}
|
|
1174
1159
|
|
|
1175
|
-
function Step(context, t) {
|
|
1160
|
+
function Step$1(context, t) {
|
|
1176
1161
|
this._context = context;
|
|
1177
1162
|
this._t = t;
|
|
1178
1163
|
}
|
|
1179
1164
|
|
|
1180
|
-
Step.prototype = {
|
|
1165
|
+
Step$1.prototype = {
|
|
1181
1166
|
areaStart: function() {
|
|
1182
1167
|
this._line = 0;
|
|
1183
1168
|
},
|
|
@@ -1215,18 +1200,18 @@ Step.prototype = {
|
|
|
1215
1200
|
};
|
|
1216
1201
|
|
|
1217
1202
|
function d3CurveStep(context) {
|
|
1218
|
-
return new Step(context, 0.5);
|
|
1203
|
+
return new Step$1(context, 0.5);
|
|
1219
1204
|
}
|
|
1220
1205
|
|
|
1221
1206
|
function stepBefore(context) {
|
|
1222
|
-
return new Step(context, 0);
|
|
1207
|
+
return new Step$1(context, 0);
|
|
1223
1208
|
}
|
|
1224
1209
|
|
|
1225
1210
|
function stepAfter(context) {
|
|
1226
|
-
return new Step(context, 1);
|
|
1211
|
+
return new Step$1(context, 1);
|
|
1227
1212
|
}
|
|
1228
1213
|
|
|
1229
|
-
var slice = Array.prototype.slice;
|
|
1214
|
+
var slice$2 = Array.prototype.slice;
|
|
1230
1215
|
|
|
1231
1216
|
function identity$1(x) {
|
|
1232
1217
|
return x;
|
|
@@ -1236,7 +1221,7 @@ var top = 1,
|
|
|
1236
1221
|
right = 2,
|
|
1237
1222
|
bottom = 3,
|
|
1238
1223
|
left = 4,
|
|
1239
|
-
epsilon$
|
|
1224
|
+
epsilon$1 = 1e-6;
|
|
1240
1225
|
|
|
1241
1226
|
function translateX(x) {
|
|
1242
1227
|
return "translate(" + (x + 0.5) + ",0)";
|
|
@@ -1313,11 +1298,11 @@ function axis(orient, scale) {
|
|
|
1313
1298
|
text = text.transition(context);
|
|
1314
1299
|
|
|
1315
1300
|
tickExit = tickExit.transition(context)
|
|
1316
|
-
.attr("opacity", epsilon$
|
|
1301
|
+
.attr("opacity", epsilon$1)
|
|
1317
1302
|
.attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); });
|
|
1318
1303
|
|
|
1319
1304
|
tickEnter
|
|
1320
|
-
.attr("opacity", epsilon$
|
|
1305
|
+
.attr("opacity", epsilon$1)
|
|
1321
1306
|
.attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); });
|
|
1322
1307
|
}
|
|
1323
1308
|
|
|
@@ -1354,15 +1339,15 @@ function axis(orient, scale) {
|
|
|
1354
1339
|
};
|
|
1355
1340
|
|
|
1356
1341
|
axis.ticks = function() {
|
|
1357
|
-
return tickArguments = slice.call(arguments), axis;
|
|
1342
|
+
return tickArguments = slice$2.call(arguments), axis;
|
|
1358
1343
|
};
|
|
1359
1344
|
|
|
1360
1345
|
axis.tickArguments = function(_) {
|
|
1361
|
-
return arguments.length ? (tickArguments = _ == null ? [] : slice.call(_), axis) : tickArguments.slice();
|
|
1346
|
+
return arguments.length ? (tickArguments = _ == null ? [] : slice$2.call(_), axis) : tickArguments.slice();
|
|
1362
1347
|
};
|
|
1363
1348
|
|
|
1364
1349
|
axis.tickValues = function(_) {
|
|
1365
|
-
return arguments.length ? (tickValues = _ == null ? null : slice.call(_), axis) : tickValues && tickValues.slice();
|
|
1350
|
+
return arguments.length ? (tickValues = _ == null ? null : slice$2.call(_), axis) : tickValues && tickValues.slice();
|
|
1366
1351
|
};
|
|
1367
1352
|
|
|
1368
1353
|
axis.tickFormat = function(_) {
|
|
@@ -1431,8 +1416,8 @@ function styleInject(css, ref) {
|
|
|
1431
1416
|
}
|
|
1432
1417
|
}
|
|
1433
1418
|
|
|
1434
|
-
var css_248z = ".chart_Axis{fill:#000}.chart_Axis,.chart_Axis .axis .tick>text{font:10px sans-serif}.chart_Axis .axis .tick line,.chart_Axis .axis path.domain{fill:none;stroke:#000}.chart_Axis .guide path.domain{fill:none;stroke:none}.chart_Axis .guide .tick line{fill:none;stroke:#d3d3d3;opacity:.7}.chart_Axis .guide .tick.guide-0 line{stroke:#000;stroke-width:1;stroke-dasharray:3 5}.chart_Axis line,.chart_Axis path{shape-rendering:crispEdges}";
|
|
1435
|
-
styleInject(css_248z);
|
|
1419
|
+
var css_248z$c = ".chart_Axis{fill:#000}.chart_Axis,.chart_Axis .axis .tick>text{font:10px sans-serif}.chart_Axis .axis .tick line,.chart_Axis .axis path.domain{fill:none;stroke:#000}.chart_Axis .guide path.domain{fill:none;stroke:none}.chart_Axis .guide .tick line{fill:none;stroke:#d3d3d3;opacity:.7}.chart_Axis .guide .tick.guide-0 line{stroke:#000;stroke-width:1;stroke-dasharray:3 5}.chart_Axis line,.chart_Axis path{shape-rendering:crispEdges}";
|
|
1420
|
+
styleInject(css_248z$c);
|
|
1436
1421
|
|
|
1437
1422
|
var Axis = /** @class */ (function (_super) {
|
|
1438
1423
|
__extends(Axis, _super);
|
|
@@ -2031,8 +2016,8 @@ Axis.prototype.publish("ordinalPaddingInner", 0.1, "number", "Determines the rat
|
|
|
2031
2016
|
Axis.prototype.publish("ordinalPaddingOuter", 0.1, "number", "Determines the ratio of the range that is reserved for blank space before the first band and after the last band (0->1)", null, { disable: function (w) { return w.type() !== "ordinal"; } });
|
|
2032
2017
|
Axis.prototype.publish("ordinalMappings", null, "object", "Alternative label mappings (icons)", null, { optional: true });
|
|
2033
2018
|
|
|
2034
|
-
var css_248z$
|
|
2035
|
-
styleInject(css_248z$
|
|
2019
|
+
var css_248z$b = ".chart_XYAxis .axis{fill:#000}.chart_XYAxis .axis,.chart_XYAxis .tick>text{font:10px sans-serif}.chart_XYAxis .focus .chart_Axis.value .tick{visibility:hidden}.chart_XYAxis .axis line,.chart_XYAxis .axis path{fill:none;stroke:#000;shape-rendering:crispEdges}.chart_XYAxis .region{opacity:.33}.chart_XYAxis .brush rect.background{z-index:-999}.chart_XYAxis .brush .selection{stroke:#4682b4;stroke-opacity:1;stroke-width:1px;fill:#4682b4;fill-opacity:.125;shape-rendering:crispEdges}.chart_XYAxis .brush path.handle--custom{fill:#eee;stroke:#666}";
|
|
2020
|
+
styleInject(css_248z$b);
|
|
2036
2021
|
|
|
2037
2022
|
var XYAxis = /** @class */ (function (_super) {
|
|
2038
2023
|
__extends(XYAxis, _super);
|
|
@@ -2497,7 +2482,7 @@ var XYAxis = /** @class */ (function (_super) {
|
|
|
2497
2482
|
if (!retVal.length) {
|
|
2498
2483
|
return masterColumns;
|
|
2499
2484
|
}
|
|
2500
|
-
return __spreadArray([masterColumns[0]], retVal);
|
|
2485
|
+
return __spreadArray([masterColumns[0]], retVal, true);
|
|
2501
2486
|
};
|
|
2502
2487
|
XYAxis.prototype.layerColumnIndices = function (host) {
|
|
2503
2488
|
var masterColumns = host.columns();
|
|
@@ -2560,7 +2545,7 @@ var XYAxis = /** @class */ (function (_super) {
|
|
|
2560
2545
|
select(this)
|
|
2561
2546
|
.classed("selected", selected)
|
|
2562
2547
|
.classed("deselected", !selected)
|
|
2563
|
-
.attr("filter", context._selection.svgGlowID() && selected ? "url(#"
|
|
2548
|
+
.attr("filter", context._selection.svgGlowID() && selected ? "url(#".concat(context._selection.svgGlowID(), ")") : null);
|
|
2564
2549
|
});
|
|
2565
2550
|
var selRows = _selected.map(function (d) {
|
|
2566
2551
|
return _this.rowToObj(d);
|
|
@@ -2625,8 +2610,8 @@ XYAxis.prototype.publishProxy("yAxisHidden", "valueAxis", "hidden");
|
|
|
2625
2610
|
XYAxis.prototype.publish("regions", [], "array", "Regions");
|
|
2626
2611
|
XYAxis.prototype.publish("layers", [], "widgetArray", "Layers", null, { render: false });
|
|
2627
2612
|
|
|
2628
|
-
var css_248z$
|
|
2629
|
-
styleInject(css_248z$
|
|
2613
|
+
var css_248z$a = ".chart_Scatter .area,.chart_Scatter .line,.chart_Scatter .pointShape{pointer-events:none}.chart_Scatter .point .pointSelection{fill:none;stroke:none;pointer-events:all}.chart_Scatter .point .pointSelection.selected{fill:none;stroke:red}";
|
|
2614
|
+
styleInject(css_248z$a);
|
|
2630
2615
|
|
|
2631
2616
|
var Scatter = /** @class */ (function (_super) {
|
|
2632
2617
|
__extends(Scatter, _super);
|
|
@@ -2935,8 +2920,8 @@ var Area = /** @class */ (function (_super) {
|
|
|
2935
2920
|
}(Scatter));
|
|
2936
2921
|
Area.prototype._class += " chart_Area";
|
|
2937
2922
|
|
|
2938
|
-
var css_248z$
|
|
2939
|
-
styleInject(css_248z$
|
|
2923
|
+
var css_248z$9 = ".chart_Column .columnRect{fill:#4682b4;cursor:pointer}.chart_Column .data.axis path{display:none}.chart_Column .columnRect{stroke:transparent;border-width:1.5px}.chart_Column .columnRect.selected{stroke:red}";
|
|
2924
|
+
styleInject(css_248z$9);
|
|
2940
2925
|
|
|
2941
2926
|
var Column = /** @class */ (function (_super) {
|
|
2942
2927
|
__extends(Column, _super);
|
|
@@ -3164,7 +3149,7 @@ var Column = /** @class */ (function (_super) {
|
|
|
3164
3149
|
_texts
|
|
3165
3150
|
.attr("x", domainPos + (domainLength / 2))
|
|
3166
3151
|
.attr("y", y + textHeightOffset)
|
|
3167
|
-
.attr("transform", "rotate(-90, "
|
|
3152
|
+
.attr("transform", "rotate(-90, ".concat(domainPos + (domainLength / 2), ", ").concat(y, ")"));
|
|
3168
3153
|
}
|
|
3169
3154
|
else { // Bar
|
|
3170
3155
|
_texts
|
|
@@ -3187,7 +3172,7 @@ var Column = /** @class */ (function (_super) {
|
|
|
3187
3172
|
return "";
|
|
3188
3173
|
});
|
|
3189
3174
|
}
|
|
3190
|
-
var dataText = element.selectAll(".dataText").data(context.showValue() ? [""
|
|
3175
|
+
var dataText = element.selectAll(".dataText").data(context.showValue() ? ["".concat(upperValue)] : []);
|
|
3191
3176
|
var dataTextEnter = dataText.enter().append("g")
|
|
3192
3177
|
.attr("class", "dataText")
|
|
3193
3178
|
.each(function (d) {
|
|
@@ -3328,7 +3313,7 @@ var Column = /** @class */ (function (_super) {
|
|
|
3328
3313
|
.anchor(valueAnchor)
|
|
3329
3314
|
.fontFamily(valueFontFamily)
|
|
3330
3315
|
.fontSize(valueFontSize)
|
|
3331
|
-
.text(""
|
|
3316
|
+
.text("".concat(valueText))
|
|
3332
3317
|
.colorFill(textColor)
|
|
3333
3318
|
.visible(context.showValue())
|
|
3334
3319
|
.render();
|
|
@@ -3592,7 +3577,7 @@ function node_links() {
|
|
|
3592
3577
|
}
|
|
3593
3578
|
|
|
3594
3579
|
function hierarchy(data, children) {
|
|
3595
|
-
var root = new Node(data),
|
|
3580
|
+
var root = new Node$1(data),
|
|
3596
3581
|
valued = +data.value && (root.value = data.value),
|
|
3597
3582
|
node,
|
|
3598
3583
|
nodes = [root],
|
|
@@ -3608,7 +3593,7 @@ function hierarchy(data, children) {
|
|
|
3608
3593
|
if ((childs = children(node.data)) && (n = childs.length)) {
|
|
3609
3594
|
node.children = new Array(n);
|
|
3610
3595
|
for (i = n - 1; i >= 0; --i) {
|
|
3611
|
-
nodes.push(child = node.children[i] = new Node(childs[i]));
|
|
3596
|
+
nodes.push(child = node.children[i] = new Node$1(childs[i]));
|
|
3612
3597
|
child.parent = node;
|
|
3613
3598
|
child.depth = node.depth + 1;
|
|
3614
3599
|
}
|
|
@@ -3636,15 +3621,15 @@ function computeHeight(node) {
|
|
|
3636
3621
|
while ((node = node.parent) && (node.height < ++height));
|
|
3637
3622
|
}
|
|
3638
3623
|
|
|
3639
|
-
function Node(data) {
|
|
3624
|
+
function Node$1(data) {
|
|
3640
3625
|
this.data = data;
|
|
3641
3626
|
this.depth =
|
|
3642
3627
|
this.height = 0;
|
|
3643
3628
|
this.parent = null;
|
|
3644
3629
|
}
|
|
3645
3630
|
|
|
3646
|
-
Node.prototype = hierarchy.prototype = {
|
|
3647
|
-
constructor: Node,
|
|
3631
|
+
Node$1.prototype = hierarchy.prototype = {
|
|
3632
|
+
constructor: Node$1,
|
|
3648
3633
|
count: node_count,
|
|
3649
3634
|
each: node_each,
|
|
3650
3635
|
eachAfter: node_eachAfter,
|
|
@@ -3831,7 +3816,7 @@ function score(node) {
|
|
|
3831
3816
|
return dx * dx + dy * dy;
|
|
3832
3817
|
}
|
|
3833
3818
|
|
|
3834
|
-
function Node
|
|
3819
|
+
function Node(circle) {
|
|
3835
3820
|
this._ = circle;
|
|
3836
3821
|
this.next = null;
|
|
3837
3822
|
this.previous = null;
|
|
@@ -3854,14 +3839,14 @@ function packEnclose(circles) {
|
|
|
3854
3839
|
place(b, a, c = circles[2]);
|
|
3855
3840
|
|
|
3856
3841
|
// Initialize the front-chain using the first three circles a, b and c.
|
|
3857
|
-
a = new Node
|
|
3842
|
+
a = new Node(a), b = new Node(b), c = new Node(c);
|
|
3858
3843
|
a.next = c.previous = b;
|
|
3859
3844
|
b.next = a.previous = c;
|
|
3860
3845
|
c.next = b.previous = a;
|
|
3861
3846
|
|
|
3862
3847
|
// Attempt to place each remaining circle…
|
|
3863
3848
|
pack: for (i = 3; i < n; ++i) {
|
|
3864
|
-
place(a._, b._, c = circles[i]), c = new Node
|
|
3849
|
+
place(a._, b._, c = circles[i]), c = new Node(c);
|
|
3865
3850
|
|
|
3866
3851
|
// Find the closest intersecting circle on the front-chain, if any.
|
|
3867
3852
|
// “Closeness” is determined by linear distance along the front-chain.
|
|
@@ -3918,7 +3903,7 @@ function constantZero() {
|
|
|
3918
3903
|
return 0;
|
|
3919
3904
|
}
|
|
3920
3905
|
|
|
3921
|
-
function constant$
|
|
3906
|
+
function constant$2(x) {
|
|
3922
3907
|
return function() {
|
|
3923
3908
|
return x;
|
|
3924
3909
|
};
|
|
@@ -3958,7 +3943,7 @@ function d3Pack() {
|
|
|
3958
3943
|
};
|
|
3959
3944
|
|
|
3960
3945
|
pack.padding = function(x) {
|
|
3961
|
-
return arguments.length ? (padding = typeof x === "function" ? x : constant$
|
|
3946
|
+
return arguments.length ? (padding = typeof x === "function" ? x : constant$2(+x), pack) : padding;
|
|
3962
3947
|
};
|
|
3963
3948
|
|
|
3964
3949
|
return pack;
|
|
@@ -4000,8 +3985,8 @@ function translateChild(k) {
|
|
|
4000
3985
|
};
|
|
4001
3986
|
}
|
|
4002
3987
|
|
|
4003
|
-
var css_248z$
|
|
4004
|
-
styleInject(css_248z$
|
|
3988
|
+
var css_248z$8 = ".chart_Bubble circle{cursor:pointer}.chart_Bubble .selected circle{stroke:red;stroke-width:1.5px}.chart_Bubble .common_FAChar{fill:#fff;pointer-events:none}.chart_Bubble .common_Text{pointer-events:none}";
|
|
3989
|
+
styleInject(css_248z$8);
|
|
4005
3990
|
|
|
4006
3991
|
var Bubble = /** @class */ (function (_super) {
|
|
4007
3992
|
__extends(Bubble, _super);
|
|
@@ -4182,184 +4167,184 @@ function timerFlush() {
|
|
|
4182
4167
|
}
|
|
4183
4168
|
}
|
|
4184
4169
|
|
|
4185
|
-
function d3Bullet () {
|
|
4186
|
-
var orient = "left",
|
|
4187
|
-
reverse = false,
|
|
4188
|
-
vertical = false,
|
|
4189
|
-
ranges = bulvarRanges,
|
|
4190
|
-
markers = bulvarMarkers,
|
|
4191
|
-
measures = bulvarMeasures,
|
|
4192
|
-
width = 380,
|
|
4193
|
-
height = 30,
|
|
4194
|
-
xAxis = axisLeft();
|
|
4195
|
-
|
|
4196
|
-
// For each small multiple…
|
|
4197
|
-
function bulvar(g) {
|
|
4198
|
-
g.each(function (d, i) {
|
|
4199
|
-
var rangez = ranges.call(this, d, i).slice().sort(descending$1),
|
|
4200
|
-
markerz = markers.call(this, d, i).slice().sort(descending$1),
|
|
4201
|
-
measurez = measures.call(this, d, i).slice().sort(descending$1),
|
|
4202
|
-
g2 = select(this),
|
|
4203
|
-
extentX,
|
|
4204
|
-
extentY;
|
|
4205
|
-
|
|
4206
|
-
var wrap = g2.select("g.wrap");
|
|
4207
|
-
if (wrap.empty()) wrap = g2.append("g").attr("class", "wrap");
|
|
4208
|
-
|
|
4209
|
-
if (vertical) {
|
|
4210
|
-
extentX = height, extentY = width;
|
|
4211
|
-
wrap.attr("transform", "rotate(90)translate(0," + -width + ")");
|
|
4212
|
-
} else {
|
|
4213
|
-
extentX = width, extentY = height;
|
|
4214
|
-
wrap.attr("transform", null);
|
|
4215
|
-
}
|
|
4216
|
-
|
|
4217
|
-
// Compute the new x-scale.
|
|
4218
|
-
var x1 = scaleLinear()
|
|
4219
|
-
.domain([0, Math.max(rangez[0], markerz[0], measurez[0])])
|
|
4220
|
-
.range(reverse ? [extentX, 0] : [0, extentX]);
|
|
4221
|
-
|
|
4222
|
-
// Retrieve the old x-scale, if this is an update.
|
|
4223
|
-
var x0 = this.__chart__ || scaleLinear()
|
|
4224
|
-
.domain([0, Infinity])
|
|
4225
|
-
.range(x1.range());
|
|
4226
|
-
|
|
4227
|
-
// Stash the new scale.
|
|
4228
|
-
this.__chart__ = x1;
|
|
4229
|
-
|
|
4230
|
-
// Derive width-scales from the x-scales.
|
|
4231
|
-
var w0 = bulvarWidth(x0),
|
|
4232
|
-
w1 = bulvarWidth(x1);
|
|
4233
|
-
|
|
4234
|
-
// Update the range rects.
|
|
4235
|
-
var range = wrap.selectAll("rect.range")
|
|
4236
|
-
.data(rangez);
|
|
4237
|
-
|
|
4238
|
-
range.enter().append("rect")
|
|
4239
|
-
.attr("class", function (_d, i2) { return "range s" + i2; })
|
|
4240
|
-
.attr("width", w0)
|
|
4241
|
-
.attr("height", extentY)
|
|
4242
|
-
.attr("x", reverse ? x0 : 0)
|
|
4243
|
-
.merge(range)
|
|
4244
|
-
.transition(range)
|
|
4245
|
-
.attr("x", reverse ? x1 : 0)
|
|
4246
|
-
.attr("width", w1)
|
|
4247
|
-
.attr("height", extentY);
|
|
4248
|
-
|
|
4249
|
-
// Update the measure rects.
|
|
4250
|
-
var measure = wrap.selectAll("rect.measure")
|
|
4251
|
-
.data(measurez);
|
|
4252
|
-
|
|
4253
|
-
measure.enter().append("rect")
|
|
4254
|
-
.attr("class", function (_d, i2) { return "measure s" + i2; })
|
|
4255
|
-
.attr("width", w0)
|
|
4256
|
-
.attr("height", extentY / 3)
|
|
4257
|
-
.attr("x", reverse ? x0 : 0)
|
|
4258
|
-
.attr("y", extentY / 3)
|
|
4259
|
-
.merge(measure)
|
|
4260
|
-
.transition(measure)
|
|
4261
|
-
.attr("width", w1)
|
|
4262
|
-
.attr("height", extentY / 3)
|
|
4263
|
-
.attr("x", reverse ? x1 : 0)
|
|
4264
|
-
.attr("y", extentY / 3);
|
|
4265
|
-
|
|
4266
|
-
// Update the marker lines.
|
|
4267
|
-
var marker = wrap.selectAll("line.marker")
|
|
4268
|
-
.data(markerz);
|
|
4269
|
-
|
|
4270
|
-
marker.enter().append("line")
|
|
4271
|
-
.attr("class", "marker")
|
|
4272
|
-
.attr("x1", x0)
|
|
4273
|
-
.attr("x2", x0)
|
|
4274
|
-
.attr("y1", extentY / 6)
|
|
4275
|
-
.attr("y2", extentY * 5 / 6)
|
|
4276
|
-
.merge(marker)
|
|
4277
|
-
.transition(marker)
|
|
4278
|
-
.attr("x1", x1)
|
|
4279
|
-
.attr("x2", x1)
|
|
4280
|
-
.attr("y1", extentY / 6)
|
|
4281
|
-
.attr("y2", extentY * 5 / 6);
|
|
4282
|
-
|
|
4283
|
-
var axis = g2.selectAll("g.axis").data([0]);
|
|
4284
|
-
axis.enter().append("g").attr("class", "axis");
|
|
4285
|
-
axis.attr("transform", vertical ? null : "translate(0," + extentY + ")")
|
|
4286
|
-
.call(xAxis.scale(x1));
|
|
4287
|
-
});
|
|
4288
|
-
timerFlush();
|
|
4289
|
-
}
|
|
4290
|
-
|
|
4291
|
-
// left, right, top, bottom
|
|
4292
|
-
bulvar.orient = function (_) {
|
|
4293
|
-
if (!arguments.length) return orient;
|
|
4294
|
-
orient = _ + "";
|
|
4295
|
-
reverse = orient === "right" || orient === "bottom";
|
|
4296
|
-
xAxis.orient((vertical = orient === "top" || orient === "bottom") ? "left" : "bottom");
|
|
4297
|
-
return bulvar;
|
|
4298
|
-
};
|
|
4299
|
-
|
|
4300
|
-
// ranges (bad, satisfactory, good)
|
|
4301
|
-
bulvar.ranges = function (_) {
|
|
4302
|
-
if (!arguments.length) return ranges;
|
|
4303
|
-
ranges = _;
|
|
4304
|
-
return bulvar;
|
|
4305
|
-
};
|
|
4306
|
-
|
|
4307
|
-
// markers (previous, goal)
|
|
4308
|
-
bulvar.markers = function (_) {
|
|
4309
|
-
if (!arguments.length) return markers;
|
|
4310
|
-
markers = _;
|
|
4311
|
-
return bulvar;
|
|
4312
|
-
};
|
|
4313
|
-
|
|
4314
|
-
// measures (actual, forecast)
|
|
4315
|
-
bulvar.measures = function (_) {
|
|
4316
|
-
if (!arguments.length) return measures;
|
|
4317
|
-
measures = _;
|
|
4318
|
-
return bulvar;
|
|
4319
|
-
};
|
|
4320
|
-
|
|
4321
|
-
bulvar.width = function (_) {
|
|
4322
|
-
if (!arguments.length) return width;
|
|
4323
|
-
width = +_;
|
|
4324
|
-
return bulvar;
|
|
4325
|
-
};
|
|
4326
|
-
|
|
4327
|
-
bulvar.height = function (_) {
|
|
4328
|
-
if (!arguments.length) return height;
|
|
4329
|
-
height = +_;
|
|
4330
|
-
return bulvar;
|
|
4331
|
-
};
|
|
4332
|
-
|
|
4333
|
-
bulvar.tickFormat = function (_) {
|
|
4334
|
-
if (!arguments.length) return xAxis.tickFormat();
|
|
4335
|
-
xAxis.tickFormat(_);
|
|
4336
|
-
return bulvar;
|
|
4337
|
-
};
|
|
4338
|
-
|
|
4339
|
-
return bulvar;
|
|
4340
|
-
}
|
|
4341
|
-
|
|
4342
|
-
function bulvarRanges(d) {
|
|
4343
|
-
return d.ranges;
|
|
4344
|
-
}
|
|
4345
|
-
|
|
4346
|
-
function bulvarMarkers(d) {
|
|
4347
|
-
return d.markers;
|
|
4348
|
-
}
|
|
4349
|
-
|
|
4350
|
-
function bulvarMeasures(d) {
|
|
4351
|
-
return d.measures;
|
|
4352
|
-
}
|
|
4353
|
-
|
|
4354
|
-
function bulvarWidth(x) {
|
|
4355
|
-
var x0 = x(0);
|
|
4356
|
-
return function (d) {
|
|
4357
|
-
return Math.abs(x(d) - x0);
|
|
4358
|
-
};
|
|
4170
|
+
function d3Bullet () {
|
|
4171
|
+
var orient = "left",
|
|
4172
|
+
reverse = false,
|
|
4173
|
+
vertical = false,
|
|
4174
|
+
ranges = bulvarRanges,
|
|
4175
|
+
markers = bulvarMarkers,
|
|
4176
|
+
measures = bulvarMeasures,
|
|
4177
|
+
width = 380,
|
|
4178
|
+
height = 30,
|
|
4179
|
+
xAxis = axisLeft();
|
|
4180
|
+
|
|
4181
|
+
// For each small multiple…
|
|
4182
|
+
function bulvar(g) {
|
|
4183
|
+
g.each(function (d, i) {
|
|
4184
|
+
var rangez = ranges.call(this, d, i).slice().sort(descending$1),
|
|
4185
|
+
markerz = markers.call(this, d, i).slice().sort(descending$1),
|
|
4186
|
+
measurez = measures.call(this, d, i).slice().sort(descending$1),
|
|
4187
|
+
g2 = select(this),
|
|
4188
|
+
extentX,
|
|
4189
|
+
extentY;
|
|
4190
|
+
|
|
4191
|
+
var wrap = g2.select("g.wrap");
|
|
4192
|
+
if (wrap.empty()) wrap = g2.append("g").attr("class", "wrap");
|
|
4193
|
+
|
|
4194
|
+
if (vertical) {
|
|
4195
|
+
extentX = height, extentY = width;
|
|
4196
|
+
wrap.attr("transform", "rotate(90)translate(0," + -width + ")");
|
|
4197
|
+
} else {
|
|
4198
|
+
extentX = width, extentY = height;
|
|
4199
|
+
wrap.attr("transform", null);
|
|
4200
|
+
}
|
|
4201
|
+
|
|
4202
|
+
// Compute the new x-scale.
|
|
4203
|
+
var x1 = scaleLinear()
|
|
4204
|
+
.domain([0, Math.max(rangez[0], markerz[0], measurez[0])])
|
|
4205
|
+
.range(reverse ? [extentX, 0] : [0, extentX]);
|
|
4206
|
+
|
|
4207
|
+
// Retrieve the old x-scale, if this is an update.
|
|
4208
|
+
var x0 = this.__chart__ || scaleLinear()
|
|
4209
|
+
.domain([0, Infinity])
|
|
4210
|
+
.range(x1.range());
|
|
4211
|
+
|
|
4212
|
+
// Stash the new scale.
|
|
4213
|
+
this.__chart__ = x1;
|
|
4214
|
+
|
|
4215
|
+
// Derive width-scales from the x-scales.
|
|
4216
|
+
var w0 = bulvarWidth(x0),
|
|
4217
|
+
w1 = bulvarWidth(x1);
|
|
4218
|
+
|
|
4219
|
+
// Update the range rects.
|
|
4220
|
+
var range = wrap.selectAll("rect.range")
|
|
4221
|
+
.data(rangez);
|
|
4222
|
+
|
|
4223
|
+
range.enter().append("rect")
|
|
4224
|
+
.attr("class", function (_d, i2) { return "range s" + i2; })
|
|
4225
|
+
.attr("width", w0)
|
|
4226
|
+
.attr("height", extentY)
|
|
4227
|
+
.attr("x", reverse ? x0 : 0)
|
|
4228
|
+
.merge(range)
|
|
4229
|
+
.transition(range)
|
|
4230
|
+
.attr("x", reverse ? x1 : 0)
|
|
4231
|
+
.attr("width", w1)
|
|
4232
|
+
.attr("height", extentY);
|
|
4233
|
+
|
|
4234
|
+
// Update the measure rects.
|
|
4235
|
+
var measure = wrap.selectAll("rect.measure")
|
|
4236
|
+
.data(measurez);
|
|
4237
|
+
|
|
4238
|
+
measure.enter().append("rect")
|
|
4239
|
+
.attr("class", function (_d, i2) { return "measure s" + i2; })
|
|
4240
|
+
.attr("width", w0)
|
|
4241
|
+
.attr("height", extentY / 3)
|
|
4242
|
+
.attr("x", reverse ? x0 : 0)
|
|
4243
|
+
.attr("y", extentY / 3)
|
|
4244
|
+
.merge(measure)
|
|
4245
|
+
.transition(measure)
|
|
4246
|
+
.attr("width", w1)
|
|
4247
|
+
.attr("height", extentY / 3)
|
|
4248
|
+
.attr("x", reverse ? x1 : 0)
|
|
4249
|
+
.attr("y", extentY / 3);
|
|
4250
|
+
|
|
4251
|
+
// Update the marker lines.
|
|
4252
|
+
var marker = wrap.selectAll("line.marker")
|
|
4253
|
+
.data(markerz);
|
|
4254
|
+
|
|
4255
|
+
marker.enter().append("line")
|
|
4256
|
+
.attr("class", "marker")
|
|
4257
|
+
.attr("x1", x0)
|
|
4258
|
+
.attr("x2", x0)
|
|
4259
|
+
.attr("y1", extentY / 6)
|
|
4260
|
+
.attr("y2", extentY * 5 / 6)
|
|
4261
|
+
.merge(marker)
|
|
4262
|
+
.transition(marker)
|
|
4263
|
+
.attr("x1", x1)
|
|
4264
|
+
.attr("x2", x1)
|
|
4265
|
+
.attr("y1", extentY / 6)
|
|
4266
|
+
.attr("y2", extentY * 5 / 6);
|
|
4267
|
+
|
|
4268
|
+
var axis = g2.selectAll("g.axis").data([0]);
|
|
4269
|
+
axis.enter().append("g").attr("class", "axis");
|
|
4270
|
+
axis.attr("transform", vertical ? null : "translate(0," + extentY + ")")
|
|
4271
|
+
.call(xAxis.scale(x1));
|
|
4272
|
+
});
|
|
4273
|
+
timerFlush();
|
|
4274
|
+
}
|
|
4275
|
+
|
|
4276
|
+
// left, right, top, bottom
|
|
4277
|
+
bulvar.orient = function (_) {
|
|
4278
|
+
if (!arguments.length) return orient;
|
|
4279
|
+
orient = _ + "";
|
|
4280
|
+
reverse = orient === "right" || orient === "bottom";
|
|
4281
|
+
xAxis.orient((vertical = orient === "top" || orient === "bottom") ? "left" : "bottom"); // eslint-disable-line
|
|
4282
|
+
return bulvar;
|
|
4283
|
+
};
|
|
4284
|
+
|
|
4285
|
+
// ranges (bad, satisfactory, good)
|
|
4286
|
+
bulvar.ranges = function (_) {
|
|
4287
|
+
if (!arguments.length) return ranges;
|
|
4288
|
+
ranges = _;
|
|
4289
|
+
return bulvar;
|
|
4290
|
+
};
|
|
4291
|
+
|
|
4292
|
+
// markers (previous, goal)
|
|
4293
|
+
bulvar.markers = function (_) {
|
|
4294
|
+
if (!arguments.length) return markers;
|
|
4295
|
+
markers = _;
|
|
4296
|
+
return bulvar;
|
|
4297
|
+
};
|
|
4298
|
+
|
|
4299
|
+
// measures (actual, forecast)
|
|
4300
|
+
bulvar.measures = function (_) {
|
|
4301
|
+
if (!arguments.length) return measures;
|
|
4302
|
+
measures = _;
|
|
4303
|
+
return bulvar;
|
|
4304
|
+
};
|
|
4305
|
+
|
|
4306
|
+
bulvar.width = function (_) {
|
|
4307
|
+
if (!arguments.length) return width;
|
|
4308
|
+
width = +_;
|
|
4309
|
+
return bulvar;
|
|
4310
|
+
};
|
|
4311
|
+
|
|
4312
|
+
bulvar.height = function (_) {
|
|
4313
|
+
if (!arguments.length) return height;
|
|
4314
|
+
height = +_;
|
|
4315
|
+
return bulvar;
|
|
4316
|
+
};
|
|
4317
|
+
|
|
4318
|
+
bulvar.tickFormat = function (_) {
|
|
4319
|
+
if (!arguments.length) return xAxis.tickFormat();
|
|
4320
|
+
xAxis.tickFormat(_);
|
|
4321
|
+
return bulvar;
|
|
4322
|
+
};
|
|
4323
|
+
|
|
4324
|
+
return bulvar;
|
|
4325
|
+
}
|
|
4326
|
+
|
|
4327
|
+
function bulvarRanges(d) {
|
|
4328
|
+
return d.ranges;
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
function bulvarMarkers(d) {
|
|
4332
|
+
return d.markers;
|
|
4333
|
+
}
|
|
4334
|
+
|
|
4335
|
+
function bulvarMeasures(d) {
|
|
4336
|
+
return d.measures;
|
|
4337
|
+
}
|
|
4338
|
+
|
|
4339
|
+
function bulvarWidth(x) {
|
|
4340
|
+
var x0 = x(0);
|
|
4341
|
+
return function (d) {
|
|
4342
|
+
return Math.abs(x(d) - x0);
|
|
4343
|
+
};
|
|
4359
4344
|
}
|
|
4360
4345
|
|
|
4361
|
-
var css_248z$
|
|
4362
|
-
styleInject(css_248z$
|
|
4346
|
+
var css_248z$7 = ".chart_Bullet .domain{opacity:0}.chart_Bullet .bullet{border:1px solid transparent;font:10px sans-serif}.chart_Bullet .bullet.selected{border-color:red}.chart_Bullet .bullet.over{border-color:orange}.chart_Bullet .bullet.selected.over{border-color:red}.chart_Bullet .bullet .marker{stroke:#000;stroke-width:2px}.chart_Bullet .bullet .tick line{stroke:#666;stroke-width:.5px}.chart_Bullet .bullet .range.s0{fill:#eee}.chart_Bullet .bullet .range.s1{fill:#ddd}.chart_Bullet .bullet .range.s2{fill:#ccc}.chart_Bullet .bullet .measure.s0{fill:#b0c4de}.chart_Bullet .bullet .measure.s1{fill:#4682b4}.chart_Bullet .bullet .title{font-size:14px;font-weight:700}.chart_Bullet .bullet .subtitle{fill:#999}";
|
|
4347
|
+
styleInject(css_248z$7);
|
|
4363
4348
|
|
|
4364
4349
|
var Bullet = /** @class */ (function (_super) {
|
|
4365
4350
|
__extends(Bullet, _super);
|
|
@@ -4457,13 +4442,13 @@ var Bullet = /** @class */ (function (_super) {
|
|
|
4457
4442
|
svgUpdate
|
|
4458
4443
|
.attr("width", width)
|
|
4459
4444
|
.attr("height", height + margin.top + margin.bottom)
|
|
4460
|
-
.style("margin-left", margin.left
|
|
4445
|
+
.style("margin-left", "".concat(margin.left, "px"));
|
|
4461
4446
|
svgUpdate.select(".bulletBar")
|
|
4462
4447
|
.attr("transform", "translate(" + (titleWidth + 6) + "," + margin.top + ")")
|
|
4463
4448
|
.call(chart);
|
|
4464
4449
|
svg.exit().remove();
|
|
4465
4450
|
if (Object.keys(this._hiddenColumns).length > 0) {
|
|
4466
|
-
element.selectAll("."
|
|
4451
|
+
element.selectAll(".".concat(Object.keys(this._hiddenColumns).join(",.")))
|
|
4467
4452
|
.style("display", "none");
|
|
4468
4453
|
}
|
|
4469
4454
|
};
|
|
@@ -4503,7 +4488,7 @@ Bullet.prototype._class += " chart_Bullet";
|
|
|
4503
4488
|
|
|
4504
4489
|
var array = Array.prototype;
|
|
4505
4490
|
|
|
4506
|
-
var slice
|
|
4491
|
+
var slice = array.slice;
|
|
4507
4492
|
|
|
4508
4493
|
function ascending(a, b) {
|
|
4509
4494
|
return a - b;
|
|
@@ -4515,7 +4500,7 @@ function area(ring) {
|
|
|
4515
4500
|
return area;
|
|
4516
4501
|
}
|
|
4517
4502
|
|
|
4518
|
-
function constant$
|
|
4503
|
+
function constant$1(x) {
|
|
4519
4504
|
return function() {
|
|
4520
4505
|
return x;
|
|
4521
4506
|
};
|
|
@@ -4549,7 +4534,7 @@ function within(p, q, r) {
|
|
|
4549
4534
|
return p <= q && q <= r || r <= q && q <= p;
|
|
4550
4535
|
}
|
|
4551
4536
|
|
|
4552
|
-
function noop() {}
|
|
4537
|
+
function noop$1() {}
|
|
4553
4538
|
|
|
4554
4539
|
var cases = [
|
|
4555
4540
|
[],
|
|
@@ -4737,11 +4722,11 @@ function contours() {
|
|
|
4737
4722
|
};
|
|
4738
4723
|
|
|
4739
4724
|
contours.thresholds = function(_) {
|
|
4740
|
-
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$
|
|
4725
|
+
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$1(slice.call(_)) : constant$1(_), contours) : threshold;
|
|
4741
4726
|
};
|
|
4742
4727
|
|
|
4743
4728
|
contours.smooth = function(_) {
|
|
4744
|
-
return arguments.length ? (smooth = _ ? smoothLinear : noop, contours) : smooth === smoothLinear;
|
|
4729
|
+
return arguments.length ? (smooth = _ ? smoothLinear : noop$1, contours) : smooth === smoothLinear;
|
|
4745
4730
|
};
|
|
4746
4731
|
|
|
4747
4732
|
return contours;
|
|
@@ -4814,7 +4799,7 @@ function d3ContourDensity() {
|
|
|
4814
4799
|
o = r * 3, // grid offset, to pad for blur
|
|
4815
4800
|
n = (dx + o * 2) >> k, // grid width
|
|
4816
4801
|
m = (dy + o * 2) >> k, // grid height
|
|
4817
|
-
threshold = constant$
|
|
4802
|
+
threshold = constant$1(20);
|
|
4818
4803
|
|
|
4819
4804
|
function density(data) {
|
|
4820
4805
|
var values0 = new Float32Array(n * m),
|
|
@@ -4882,15 +4867,15 @@ function d3ContourDensity() {
|
|
|
4882
4867
|
}
|
|
4883
4868
|
|
|
4884
4869
|
density.x = function(_) {
|
|
4885
|
-
return arguments.length ? (x = typeof _ === "function" ? _ : constant$
|
|
4870
|
+
return arguments.length ? (x = typeof _ === "function" ? _ : constant$1(+_), density) : x;
|
|
4886
4871
|
};
|
|
4887
4872
|
|
|
4888
4873
|
density.y = function(_) {
|
|
4889
|
-
return arguments.length ? (y = typeof _ === "function" ? _ : constant$
|
|
4874
|
+
return arguments.length ? (y = typeof _ === "function" ? _ : constant$1(+_), density) : y;
|
|
4890
4875
|
};
|
|
4891
4876
|
|
|
4892
4877
|
density.weight = function(_) {
|
|
4893
|
-
return arguments.length ? (weight = typeof _ === "function" ? _ : constant$
|
|
4878
|
+
return arguments.length ? (weight = typeof _ === "function" ? _ : constant$1(+_), density) : weight;
|
|
4894
4879
|
};
|
|
4895
4880
|
|
|
4896
4881
|
density.size = function(_) {
|
|
@@ -4907,7 +4892,7 @@ function d3ContourDensity() {
|
|
|
4907
4892
|
};
|
|
4908
4893
|
|
|
4909
4894
|
density.thresholds = function(_) {
|
|
4910
|
-
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$
|
|
4895
|
+
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$1(slice.call(_)) : constant$1(_), density) : threshold;
|
|
4911
4896
|
};
|
|
4912
4897
|
|
|
4913
4898
|
density.bandwidth = function(_) {
|
|
@@ -4960,13 +4945,13 @@ function add(adder, a, b) {
|
|
|
4960
4945
|
adder.t = (a - av) + (b - bv);
|
|
4961
4946
|
}
|
|
4962
4947
|
|
|
4963
|
-
var pi$
|
|
4964
|
-
var tau$
|
|
4948
|
+
var pi$1 = Math.PI;
|
|
4949
|
+
var tau$1 = pi$1 * 2;
|
|
4965
4950
|
|
|
4966
|
-
var abs
|
|
4967
|
-
var sqrt
|
|
4951
|
+
var abs = Math.abs;
|
|
4952
|
+
var sqrt = Math.sqrt;
|
|
4968
4953
|
|
|
4969
|
-
function noop
|
|
4954
|
+
function noop() {}
|
|
4970
4955
|
|
|
4971
4956
|
function streamGeometry(geometry, stream) {
|
|
4972
4957
|
if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {
|
|
@@ -5038,28 +5023,28 @@ function geoStream(object, stream) {
|
|
|
5038
5023
|
}
|
|
5039
5024
|
}
|
|
5040
5025
|
|
|
5041
|
-
function identity
|
|
5026
|
+
function identity(x) {
|
|
5042
5027
|
return x;
|
|
5043
5028
|
}
|
|
5044
5029
|
|
|
5045
5030
|
var areaSum = adder(),
|
|
5046
5031
|
areaRingSum = adder(),
|
|
5047
|
-
x00,
|
|
5048
|
-
y00,
|
|
5049
|
-
x0,
|
|
5050
|
-
y0;
|
|
5032
|
+
x00$2,
|
|
5033
|
+
y00$2,
|
|
5034
|
+
x0$3,
|
|
5035
|
+
y0$3;
|
|
5051
5036
|
|
|
5052
5037
|
var areaStream = {
|
|
5053
|
-
point: noop
|
|
5054
|
-
lineStart: noop
|
|
5055
|
-
lineEnd: noop
|
|
5038
|
+
point: noop,
|
|
5039
|
+
lineStart: noop,
|
|
5040
|
+
lineEnd: noop,
|
|
5056
5041
|
polygonStart: function() {
|
|
5057
5042
|
areaStream.lineStart = areaRingStart;
|
|
5058
5043
|
areaStream.lineEnd = areaRingEnd;
|
|
5059
5044
|
},
|
|
5060
5045
|
polygonEnd: function() {
|
|
5061
|
-
areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop
|
|
5062
|
-
areaSum.add(abs
|
|
5046
|
+
areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;
|
|
5047
|
+
areaSum.add(abs(areaRingSum));
|
|
5063
5048
|
areaRingSum.reset();
|
|
5064
5049
|
},
|
|
5065
5050
|
result: function() {
|
|
@@ -5075,43 +5060,47 @@ function areaRingStart() {
|
|
|
5075
5060
|
|
|
5076
5061
|
function areaPointFirst(x, y) {
|
|
5077
5062
|
areaStream.point = areaPoint;
|
|
5078
|
-
x00 = x0 = x, y00 = y0 = y;
|
|
5063
|
+
x00$2 = x0$3 = x, y00$2 = y0$3 = y;
|
|
5079
5064
|
}
|
|
5080
5065
|
|
|
5081
5066
|
function areaPoint(x, y) {
|
|
5082
|
-
areaRingSum.add(y0 * x - x0 * y);
|
|
5083
|
-
x0 = x, y0 = y;
|
|
5067
|
+
areaRingSum.add(y0$3 * x - x0$3 * y);
|
|
5068
|
+
x0$3 = x, y0$3 = y;
|
|
5084
5069
|
}
|
|
5085
5070
|
|
|
5086
5071
|
function areaRingEnd() {
|
|
5087
|
-
areaPoint(x00, y00);
|
|
5072
|
+
areaPoint(x00$2, y00$2);
|
|
5088
5073
|
}
|
|
5089
5074
|
|
|
5090
|
-
var
|
|
5091
|
-
|
|
5092
|
-
|
|
5075
|
+
var pathArea = areaStream;
|
|
5076
|
+
|
|
5077
|
+
var x0$2 = Infinity,
|
|
5078
|
+
y0$2 = x0$2,
|
|
5079
|
+
x1 = -x0$2,
|
|
5093
5080
|
y1 = x1;
|
|
5094
5081
|
|
|
5095
5082
|
var boundsStream = {
|
|
5096
5083
|
point: boundsPoint,
|
|
5097
|
-
lineStart: noop
|
|
5098
|
-
lineEnd: noop
|
|
5099
|
-
polygonStart: noop
|
|
5100
|
-
polygonEnd: noop
|
|
5084
|
+
lineStart: noop,
|
|
5085
|
+
lineEnd: noop,
|
|
5086
|
+
polygonStart: noop,
|
|
5087
|
+
polygonEnd: noop,
|
|
5101
5088
|
result: function() {
|
|
5102
|
-
var bounds = [[x0$
|
|
5103
|
-
x1 = y1 = -(y0$
|
|
5089
|
+
var bounds = [[x0$2, y0$2], [x1, y1]];
|
|
5090
|
+
x1 = y1 = -(y0$2 = x0$2 = Infinity);
|
|
5104
5091
|
return bounds;
|
|
5105
5092
|
}
|
|
5106
5093
|
};
|
|
5107
5094
|
|
|
5108
5095
|
function boundsPoint(x, y) {
|
|
5109
|
-
if (x < x0$
|
|
5096
|
+
if (x < x0$2) x0$2 = x;
|
|
5110
5097
|
if (x > x1) x1 = x;
|
|
5111
|
-
if (y < y0$
|
|
5098
|
+
if (y < y0$2) y0$2 = y;
|
|
5112
5099
|
if (y > y1) y1 = y;
|
|
5113
5100
|
}
|
|
5114
5101
|
|
|
5102
|
+
var boundsStream$1 = boundsStream;
|
|
5103
|
+
|
|
5115
5104
|
// TODO Enforce positive area for exterior, negative area for interior?
|
|
5116
5105
|
|
|
5117
5106
|
var X0 = 0,
|
|
@@ -5125,8 +5114,8 @@ var X0 = 0,
|
|
|
5125
5114
|
Z2 = 0,
|
|
5126
5115
|
x00$1,
|
|
5127
5116
|
y00$1,
|
|
5128
|
-
x0$
|
|
5129
|
-
y0$
|
|
5117
|
+
x0$1,
|
|
5118
|
+
y0$1;
|
|
5130
5119
|
|
|
5131
5120
|
var centroidStream = {
|
|
5132
5121
|
point: centroidPoint,
|
|
@@ -5165,15 +5154,15 @@ function centroidLineStart() {
|
|
|
5165
5154
|
|
|
5166
5155
|
function centroidPointFirstLine(x, y) {
|
|
5167
5156
|
centroidStream.point = centroidPointLine;
|
|
5168
|
-
centroidPoint(x0$
|
|
5157
|
+
centroidPoint(x0$1 = x, y0$1 = y);
|
|
5169
5158
|
}
|
|
5170
5159
|
|
|
5171
5160
|
function centroidPointLine(x, y) {
|
|
5172
|
-
var dx = x - x0$
|
|
5173
|
-
X1 += z * (x0$
|
|
5174
|
-
Y1 += z * (y0$
|
|
5161
|
+
var dx = x - x0$1, dy = y - y0$1, z = sqrt(dx * dx + dy * dy);
|
|
5162
|
+
X1 += z * (x0$1 + x) / 2;
|
|
5163
|
+
Y1 += z * (y0$1 + y) / 2;
|
|
5175
5164
|
Z1 += z;
|
|
5176
|
-
centroidPoint(x0$
|
|
5165
|
+
centroidPoint(x0$1 = x, y0$1 = y);
|
|
5177
5166
|
}
|
|
5178
5167
|
|
|
5179
5168
|
function centroidLineEnd() {
|
|
@@ -5190,25 +5179,27 @@ function centroidRingEnd() {
|
|
|
5190
5179
|
|
|
5191
5180
|
function centroidPointFirstRing(x, y) {
|
|
5192
5181
|
centroidStream.point = centroidPointRing;
|
|
5193
|
-
centroidPoint(x00$1 = x0$
|
|
5182
|
+
centroidPoint(x00$1 = x0$1 = x, y00$1 = y0$1 = y);
|
|
5194
5183
|
}
|
|
5195
5184
|
|
|
5196
5185
|
function centroidPointRing(x, y) {
|
|
5197
|
-
var dx = x - x0$
|
|
5198
|
-
dy = y - y0$
|
|
5199
|
-
z = sqrt
|
|
5186
|
+
var dx = x - x0$1,
|
|
5187
|
+
dy = y - y0$1,
|
|
5188
|
+
z = sqrt(dx * dx + dy * dy);
|
|
5200
5189
|
|
|
5201
|
-
X1 += z * (x0$
|
|
5202
|
-
Y1 += z * (y0$
|
|
5190
|
+
X1 += z * (x0$1 + x) / 2;
|
|
5191
|
+
Y1 += z * (y0$1 + y) / 2;
|
|
5203
5192
|
Z1 += z;
|
|
5204
5193
|
|
|
5205
|
-
z = y0$
|
|
5206
|
-
X2 += z * (x0$
|
|
5207
|
-
Y2 += z * (y0$
|
|
5194
|
+
z = y0$1 * x - x0$1 * y;
|
|
5195
|
+
X2 += z * (x0$1 + x);
|
|
5196
|
+
Y2 += z * (y0$1 + y);
|
|
5208
5197
|
Z2 += z * 3;
|
|
5209
|
-
centroidPoint(x0$
|
|
5198
|
+
centroidPoint(x0$1 = x, y0$1 = y);
|
|
5210
5199
|
}
|
|
5211
5200
|
|
|
5201
|
+
var pathCentroid = centroidStream;
|
|
5202
|
+
|
|
5212
5203
|
function PathContext(context) {
|
|
5213
5204
|
this._context = context;
|
|
5214
5205
|
}
|
|
@@ -5244,29 +5235,29 @@ PathContext.prototype = {
|
|
|
5244
5235
|
}
|
|
5245
5236
|
default: {
|
|
5246
5237
|
this._context.moveTo(x + this._radius, y);
|
|
5247
|
-
this._context.arc(x, y, this._radius, 0, tau$
|
|
5238
|
+
this._context.arc(x, y, this._radius, 0, tau$1);
|
|
5248
5239
|
break;
|
|
5249
5240
|
}
|
|
5250
5241
|
}
|
|
5251
5242
|
},
|
|
5252
|
-
result: noop
|
|
5243
|
+
result: noop
|
|
5253
5244
|
};
|
|
5254
5245
|
|
|
5255
5246
|
var lengthSum = adder(),
|
|
5256
5247
|
lengthRing,
|
|
5257
|
-
x00
|
|
5258
|
-
y00
|
|
5259
|
-
x0
|
|
5260
|
-
y0
|
|
5248
|
+
x00,
|
|
5249
|
+
y00,
|
|
5250
|
+
x0,
|
|
5251
|
+
y0;
|
|
5261
5252
|
|
|
5262
5253
|
var lengthStream = {
|
|
5263
|
-
point: noop
|
|
5254
|
+
point: noop,
|
|
5264
5255
|
lineStart: function() {
|
|
5265
5256
|
lengthStream.point = lengthPointFirst;
|
|
5266
5257
|
},
|
|
5267
5258
|
lineEnd: function() {
|
|
5268
|
-
if (lengthRing) lengthPoint(x00
|
|
5269
|
-
lengthStream.point = noop
|
|
5259
|
+
if (lengthRing) lengthPoint(x00, y00);
|
|
5260
|
+
lengthStream.point = noop;
|
|
5270
5261
|
},
|
|
5271
5262
|
polygonStart: function() {
|
|
5272
5263
|
lengthRing = true;
|
|
@@ -5283,15 +5274,17 @@ var lengthStream = {
|
|
|
5283
5274
|
|
|
5284
5275
|
function lengthPointFirst(x, y) {
|
|
5285
5276
|
lengthStream.point = lengthPoint;
|
|
5286
|
-
x00
|
|
5277
|
+
x00 = x0 = x, y00 = y0 = y;
|
|
5287
5278
|
}
|
|
5288
5279
|
|
|
5289
5280
|
function lengthPoint(x, y) {
|
|
5290
|
-
x0
|
|
5291
|
-
lengthSum.add(sqrt
|
|
5292
|
-
x0
|
|
5281
|
+
x0 -= x, y0 -= y;
|
|
5282
|
+
lengthSum.add(sqrt(x0 * x0 + y0 * y0));
|
|
5283
|
+
x0 = x, y0 = y;
|
|
5293
5284
|
}
|
|
5294
5285
|
|
|
5286
|
+
var pathMeasure = lengthStream;
|
|
5287
|
+
|
|
5295
5288
|
function PathString() {
|
|
5296
5289
|
this._string = [];
|
|
5297
5290
|
}
|
|
@@ -5366,27 +5359,27 @@ function geoPath(projection, context) {
|
|
|
5366
5359
|
}
|
|
5367
5360
|
|
|
5368
5361
|
path.area = function(object) {
|
|
5369
|
-
geoStream(object, projectionStream(
|
|
5370
|
-
return
|
|
5362
|
+
geoStream(object, projectionStream(pathArea));
|
|
5363
|
+
return pathArea.result();
|
|
5371
5364
|
};
|
|
5372
5365
|
|
|
5373
5366
|
path.measure = function(object) {
|
|
5374
|
-
geoStream(object, projectionStream(
|
|
5375
|
-
return
|
|
5367
|
+
geoStream(object, projectionStream(pathMeasure));
|
|
5368
|
+
return pathMeasure.result();
|
|
5376
5369
|
};
|
|
5377
5370
|
|
|
5378
5371
|
path.bounds = function(object) {
|
|
5379
|
-
geoStream(object, projectionStream(boundsStream));
|
|
5380
|
-
return boundsStream.result();
|
|
5372
|
+
geoStream(object, projectionStream(boundsStream$1));
|
|
5373
|
+
return boundsStream$1.result();
|
|
5381
5374
|
};
|
|
5382
5375
|
|
|
5383
5376
|
path.centroid = function(object) {
|
|
5384
|
-
geoStream(object, projectionStream(
|
|
5385
|
-
return
|
|
5377
|
+
geoStream(object, projectionStream(pathCentroid));
|
|
5378
|
+
return pathCentroid.result();
|
|
5386
5379
|
};
|
|
5387
5380
|
|
|
5388
5381
|
path.projection = function(_) {
|
|
5389
|
-
return arguments.length ? (projectionStream = _ == null ? (projection = null, identity
|
|
5382
|
+
return arguments.length ? (projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream, path) : projection;
|
|
5390
5383
|
};
|
|
5391
5384
|
|
|
5392
5385
|
path.context = function(_) {
|
|
@@ -5487,42 +5480,42 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
5487
5480
|
}(Bar));
|
|
5488
5481
|
Gantt.prototype._class += " chart_Gantt";
|
|
5489
5482
|
|
|
5490
|
-
function constant
|
|
5483
|
+
function constant(x) {
|
|
5491
5484
|
return function constant() {
|
|
5492
5485
|
return x;
|
|
5493
5486
|
};
|
|
5494
5487
|
}
|
|
5495
5488
|
|
|
5496
|
-
var epsilon
|
|
5497
|
-
var pi
|
|
5498
|
-
var halfPi
|
|
5499
|
-
var tau
|
|
5489
|
+
var epsilon = 1e-12;
|
|
5490
|
+
var pi = Math.PI;
|
|
5491
|
+
var halfPi = pi / 2;
|
|
5492
|
+
var tau = 2 * pi;
|
|
5500
5493
|
|
|
5501
|
-
function arcInnerRadius
|
|
5494
|
+
function arcInnerRadius(d) {
|
|
5502
5495
|
return d.innerRadius;
|
|
5503
5496
|
}
|
|
5504
5497
|
|
|
5505
|
-
function arcOuterRadius
|
|
5498
|
+
function arcOuterRadius(d) {
|
|
5506
5499
|
return d.outerRadius;
|
|
5507
5500
|
}
|
|
5508
5501
|
|
|
5509
|
-
function arcStartAngle
|
|
5502
|
+
function arcStartAngle(d) {
|
|
5510
5503
|
return d.startAngle;
|
|
5511
5504
|
}
|
|
5512
5505
|
|
|
5513
|
-
function arcEndAngle
|
|
5506
|
+
function arcEndAngle(d) {
|
|
5514
5507
|
return d.endAngle;
|
|
5515
5508
|
}
|
|
5516
5509
|
|
|
5517
|
-
function arcPadAngle
|
|
5510
|
+
function arcPadAngle(d) {
|
|
5518
5511
|
return d && d.padAngle; // Note: optional!
|
|
5519
5512
|
}
|
|
5520
5513
|
|
|
5521
|
-
function asin
|
|
5522
|
-
return x >= 1 ? halfPi
|
|
5514
|
+
function asin(x) {
|
|
5515
|
+
return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
|
|
5523
5516
|
}
|
|
5524
5517
|
|
|
5525
|
-
function intersect
|
|
5518
|
+
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
5526
5519
|
var x10 = x1 - x0, y10 = y1 - y0,
|
|
5527
5520
|
x32 = x3 - x2, y32 = y3 - y2,
|
|
5528
5521
|
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / (y32 * x10 - x32 * y10);
|
|
@@ -5531,7 +5524,7 @@ function intersect$1(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
|
5531
5524
|
|
|
5532
5525
|
// Compute perpendicular offset line of length rc.
|
|
5533
5526
|
// http://mathworld.wolfram.com/Circle-LineIntersection.html
|
|
5534
|
-
function cornerTangents
|
|
5527
|
+
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
|
5535
5528
|
var x01 = x0 - x1,
|
|
5536
5529
|
y01 = y0 - y1,
|
|
5537
5530
|
lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01),
|
|
@@ -5573,13 +5566,13 @@ function cornerTangents$1(x0, y0, x1, y1, r1, rc, cw) {
|
|
|
5573
5566
|
}
|
|
5574
5567
|
|
|
5575
5568
|
function arc() {
|
|
5576
|
-
var innerRadius = arcInnerRadius
|
|
5577
|
-
outerRadius = arcOuterRadius
|
|
5578
|
-
cornerRadius = constant
|
|
5569
|
+
var innerRadius = arcInnerRadius,
|
|
5570
|
+
outerRadius = arcOuterRadius,
|
|
5571
|
+
cornerRadius = constant(0),
|
|
5579
5572
|
padRadius = null,
|
|
5580
|
-
startAngle = arcStartAngle
|
|
5581
|
-
endAngle = arcEndAngle
|
|
5582
|
-
padAngle = arcPadAngle
|
|
5573
|
+
startAngle = arcStartAngle,
|
|
5574
|
+
endAngle = arcEndAngle,
|
|
5575
|
+
padAngle = arcPadAngle,
|
|
5583
5576
|
context = null;
|
|
5584
5577
|
|
|
5585
5578
|
function arc() {
|
|
@@ -5587,8 +5580,8 @@ function arc() {
|
|
|
5587
5580
|
r,
|
|
5588
5581
|
r0 = +innerRadius.apply(this, arguments),
|
|
5589
5582
|
r1 = +outerRadius.apply(this, arguments),
|
|
5590
|
-
a0 = startAngle.apply(this, arguments) - halfPi
|
|
5591
|
-
a1 = endAngle.apply(this, arguments) - halfPi
|
|
5583
|
+
a0 = startAngle.apply(this, arguments) - halfPi,
|
|
5584
|
+
a1 = endAngle.apply(this, arguments) - halfPi,
|
|
5592
5585
|
da = Math.abs(a1 - a0),
|
|
5593
5586
|
cw = a1 > a0;
|
|
5594
5587
|
|
|
@@ -5598,13 +5591,13 @@ function arc() {
|
|
|
5598
5591
|
if (r1 < r0) r = r1, r1 = r0, r0 = r;
|
|
5599
5592
|
|
|
5600
5593
|
// Is it a point?
|
|
5601
|
-
if (!(r1 > epsilon
|
|
5594
|
+
if (!(r1 > epsilon)) context.moveTo(0, 0);
|
|
5602
5595
|
|
|
5603
5596
|
// Or is it a circle or annulus?
|
|
5604
|
-
else if (da > tau
|
|
5597
|
+
else if (da > tau - epsilon) {
|
|
5605
5598
|
context.moveTo(r1 * Math.cos(a0), r1 * Math.sin(a0));
|
|
5606
5599
|
context.arc(0, 0, r1, a0, a1, !cw);
|
|
5607
|
-
if (r0 > epsilon
|
|
5600
|
+
if (r0 > epsilon) {
|
|
5608
5601
|
context.moveTo(r0 * Math.cos(a1), r0 * Math.sin(a1));
|
|
5609
5602
|
context.arc(0, 0, r0, a1, a0, cw);
|
|
5610
5603
|
}
|
|
@@ -5619,7 +5612,7 @@ function arc() {
|
|
|
5619
5612
|
da0 = da,
|
|
5620
5613
|
da1 = da,
|
|
5621
5614
|
ap = padAngle.apply(this, arguments) / 2,
|
|
5622
|
-
rp = (ap > epsilon
|
|
5615
|
+
rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : Math.sqrt(r0 * r0 + r1 * r1)),
|
|
5623
5616
|
rc = Math.min(Math.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
|
|
5624
5617
|
rc0 = rc,
|
|
5625
5618
|
rc1 = rc,
|
|
@@ -5627,12 +5620,12 @@ function arc() {
|
|
|
5627
5620
|
t1;
|
|
5628
5621
|
|
|
5629
5622
|
// Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
|
|
5630
|
-
if (rp > epsilon
|
|
5631
|
-
var p0 = asin
|
|
5632
|
-
p1 = asin
|
|
5633
|
-
if ((da0 -= p0 * 2) > epsilon
|
|
5623
|
+
if (rp > epsilon) {
|
|
5624
|
+
var p0 = asin(rp / r0 * Math.sin(ap)),
|
|
5625
|
+
p1 = asin(rp / r1 * Math.sin(ap));
|
|
5626
|
+
if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
|
|
5634
5627
|
else da0 = 0, a00 = a10 = (a0 + a1) / 2;
|
|
5635
|
-
if ((da1 -= p1 * 2) > epsilon
|
|
5628
|
+
if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
|
|
5636
5629
|
else da1 = 0, a01 = a11 = (a0 + a1) / 2;
|
|
5637
5630
|
}
|
|
5638
5631
|
|
|
@@ -5642,15 +5635,15 @@ function arc() {
|
|
|
5642
5635
|
y10 = r0 * Math.sin(a10);
|
|
5643
5636
|
|
|
5644
5637
|
// Apply rounded corners?
|
|
5645
|
-
if (rc > epsilon
|
|
5638
|
+
if (rc > epsilon) {
|
|
5646
5639
|
var x11 = r1 * Math.cos(a11),
|
|
5647
5640
|
y11 = r1 * Math.sin(a11),
|
|
5648
5641
|
x00 = r0 * Math.cos(a00),
|
|
5649
5642
|
y00 = r0 * Math.sin(a00);
|
|
5650
5643
|
|
|
5651
5644
|
// Restrict the corner radius according to the sector angle.
|
|
5652
|
-
if (da < pi
|
|
5653
|
-
var oc = da0 > epsilon
|
|
5645
|
+
if (da < pi) {
|
|
5646
|
+
var oc = da0 > epsilon ? intersect(x01, y01, x00, y00, x11, y11, x10, y10) : [x10, y10],
|
|
5654
5647
|
ax = x01 - oc[0],
|
|
5655
5648
|
ay = y01 - oc[1],
|
|
5656
5649
|
bx = x11 - oc[0],
|
|
@@ -5663,12 +5656,12 @@ function arc() {
|
|
|
5663
5656
|
}
|
|
5664
5657
|
|
|
5665
5658
|
// Is the sector collapsed to a line?
|
|
5666
|
-
if (!(da1 > epsilon
|
|
5659
|
+
if (!(da1 > epsilon)) context.moveTo(x01, y01);
|
|
5667
5660
|
|
|
5668
5661
|
// Does the sector’s outer ring have rounded corners?
|
|
5669
|
-
else if (rc1 > epsilon
|
|
5670
|
-
t0 = cornerTangents
|
|
5671
|
-
t1 = cornerTangents
|
|
5662
|
+
else if (rc1 > epsilon) {
|
|
5663
|
+
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
|
|
5664
|
+
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
|
|
5672
5665
|
|
|
5673
5666
|
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
5674
5667
|
|
|
@@ -5688,12 +5681,12 @@ function arc() {
|
|
|
5688
5681
|
|
|
5689
5682
|
// Is there no inner ring, and it’s a circular sector?
|
|
5690
5683
|
// Or perhaps it’s an annular sector collapsed due to padding?
|
|
5691
|
-
if (!(r0 > epsilon
|
|
5684
|
+
if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);
|
|
5692
5685
|
|
|
5693
5686
|
// Does the sector’s inner ring (or point) have rounded corners?
|
|
5694
|
-
else if (rc0 > epsilon
|
|
5695
|
-
t0 = cornerTangents
|
|
5696
|
-
t1 = cornerTangents
|
|
5687
|
+
else if (rc0 > epsilon) {
|
|
5688
|
+
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
|
|
5689
|
+
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
|
|
5697
5690
|
|
|
5698
5691
|
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
5699
5692
|
|
|
@@ -5719,36 +5712,36 @@ function arc() {
|
|
|
5719
5712
|
|
|
5720
5713
|
arc.centroid = function() {
|
|
5721
5714
|
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
|
|
5722
|
-
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi
|
|
5715
|
+
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
|
|
5723
5716
|
return [Math.cos(a) * r, Math.sin(a) * r];
|
|
5724
5717
|
};
|
|
5725
5718
|
|
|
5726
5719
|
arc.innerRadius = function(_) {
|
|
5727
|
-
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant
|
|
5720
|
+
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
|
|
5728
5721
|
};
|
|
5729
5722
|
|
|
5730
5723
|
arc.outerRadius = function(_) {
|
|
5731
|
-
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant
|
|
5724
|
+
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
|
|
5732
5725
|
};
|
|
5733
5726
|
|
|
5734
5727
|
arc.cornerRadius = function(_) {
|
|
5735
|
-
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant
|
|
5728
|
+
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
|
|
5736
5729
|
};
|
|
5737
5730
|
|
|
5738
5731
|
arc.padRadius = function(_) {
|
|
5739
|
-
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant
|
|
5732
|
+
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
|
|
5740
5733
|
};
|
|
5741
5734
|
|
|
5742
5735
|
arc.startAngle = function(_) {
|
|
5743
|
-
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant
|
|
5736
|
+
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
|
|
5744
5737
|
};
|
|
5745
5738
|
|
|
5746
5739
|
arc.endAngle = function(_) {
|
|
5747
|
-
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant
|
|
5740
|
+
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
|
|
5748
5741
|
};
|
|
5749
5742
|
|
|
5750
5743
|
arc.padAngle = function(_) {
|
|
5751
|
-
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant
|
|
5744
|
+
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
|
|
5752
5745
|
};
|
|
5753
5746
|
|
|
5754
5747
|
arc.context = function(_) {
|
|
@@ -5758,11 +5751,11 @@ function arc() {
|
|
|
5758
5751
|
return arc;
|
|
5759
5752
|
}
|
|
5760
5753
|
|
|
5761
|
-
function Linear
|
|
5754
|
+
function Linear(context) {
|
|
5762
5755
|
this._context = context;
|
|
5763
5756
|
}
|
|
5764
5757
|
|
|
5765
|
-
Linear
|
|
5758
|
+
Linear.prototype = {
|
|
5766
5759
|
areaStart: function() {
|
|
5767
5760
|
this._line = 0;
|
|
5768
5761
|
},
|
|
@@ -5787,21 +5780,21 @@ Linear$1.prototype = {
|
|
|
5787
5780
|
};
|
|
5788
5781
|
|
|
5789
5782
|
function curveLinear(context) {
|
|
5790
|
-
return new Linear
|
|
5783
|
+
return new Linear(context);
|
|
5791
5784
|
}
|
|
5792
5785
|
|
|
5793
|
-
function x
|
|
5786
|
+
function x(p) {
|
|
5794
5787
|
return p[0];
|
|
5795
5788
|
}
|
|
5796
5789
|
|
|
5797
|
-
function y
|
|
5790
|
+
function y(p) {
|
|
5798
5791
|
return p[1];
|
|
5799
5792
|
}
|
|
5800
5793
|
|
|
5801
5794
|
function line() {
|
|
5802
|
-
var x = x
|
|
5803
|
-
y = y
|
|
5804
|
-
defined = constant
|
|
5795
|
+
var x$1 = x,
|
|
5796
|
+
y$1 = y,
|
|
5797
|
+
defined = constant(true),
|
|
5805
5798
|
context = null,
|
|
5806
5799
|
curve = curveLinear,
|
|
5807
5800
|
output = null;
|
|
@@ -5820,22 +5813,22 @@ function line() {
|
|
|
5820
5813
|
if (defined0 = !defined0) output.lineStart();
|
|
5821
5814
|
else output.lineEnd();
|
|
5822
5815
|
}
|
|
5823
|
-
if (defined0) output.point(+x(d, i, data), +y(d, i, data));
|
|
5816
|
+
if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data));
|
|
5824
5817
|
}
|
|
5825
5818
|
|
|
5826
5819
|
if (buffer) return output = null, buffer + "" || null;
|
|
5827
5820
|
}
|
|
5828
5821
|
|
|
5829
5822
|
line.x = function(_) {
|
|
5830
|
-
return arguments.length ? (x = typeof _ === "function" ? _ : constant
|
|
5823
|
+
return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), line) : x$1;
|
|
5831
5824
|
};
|
|
5832
5825
|
|
|
5833
5826
|
line.y = function(_) {
|
|
5834
|
-
return arguments.length ? (y = typeof _ === "function" ? _ : constant
|
|
5827
|
+
return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), line) : y$1;
|
|
5835
5828
|
};
|
|
5836
5829
|
|
|
5837
5830
|
line.defined = function(_) {
|
|
5838
|
-
return arguments.length ? (defined = typeof _ === "function" ? _ : constant
|
|
5831
|
+
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined;
|
|
5839
5832
|
};
|
|
5840
5833
|
|
|
5841
5834
|
line.curve = function(_) {
|
|
@@ -5849,7 +5842,7 @@ function line() {
|
|
|
5849
5842
|
return line;
|
|
5850
5843
|
}
|
|
5851
5844
|
|
|
5852
|
-
function point$
|
|
5845
|
+
function point$2(that, x, y) {
|
|
5853
5846
|
that._context.bezierCurveTo(
|
|
5854
5847
|
that._x1 + that._k * (that._x2 - that._x0),
|
|
5855
5848
|
that._y1 + that._k * (that._y2 - that._y0),
|
|
@@ -5860,12 +5853,12 @@ function point$4(that, x, y) {
|
|
|
5860
5853
|
);
|
|
5861
5854
|
}
|
|
5862
5855
|
|
|
5863
|
-
function Cardinal
|
|
5856
|
+
function Cardinal(context, tension) {
|
|
5864
5857
|
this._context = context;
|
|
5865
5858
|
this._k = (1 - tension) / 6;
|
|
5866
5859
|
}
|
|
5867
5860
|
|
|
5868
|
-
Cardinal
|
|
5861
|
+
Cardinal.prototype = {
|
|
5869
5862
|
areaStart: function() {
|
|
5870
5863
|
this._line = 0;
|
|
5871
5864
|
},
|
|
@@ -5880,7 +5873,7 @@ Cardinal$1.prototype = {
|
|
|
5880
5873
|
lineEnd: function() {
|
|
5881
5874
|
switch (this._point) {
|
|
5882
5875
|
case 2: this._context.lineTo(this._x2, this._y2); break;
|
|
5883
|
-
case 3: point$
|
|
5876
|
+
case 3: point$2(this, this._x1, this._y1); break;
|
|
5884
5877
|
}
|
|
5885
5878
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
5886
5879
|
this._line = 1 - this._line;
|
|
@@ -5891,27 +5884,27 @@ Cardinal$1.prototype = {
|
|
|
5891
5884
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
5892
5885
|
case 1: this._point = 2; this._x1 = x, this._y1 = y; break;
|
|
5893
5886
|
case 2: this._point = 3; // proceed
|
|
5894
|
-
default: point$
|
|
5887
|
+
default: point$2(this, x, y); break;
|
|
5895
5888
|
}
|
|
5896
5889
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
5897
5890
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
|
|
5898
5891
|
}
|
|
5899
5892
|
};
|
|
5900
5893
|
|
|
5901
|
-
function point$
|
|
5894
|
+
function point$1(that, x, y) {
|
|
5902
5895
|
var x1 = that._x1,
|
|
5903
5896
|
y1 = that._y1,
|
|
5904
5897
|
x2 = that._x2,
|
|
5905
5898
|
y2 = that._y2;
|
|
5906
5899
|
|
|
5907
|
-
if (that._l01_a > epsilon
|
|
5900
|
+
if (that._l01_a > epsilon) {
|
|
5908
5901
|
var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,
|
|
5909
5902
|
n = 3 * that._l01_a * (that._l01_a + that._l12_a);
|
|
5910
5903
|
x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
|
|
5911
5904
|
y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
|
|
5912
5905
|
}
|
|
5913
5906
|
|
|
5914
|
-
if (that._l23_a > epsilon
|
|
5907
|
+
if (that._l23_a > epsilon) {
|
|
5915
5908
|
var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,
|
|
5916
5909
|
m = 3 * that._l23_a * (that._l23_a + that._l12_a);
|
|
5917
5910
|
x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
|
|
@@ -5921,12 +5914,12 @@ function point$5(that, x, y) {
|
|
|
5921
5914
|
that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
|
|
5922
5915
|
}
|
|
5923
5916
|
|
|
5924
|
-
function CatmullRom
|
|
5917
|
+
function CatmullRom(context, alpha) {
|
|
5925
5918
|
this._context = context;
|
|
5926
5919
|
this._alpha = alpha;
|
|
5927
5920
|
}
|
|
5928
5921
|
|
|
5929
|
-
CatmullRom
|
|
5922
|
+
CatmullRom.prototype = {
|
|
5930
5923
|
areaStart: function() {
|
|
5931
5924
|
this._line = 0;
|
|
5932
5925
|
},
|
|
@@ -5961,7 +5954,7 @@ CatmullRom$1.prototype = {
|
|
|
5961
5954
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
5962
5955
|
case 1: this._point = 2; break;
|
|
5963
5956
|
case 2: this._point = 3; // proceed
|
|
5964
|
-
default: point$
|
|
5957
|
+
default: point$1(this, x, y); break;
|
|
5965
5958
|
}
|
|
5966
5959
|
|
|
5967
5960
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
@@ -5974,7 +5967,7 @@ CatmullRom$1.prototype = {
|
|
|
5974
5967
|
var curveCatmullRom = (function custom(alpha) {
|
|
5975
5968
|
|
|
5976
5969
|
function catmullRom(context) {
|
|
5977
|
-
return alpha ? new CatmullRom
|
|
5970
|
+
return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
|
|
5978
5971
|
}
|
|
5979
5972
|
|
|
5980
5973
|
catmullRom.alpha = function(alpha) {
|
|
@@ -5984,7 +5977,7 @@ var curveCatmullRom = (function custom(alpha) {
|
|
|
5984
5977
|
return catmullRom;
|
|
5985
5978
|
})(0.5);
|
|
5986
5979
|
|
|
5987
|
-
function sign
|
|
5980
|
+
function sign(x) {
|
|
5988
5981
|
return x < 0 ? -1 : 1;
|
|
5989
5982
|
}
|
|
5990
5983
|
|
|
@@ -5992,17 +5985,17 @@ function sign$1(x) {
|
|
|
5992
5985
|
// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
|
|
5993
5986
|
// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
|
|
5994
5987
|
// NOV(II), P. 443, 1990.
|
|
5995
|
-
function slope3
|
|
5988
|
+
function slope3(that, x2, y2) {
|
|
5996
5989
|
var h0 = that._x1 - that._x0,
|
|
5997
5990
|
h1 = x2 - that._x1,
|
|
5998
5991
|
s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
|
|
5999
5992
|
s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),
|
|
6000
5993
|
p = (s0 * h1 + s1 * h0) / (h0 + h1);
|
|
6001
|
-
return (sign
|
|
5994
|
+
return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
|
|
6002
5995
|
}
|
|
6003
5996
|
|
|
6004
5997
|
// Calculate a one-sided slope.
|
|
6005
|
-
function slope2
|
|
5998
|
+
function slope2(that, t) {
|
|
6006
5999
|
var h = that._x1 - that._x0;
|
|
6007
6000
|
return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
|
|
6008
6001
|
}
|
|
@@ -6010,7 +6003,7 @@ function slope2$1(that, t) {
|
|
|
6010
6003
|
// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
|
|
6011
6004
|
// "you can express cubic Hermite interpolation in terms of cubic Bézier curves
|
|
6012
6005
|
// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
|
|
6013
|
-
function point
|
|
6006
|
+
function point(that, t0, t1) {
|
|
6014
6007
|
var x0 = that._x0,
|
|
6015
6008
|
y0 = that._y0,
|
|
6016
6009
|
x1 = that._x1,
|
|
@@ -6019,11 +6012,11 @@ function point$6(that, t0, t1) {
|
|
|
6019
6012
|
that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
|
|
6020
6013
|
}
|
|
6021
6014
|
|
|
6022
|
-
function MonotoneX
|
|
6015
|
+
function MonotoneX(context) {
|
|
6023
6016
|
this._context = context;
|
|
6024
6017
|
}
|
|
6025
6018
|
|
|
6026
|
-
MonotoneX
|
|
6019
|
+
MonotoneX.prototype = {
|
|
6027
6020
|
areaStart: function() {
|
|
6028
6021
|
this._line = 0;
|
|
6029
6022
|
},
|
|
@@ -6039,7 +6032,7 @@ MonotoneX$1.prototype = {
|
|
|
6039
6032
|
lineEnd: function() {
|
|
6040
6033
|
switch (this._point) {
|
|
6041
6034
|
case 2: this._context.lineTo(this._x1, this._y1); break;
|
|
6042
|
-
case 3: point
|
|
6035
|
+
case 3: point(this, this._t0, slope2(this, this._t0)); break;
|
|
6043
6036
|
}
|
|
6044
6037
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
6045
6038
|
this._line = 1 - this._line;
|
|
@@ -6052,8 +6045,8 @@ MonotoneX$1.prototype = {
|
|
|
6052
6045
|
switch (this._point) {
|
|
6053
6046
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
6054
6047
|
case 1: this._point = 2; break;
|
|
6055
|
-
case 2: this._point = 3; point
|
|
6056
|
-
default: point
|
|
6048
|
+
case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;
|
|
6049
|
+
default: point(this, this._t0, t1 = slope3(this, x, y)); break;
|
|
6057
6050
|
}
|
|
6058
6051
|
|
|
6059
6052
|
this._x0 = this._x1, this._x1 = x;
|
|
@@ -6062,23 +6055,8 @@ MonotoneX$1.prototype = {
|
|
|
6062
6055
|
}
|
|
6063
6056
|
};
|
|
6064
6057
|
|
|
6065
|
-
function
|
|
6066
|
-
this
|
|
6067
|
-
}
|
|
6068
|
-
|
|
6069
|
-
(MonotoneY$1.prototype = Object.create(MonotoneX$1.prototype)).point = function(x, y) {
|
|
6070
|
-
MonotoneX$1.prototype.point.call(this, y, x);
|
|
6071
|
-
};
|
|
6072
|
-
|
|
6073
|
-
function ReflectContext$1(context) {
|
|
6074
|
-
this._context = context;
|
|
6075
|
-
}
|
|
6076
|
-
|
|
6077
|
-
ReflectContext$1.prototype = {
|
|
6078
|
-
moveTo: function(x, y) { this._context.moveTo(y, x); },
|
|
6079
|
-
closePath: function() { this._context.closePath(); },
|
|
6080
|
-
lineTo: function(x, y) { this._context.lineTo(y, x); },
|
|
6081
|
-
bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }
|
|
6058
|
+
(Object.create(MonotoneX.prototype)).point = function(x, y) {
|
|
6059
|
+
MonotoneX.prototype.point.call(this, y, x);
|
|
6082
6060
|
};
|
|
6083
6061
|
|
|
6084
6062
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
@@ -7832,7 +7810,7 @@ var d3NoteText = function (_Type) {
|
|
|
7832
7810
|
return d3NoteText;
|
|
7833
7811
|
}(Type);
|
|
7834
7812
|
|
|
7835
|
-
|
|
7813
|
+
customType(d3NoteText, {
|
|
7836
7814
|
className: "label",
|
|
7837
7815
|
note: { align: "middle" }
|
|
7838
7816
|
});
|
|
@@ -7847,25 +7825,25 @@ var d3CalloutElbow = customType(d3Callout, {
|
|
|
7847
7825
|
connector: { type: "elbow" }
|
|
7848
7826
|
});
|
|
7849
7827
|
|
|
7850
|
-
|
|
7828
|
+
customType(d3Callout, {
|
|
7851
7829
|
className: "callout curve",
|
|
7852
7830
|
connector: { type: "curve" }
|
|
7853
7831
|
});
|
|
7854
7832
|
|
|
7855
|
-
|
|
7833
|
+
customType(Type, {
|
|
7856
7834
|
className: "badge",
|
|
7857
7835
|
subject: { type: "badge" },
|
|
7858
7836
|
disable: ["connector", "note"]
|
|
7859
7837
|
});
|
|
7860
7838
|
|
|
7861
|
-
|
|
7839
|
+
customType(d3NoteText, {
|
|
7862
7840
|
className: "callout circle",
|
|
7863
7841
|
subject: { type: "circle" },
|
|
7864
7842
|
note: { lineType: "horizontal" },
|
|
7865
7843
|
connector: { type: "elbow" }
|
|
7866
7844
|
});
|
|
7867
7845
|
|
|
7868
|
-
|
|
7846
|
+
customType(d3NoteText, {
|
|
7869
7847
|
className: "callout rect",
|
|
7870
7848
|
subject: { type: "rect" },
|
|
7871
7849
|
note: { lineType: "horizontal" },
|
|
@@ -7908,7 +7886,7 @@ var ThresholdMap = function (_d3Callout) {
|
|
|
7908
7886
|
return ThresholdMap;
|
|
7909
7887
|
}(d3Callout);
|
|
7910
7888
|
|
|
7911
|
-
|
|
7889
|
+
customType(ThresholdMap, {
|
|
7912
7890
|
className: "callout xythreshold",
|
|
7913
7891
|
subject: { type: "threshold" }
|
|
7914
7892
|
});
|
|
@@ -8224,7 +8202,7 @@ function indicatorTranslate(angle, radius, inner) {
|
|
|
8224
8202
|
if (inner === void 0) { inner = false; }
|
|
8225
8203
|
var point = pointOnArc(angle, radius);
|
|
8226
8204
|
var rotation = angle * 180 / Math.PI + (inner === true ? 180 : 0);
|
|
8227
|
-
return "translate("
|
|
8205
|
+
return "translate(".concat(point.x, ", ").concat(point.y, ") rotate(").concat(rotation, ")");
|
|
8228
8206
|
}
|
|
8229
8207
|
function indicatorTween(newAngle, radius, inner) {
|
|
8230
8208
|
if (inner === void 0) { inner = false; }
|
|
@@ -8325,7 +8303,7 @@ var Gauge = /** @class */ (function (_super) {
|
|
|
8325
8303
|
var size = this.calcSize(textElement, w, h);
|
|
8326
8304
|
var x2 = x + w / 2 - size.width / 2 * size.scale;
|
|
8327
8305
|
var y2 = y + h / 2 - size.height / 2 * size.scale;
|
|
8328
|
-
textElement.attr("transform", "translate("
|
|
8306
|
+
textElement.attr("transform", "translate(".concat(x2, ", ").concat(y2, ") scale(").concat(size.scale, ")"));
|
|
8329
8307
|
};
|
|
8330
8308
|
Gauge.prototype.calcWidth = function () {
|
|
8331
8309
|
return Math.min(this.width(), this.height(), this.maxDiameter());
|
|
@@ -8502,7 +8480,7 @@ Gauge.prototype.publish("colorDomain", [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.
|
|
|
8502
8480
|
Gauge.prototype.publish("emptyColor", "lightgrey", "html-color", "Color of the empty portion of the gauge");
|
|
8503
8481
|
Gauge.prototype.publish("tickColor", "black", "html-color", "Color of the tick");
|
|
8504
8482
|
|
|
8505
|
-
var css_248z$6 = ".chart_Pie>g>text
|
|
8483
|
+
var css_248z$6 = ".chart_Pie path,.chart_Pie>g>text{cursor:pointer}.chart_Pie .arc path{stroke:#fff;stroke-width:.75px}.chart_Pie .arc.selected path{stroke:red;stroke-width:1.5px}.chart_Pie polyline{stroke:#000;stroke-width:2px;fill:none;opacity:.3}";
|
|
8506
8484
|
styleInject(css_248z$6);
|
|
8507
8485
|
|
|
8508
8486
|
var Pie = /** @class */ (function (_super) {
|
|
@@ -8572,7 +8550,7 @@ var Pie = /** @class */ (function (_super) {
|
|
|
8572
8550
|
}
|
|
8573
8551
|
}
|
|
8574
8552
|
if (this.showSeriesValue()) {
|
|
8575
|
-
label += " : "
|
|
8553
|
+
label += " : ".concat(this._seriesValueFormatter(d.data[1]));
|
|
8576
8554
|
}
|
|
8577
8555
|
if (this.showSeriesPercentage()) {
|
|
8578
8556
|
var sum = this._totalValue;
|
|
@@ -8581,7 +8559,7 @@ var Pie = /** @class */ (function (_super) {
|
|
|
8581
8559
|
sum = dm.sum;
|
|
8582
8560
|
}
|
|
8583
8561
|
var perc = (d.data[1] / sum) * 100;
|
|
8584
|
-
label += " : "
|
|
8562
|
+
label += " : ".concat(this._seriesPercentageFormatter(perc), "%");
|
|
8585
8563
|
}
|
|
8586
8564
|
return label;
|
|
8587
8565
|
};
|
|
@@ -8631,7 +8609,7 @@ var Pie = /** @class */ (function (_super) {
|
|
|
8631
8609
|
.padRadius(outerRadius)
|
|
8632
8610
|
.outerRadius(outerRadius);
|
|
8633
8611
|
this._quadIdxArr = [[], [], [], []];
|
|
8634
|
-
var data = __spreadArray([], this.data()).sort(function (a, b) {
|
|
8612
|
+
var data = __spreadArray([], this.data(), true).sort(function (a, b) {
|
|
8635
8613
|
return a[1] - b[1] > 0 ? -1 : 1;
|
|
8636
8614
|
});
|
|
8637
8615
|
var arc = this._slices.selectAll(".arc").data(this.d3Pie(data), function (d) { return d.data[0]; });
|
|
@@ -8725,7 +8703,7 @@ var Pie = /** @class */ (function (_super) {
|
|
|
8725
8703
|
.attr("points", function (d, i) {
|
|
8726
8704
|
var pos = context.d3LabelArc.centroid(d);
|
|
8727
8705
|
var pos1 = context.d3Arc.centroid(d);
|
|
8728
|
-
var pos2 = __spreadArray([], pos);
|
|
8706
|
+
var pos2 = __spreadArray([], pos, true);
|
|
8729
8707
|
pos[0] = labelRadius * (context.isLeftSide(midAngle(d)) ? 1 : -1);
|
|
8730
8708
|
pos[1] = context._labelPositions[i].top;
|
|
8731
8709
|
return [pos1, pos2, pos];
|
|
@@ -8914,7 +8892,7 @@ var Heat = /** @class */ (function (_super) {
|
|
|
8914
8892
|
Heat.prototype.layerEnter = function (host, element, duration) {
|
|
8915
8893
|
if (duration === void 0) { duration = 250; }
|
|
8916
8894
|
_super.prototype.layerEnter.call(this, host, element, duration);
|
|
8917
|
-
this._domForeignObject = this.svg.insert("foreignObject", "#"
|
|
8895
|
+
this._domForeignObject = this.svg.insert("foreignObject", "#".concat(this.id() + "_clippath"));
|
|
8918
8896
|
this._domCanvas = this._domForeignObject.append("xhtml:body")
|
|
8919
8897
|
.style("margin", "0px")
|
|
8920
8898
|
.style("padding", "0px")
|
|
@@ -9208,8 +9186,8 @@ function d3HexBin() {
|
|
|
9208
9186
|
return hexbin.radius(1);
|
|
9209
9187
|
}
|
|
9210
9188
|
|
|
9211
|
-
var css_248z$
|
|
9212
|
-
styleInject(css_248z$
|
|
9189
|
+
var css_248z$5 = ".chart_HexBin .hexagon{fill:none;stroke:#000;stroke-width:.5px}.chart_HexBin .hexagon.selected{stroke:red}";
|
|
9190
|
+
styleInject(css_248z$5);
|
|
9213
9191
|
|
|
9214
9192
|
var HexBin = /** @class */ (function (_super) {
|
|
9215
9193
|
__extends(HexBin, _super);
|
|
@@ -9222,8 +9200,8 @@ var HexBin = /** @class */ (function (_super) {
|
|
|
9222
9200
|
var seriesExtent = extent(d, function (d) { return d.label; });
|
|
9223
9201
|
var labelExtent = extent(d, function (d) { return d.value; });
|
|
9224
9202
|
return _this.tooltipFormat({
|
|
9225
|
-
series: seriesExtent[0] === seriesExtent[1] ? seriesExtent[0] : seriesExtent[0]
|
|
9226
|
-
label: labelExtent[0] === labelExtent[1] ? labelExtent[0] : labelExtent[0]
|
|
9203
|
+
series: seriesExtent[0] === seriesExtent[1] ? seriesExtent[0] : "".concat(seriesExtent[0], " -> ").concat(seriesExtent[1]),
|
|
9204
|
+
label: labelExtent[0] === labelExtent[1] ? labelExtent[0] : "".concat(labelExtent[0], " -> ").concat(labelExtent[1]),
|
|
9227
9205
|
value: d.length
|
|
9228
9206
|
});
|
|
9229
9207
|
});
|
|
@@ -9317,8 +9295,8 @@ HexBin.prototype.publish("paletteID", "Blues", "set", "Color palette for this wi
|
|
|
9317
9295
|
HexBin.prototype.publish("useClonedPalette", false, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] });
|
|
9318
9296
|
HexBin.prototype.publish("binSize", 20, "number", "Bin radius", null, { range: { min: 1, max: 300, step: 1 } });
|
|
9319
9297
|
|
|
9320
|
-
var css_248z$
|
|
9321
|
-
styleInject(css_248z$
|
|
9298
|
+
var css_248z$4 = ".chart_Line .dataLine{fill:none;stroke:#4682b4;stroke-width:1.5px}";
|
|
9299
|
+
styleInject(css_248z$4);
|
|
9322
9300
|
|
|
9323
9301
|
var Line = /** @class */ (function (_super) {
|
|
9324
9302
|
__extends(Line, _super);
|
|
@@ -9455,7 +9433,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9455
9433
|
}
|
|
9456
9434
|
this._g
|
|
9457
9435
|
.style("shape-rendering", "crispEdges")
|
|
9458
|
-
.attr("transform", "translate("
|
|
9436
|
+
.attr("transform", "translate(".concat(transX, ",").concat(transY, ")rotate(").concat(rotate, ")scale(").concat(s, ")"));
|
|
9459
9437
|
this._leftLine
|
|
9460
9438
|
.attr("fill", lineColor)
|
|
9461
9439
|
.attr("height", candleWidth)
|
|
@@ -9510,7 +9488,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9510
9488
|
.attr("fill", this.textColor())
|
|
9511
9489
|
.attr("x", 0)
|
|
9512
9490
|
.attr("y", 0)
|
|
9513
|
-
.attr("transform", "translate("
|
|
9491
|
+
.attr("transform", "translate(".concat(q0x, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9514
9492
|
.attr("font-size", labelFontSize)
|
|
9515
9493
|
.attr("text-anchor", labelAnchor)
|
|
9516
9494
|
.attr("alignment-baseline", "hanging")
|
|
@@ -9522,7 +9500,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9522
9500
|
.attr("fill", this.textColor())
|
|
9523
9501
|
.attr("x", 0)
|
|
9524
9502
|
.attr("y", 0)
|
|
9525
|
-
.attr("transform", "translate("
|
|
9503
|
+
.attr("transform", "translate(".concat(q1x, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9526
9504
|
.attr("font-size", labelFontSize)
|
|
9527
9505
|
.attr("text-anchor", labelAnchor)
|
|
9528
9506
|
.attr("alignment-baseline", "middle")
|
|
@@ -9534,7 +9512,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9534
9512
|
.attr("fill", this.textColor())
|
|
9535
9513
|
.attr("x", 0)
|
|
9536
9514
|
.attr("y", 0)
|
|
9537
|
-
.attr("transform", "translate("
|
|
9515
|
+
.attr("transform", "translate(".concat(q2x, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9538
9516
|
.attr("font-size", labelFontSize)
|
|
9539
9517
|
.attr("text-anchor", labelAnchor)
|
|
9540
9518
|
.attr("alignment-baseline", "middle")
|
|
@@ -9546,7 +9524,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9546
9524
|
.attr("fill", this.textColor())
|
|
9547
9525
|
.attr("x", 0)
|
|
9548
9526
|
.attr("y", 0)
|
|
9549
|
-
.attr("transform", "translate("
|
|
9527
|
+
.attr("transform", "translate(".concat(q3x, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9550
9528
|
.attr("font-size", labelFontSize)
|
|
9551
9529
|
.attr("text-anchor", labelAnchor)
|
|
9552
9530
|
.attr("alignment-baseline", "middle")
|
|
@@ -9558,7 +9536,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9558
9536
|
.attr("fill", this.textColor())
|
|
9559
9537
|
.attr("x", 0)
|
|
9560
9538
|
.attr("y", 0)
|
|
9561
|
-
.attr("transform", "translate("
|
|
9539
|
+
.attr("transform", "translate(".concat(q4x + lineWidth, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9562
9540
|
.attr("font-size", labelFontSize)
|
|
9563
9541
|
.attr("text-anchor", labelAnchor)
|
|
9564
9542
|
.attr("alignment-baseline", "baseline")
|
|
@@ -9570,7 +9548,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9570
9548
|
.attr("fill", this.textColor())
|
|
9571
9549
|
.attr("x", 0)
|
|
9572
9550
|
.attr("y", 0)
|
|
9573
|
-
.attr("transform", "translate("
|
|
9551
|
+
.attr("transform", "translate(".concat(q0x, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9574
9552
|
.attr("font-size", valueFontSize)
|
|
9575
9553
|
.attr("text-anchor", valueAnchor)
|
|
9576
9554
|
.attr("alignment-baseline", "hanging")
|
|
@@ -9582,7 +9560,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9582
9560
|
.attr("fill", this.textColor())
|
|
9583
9561
|
.attr("x", 0)
|
|
9584
9562
|
.attr("y", 0)
|
|
9585
|
-
.attr("transform", "translate("
|
|
9563
|
+
.attr("transform", "translate(".concat(q1x, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9586
9564
|
.attr("font-size", valueFontSize)
|
|
9587
9565
|
.attr("text-anchor", valueAnchor)
|
|
9588
9566
|
.attr("alignment-baseline", "middle")
|
|
@@ -9594,7 +9572,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9594
9572
|
.attr("fill", this.textColor())
|
|
9595
9573
|
.attr("x", 0)
|
|
9596
9574
|
.attr("y", 0)
|
|
9597
|
-
.attr("transform", "translate("
|
|
9575
|
+
.attr("transform", "translate(".concat(q2x, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9598
9576
|
.attr("font-size", valueFontSize)
|
|
9599
9577
|
.attr("text-anchor", valueAnchor)
|
|
9600
9578
|
.attr("alignment-baseline", "middle")
|
|
@@ -9606,7 +9584,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9606
9584
|
.attr("fill", this.textColor())
|
|
9607
9585
|
.attr("x", 0)
|
|
9608
9586
|
.attr("y", 0)
|
|
9609
|
-
.attr("transform", "translate("
|
|
9587
|
+
.attr("transform", "translate(".concat(q3x, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9610
9588
|
.attr("font-size", valueFontSize)
|
|
9611
9589
|
.attr("text-anchor", valueAnchor)
|
|
9612
9590
|
.attr("alignment-baseline", "middle")
|
|
@@ -9618,7 +9596,7 @@ var QuartileCandlestick = /** @class */ (function (_super) {
|
|
|
9618
9596
|
.attr("fill", this.textColor())
|
|
9619
9597
|
.attr("x", 0)
|
|
9620
9598
|
.attr("y", 0)
|
|
9621
|
-
.attr("transform", "translate("
|
|
9599
|
+
.attr("transform", "translate(".concat(q4x + lineWidth, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9622
9600
|
.attr("font-size", valueFontSize)
|
|
9623
9601
|
.attr("text-anchor", valueAnchor)
|
|
9624
9602
|
.attr("alignment-baseline", "baseline")
|
|
@@ -9643,8 +9621,8 @@ QuartileCandlestick.prototype.publish("innerRectColor", "white", "html-color", "
|
|
|
9643
9621
|
QuartileCandlestick.prototype.publish("upperTextRotation", -60, "number", "Rotation of label text (degrees)");
|
|
9644
9622
|
QuartileCandlestick.prototype.publish("lowerTextRotation", -60, "number", "Rotation of value text (degrees)");
|
|
9645
9623
|
|
|
9646
|
-
var css_248z$
|
|
9647
|
-
styleInject(css_248z$
|
|
9624
|
+
var css_248z$3 = ".chart_Radar .area,.chart_Radar .pointShape{pointer-events:none}.chart_Radar .point .pointSelection{fill:none;stroke:none;pointer-events:all}.chart_Radar .point .pointSelection.selected{fill:none;stroke:red}";
|
|
9625
|
+
styleInject(css_248z$3);
|
|
9648
9626
|
|
|
9649
9627
|
var Radar = /** @class */ (function (_super) {
|
|
9650
9628
|
__extends(Radar, _super);
|
|
@@ -9727,7 +9705,7 @@ var Radar = /** @class */ (function (_super) {
|
|
|
9727
9705
|
var max_label_h = this.fontSize();
|
|
9728
9706
|
var max_label_w = 0;
|
|
9729
9707
|
flatData.filter(function (n) { return n.colIdx === 1; }).forEach(function (n) {
|
|
9730
|
-
var isize = _super.prototype.textSize.call(_this, n.label, ""
|
|
9708
|
+
var isize = _super.prototype.textSize.call(_this, n.label, "".concat(_this.fontFamily()), _this.fontSize());
|
|
9731
9709
|
if (max_label_w < isize.width)
|
|
9732
9710
|
max_label_w = isize.width;
|
|
9733
9711
|
});
|
|
@@ -9919,8 +9897,8 @@ Radar.prototype.publish("fontFamily", "", "string", "fontFamily");
|
|
|
9919
9897
|
Radar.prototype.publish("fontSize", 16, "number", "fontSize");
|
|
9920
9898
|
Radar.prototype.publish("labelPaddingRatio", 0.9, "number", "labelPaddingRatio");
|
|
9921
9899
|
|
|
9922
|
-
var css_248z$
|
|
9923
|
-
styleInject(css_248z$
|
|
9900
|
+
var css_248z$2 = ".chart_RadialBar path.arc{opacity:.9;transition:opacity .5s}.chart_RadialBar path.arc.selected{stroke:red}.chart_RadialBar path.arc:hover{opacity:.7}.chart_RadialBar .axis circle,.chart_RadialBar .axis line{stroke:#ccc;stroke-width:1px}.chart_RadialBar .axis circle{fill:none}.chart_RadialBar .r.axis text{text-anchor:end}";
|
|
9901
|
+
styleInject(css_248z$2);
|
|
9924
9902
|
|
|
9925
9903
|
var RadialBar = /** @class */ (function (_super) {
|
|
9926
9904
|
__extends(RadialBar, _super);
|
|
@@ -9954,7 +9932,7 @@ var RadialBar = /** @class */ (function (_super) {
|
|
|
9954
9932
|
var _this = this;
|
|
9955
9933
|
_super.prototype.update.call(this, domNode, element);
|
|
9956
9934
|
var context = this;
|
|
9957
|
-
var maxValue = Math.max.apply(Math, __spreadArray([this.valueDomainHigh_exists() ? this.valueDomainHigh() : 0], this.data().map(function (d) { return d[1]; })));
|
|
9935
|
+
var maxValue = Math.max.apply(Math, __spreadArray([this.valueDomainHigh_exists() ? this.valueDomainHigh() : 0], this.data().map(function (d) { return d[1]; }), false));
|
|
9958
9936
|
this._valueScale
|
|
9959
9937
|
.domain([0, maxValue])
|
|
9960
9938
|
.range([0, this.radians(this.valueMaxAngle())]);
|
|
@@ -10268,7 +10246,7 @@ StatChart.prototype.publish("tickFormat", ".2e", "string", "X-Axis Tick Format")
|
|
|
10268
10246
|
StatChart.prototype.publish("candleHeight", 20, "number", "Height of candle widget (pixels)");
|
|
10269
10247
|
StatChart.prototype.publish("domainPadding", 10, "number", "Domain value padding");
|
|
10270
10248
|
|
|
10271
|
-
var Step
|
|
10249
|
+
var Step = /** @class */ (function (_super) {
|
|
10272
10250
|
__extends(Step, _super);
|
|
10273
10251
|
function Step() {
|
|
10274
10252
|
var _this = _super.call(this) || this;
|
|
@@ -10278,10 +10256,10 @@ var Step$1 = /** @class */ (function (_super) {
|
|
|
10278
10256
|
}
|
|
10279
10257
|
return Step;
|
|
10280
10258
|
}(Scatter));
|
|
10281
|
-
Step
|
|
10259
|
+
Step.prototype._class += " chart_Step";
|
|
10282
10260
|
|
|
10283
|
-
var css_248z$
|
|
10284
|
-
styleInject(css_248z$
|
|
10261
|
+
var css_248z$1 = ".chart_Summary{font-size:14px;height:150px;width:225px}.chart_Summary .content h2{font-size:3em;font-weight:700;margin-bottom:10px;margin-left:10px;margin-top:10px}.chart_Summary .bgIcon:before{font-family:FontAwesome;font-size:5.5em;opacity:.4;position:absolute;right:15px;top:.5em}.chart_Summary .bgIcon{position:relative}.chart_Summary .content{background-color:#efd752;float:left;height:100%;width:100%}.chart_Summary .content div{font-size:1.1em;margin-top:-1.1em;opacity:.8}.chart_Summary .content .text{padding-left:10px}.chart_Summary .content .more{bottom:0;height:3em;line-height:3em;position:absolute;width:100%}.chart_Summary .content .more i{padding-left:10px;padding-right:.5em}";
|
|
10262
|
+
styleInject(css_248z$1);
|
|
10285
10263
|
|
|
10286
10264
|
var TEXT = "text";
|
|
10287
10265
|
var HTML = "html";
|
|
@@ -10459,9 +10437,9 @@ Summary.prototype.publish("fixedSize", true, "boolean", "Fix Size to Min Width/H
|
|
|
10459
10437
|
Summary.prototype.publish("minWidth", 225, "number", "Minimum Width");
|
|
10460
10438
|
Summary.prototype.publish("minHeight", 150, "number", "Minimum Height");
|
|
10461
10439
|
Summary.prototype.publish("playInterval", null, "number", "Play Interval", null, { optional: true });
|
|
10462
|
-
var playInterval = Summary.prototype.playInterval;
|
|
10440
|
+
var playInterval$1 = Summary.prototype.playInterval;
|
|
10463
10441
|
Summary.prototype.playInterval = function (_) {
|
|
10464
|
-
var retVal = playInterval.apply(this, arguments);
|
|
10442
|
+
var retVal = playInterval$1.apply(this, arguments);
|
|
10465
10443
|
if (arguments.length) {
|
|
10466
10444
|
if (this._playIntervalHandle) {
|
|
10467
10445
|
clearInterval(this._playIntervalHandle);
|
|
@@ -10533,13 +10511,13 @@ var SummaryC = /** @class */ (function (_super) {
|
|
|
10533
10511
|
drawText(label, mainFontSize + p, subFontSize, context.labelAnchor());
|
|
10534
10512
|
function drawText(text, y, fontSize, anchorMode) {
|
|
10535
10513
|
ctx.textBaseline = "top";
|
|
10536
|
-
ctx.font = fontSize
|
|
10514
|
+
ctx.font = "".concat(fontSize, "px ").concat(fontFamily);
|
|
10537
10515
|
ctx.fillStyle = fontColor;
|
|
10538
10516
|
var measurement = ctx.measureText(text);
|
|
10539
10517
|
if (measurement.width > (size.width - (p * 2))) {
|
|
10540
10518
|
var fontSizeMult = (size.width - (p * 2)) / measurement.width;
|
|
10541
10519
|
fontSize = fontSize * fontSizeMult;
|
|
10542
|
-
ctx.font = fontSize
|
|
10520
|
+
ctx.font = "".concat(fontSize, "px ").concat(fontFamily);
|
|
10543
10521
|
measurement = ctx.measureText(text);
|
|
10544
10522
|
}
|
|
10545
10523
|
var x = getTextOffsetX(measurement.width, anchorMode);
|
|
@@ -10550,12 +10528,12 @@ var SummaryC = /** @class */ (function (_super) {
|
|
|
10550
10528
|
if (typeof text === "undefined")
|
|
10551
10529
|
return;
|
|
10552
10530
|
ctx.textBaseline = context.iconBaseline();
|
|
10553
|
-
ctx.font = fontSize
|
|
10531
|
+
ctx.font = "".concat(fontSize, "px FontAwesome");
|
|
10554
10532
|
ctx.fillStyle = fontColor;
|
|
10555
10533
|
var measurement = ctx.measureText(text);
|
|
10556
10534
|
if (measurement.width > (size.width - (p * 2))) {
|
|
10557
10535
|
var fontSizeMult = (size.width - (p * 2)) / measurement.width;
|
|
10558
|
-
ctx.font = fontSize * fontSizeMult
|
|
10536
|
+
ctx.font = "".concat(fontSize * fontSizeMult, "px FontAwesome");
|
|
10559
10537
|
measurement = ctx.measureText(text);
|
|
10560
10538
|
}
|
|
10561
10539
|
var x = getTextOffsetX(measurement.width, anchorMode);
|
|
@@ -10610,9 +10588,9 @@ SummaryC.prototype.publish("labelOpacity", 0.9, "number", "Opacity of label text
|
|
|
10610
10588
|
SummaryC.prototype.publish("iconOpacity", 0.3, "number", "Opacity of icon text (0..1)");
|
|
10611
10589
|
SummaryC.prototype.publish("paddingSizeRatio", 0.1, "number", "Ratio of the smallest dimension for edge padding (0..1)");
|
|
10612
10590
|
SummaryC.prototype.publish("iconSizeRatio", 0.9, "number", "Ratio of the height for icon size (0..1)");
|
|
10613
|
-
var playInterval
|
|
10591
|
+
var playInterval = SummaryC.prototype.playInterval;
|
|
10614
10592
|
SummaryC.prototype.playInterval = function (_) {
|
|
10615
|
-
var retVal = playInterval
|
|
10593
|
+
var retVal = playInterval.apply(this, arguments);
|
|
10616
10594
|
if (arguments.length) {
|
|
10617
10595
|
if (this._playIntervalHandle) {
|
|
10618
10596
|
clearInterval(this._playIntervalHandle);
|
|
@@ -11009,8 +10987,8 @@ var spirals = {
|
|
|
11009
10987
|
rectangular: rectangularSpiral
|
|
11010
10988
|
};
|
|
11011
10989
|
|
|
11012
|
-
var css_248z
|
|
11013
|
-
styleInject(css_248z
|
|
10990
|
+
var css_248z = ".other_Wordcloud text{cursor:pointer}";
|
|
10991
|
+
styleInject(css_248z);
|
|
11014
10992
|
|
|
11015
10993
|
var WordCloud = /** @class */ (function (_super) {
|
|
11016
10994
|
__extends(WordCloud, _super);
|
|
@@ -11183,5 +11161,5 @@ WordCloud.prototype.publish("offsetX", 0, "number", "X offset", null, { tags: ["
|
|
|
11183
11161
|
WordCloud.prototype.publish("offsetY", 0, "number", "Y offset", null, { tags: ["Advanced"] });
|
|
11184
11162
|
WordCloud.prototype.publish("zoom", 1, "number", "Zoom", null, { tags: ["Advanced"] });
|
|
11185
11163
|
|
|
11186
|
-
export { Area, Axis, BUILD_VERSION, Bar, Bubble, BubbleXY, Bullet, Column, Contour, Gantt, Gauge, HalfPie, Heat, HexBin, Line, PKG_NAME, PKG_VERSION, Pie, QuarterPie, QuartileCandlestick, Radar, RadialBar, Scatter, StatChart, Step
|
|
11164
|
+
export { Area, Axis, BUILD_VERSION, Bar, Bubble, BubbleXY, Bullet, Column, Contour, Gantt, Gauge, HalfPie, Heat, HexBin, Line, PKG_NAME, PKG_VERSION, Pie, QuarterPie, QuartileCandlestick, Radar, RadialBar, Scatter, StatChart, Step, Summary, SummaryC, WordCloud, XYAxis };
|
|
11187
11165
|
//# sourceMappingURL=index.es6.js.map
|