@hpcc-js/chart 2.71.0 → 2.72.0
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 +401 -423
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +404 -426
- 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 +20 -20
- 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.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@hpcc-js/api'), require('@hpcc-js/common'), require('@hpcc-js/util')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', '@hpcc-js/api', '@hpcc-js/common', '@hpcc-js/util'], factory) :
|
|
4
|
-
(global = global || self, factory(global[
|
|
5
|
-
}(this, (function (exports, api, common, util) { 'use strict';
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/chart"] = {}, global["@hpcc-js/api"], global["@hpcc-js/common"], global["@hpcc-js/util"]));
|
|
5
|
+
})(this, (function (exports, api, common, util) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/chart";
|
|
8
|
-
var PKG_VERSION = "2.
|
|
9
|
-
var BUILD_VERSION = "2.
|
|
8
|
+
var PKG_VERSION = "2.72.0";
|
|
9
|
+
var BUILD_VERSION = "2.97.0";
|
|
10
10
|
|
|
11
11
|
/*! *****************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
ar[i] = from[i];
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
return to.concat(ar || from);
|
|
60
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
var pi = Math.PI,
|
|
64
|
-
tau = 2 * pi,
|
|
65
|
-
epsilon = 1e-6,
|
|
66
|
-
tauEpsilon = tau - epsilon;
|
|
63
|
+
var pi$3 = Math.PI,
|
|
64
|
+
tau$3 = 2 * pi$3,
|
|
65
|
+
epsilon$3 = 1e-6,
|
|
66
|
+
tauEpsilon = tau$3 - epsilon$3;
|
|
67
67
|
|
|
68
68
|
function Path() {
|
|
69
69
|
this._x0 = this._y0 = // start of current subpath
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
// Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
|
|
117
|
-
else if (!(l01_2 > epsilon));
|
|
117
|
+
else if (!(l01_2 > epsilon$3));
|
|
118
118
|
|
|
119
119
|
// Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
|
|
120
120
|
// Equivalently, is (x1,y1) coincident with (x2,y2)?
|
|
121
121
|
// Or, is the radius zero? Line to (x1,y1).
|
|
122
|
-
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
|
|
122
|
+
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon$3) || !r) {
|
|
123
123
|
this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -131,12 +131,12 @@
|
|
|
131
131
|
l20_2 = x20 * x20 + y20 * y20,
|
|
132
132
|
l21 = Math.sqrt(l21_2),
|
|
133
133
|
l01 = Math.sqrt(l01_2),
|
|
134
|
-
l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
|
|
134
|
+
l = r * Math.tan((pi$3 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
|
|
135
135
|
t01 = l / l01,
|
|
136
136
|
t21 = l / l21;
|
|
137
137
|
|
|
138
138
|
// If the start tangent is not coincident with (x0,y0), line to.
|
|
139
|
-
if (Math.abs(t01 - 1) > epsilon) {
|
|
139
|
+
if (Math.abs(t01 - 1) > epsilon$3) {
|
|
140
140
|
this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
|
|
141
141
|
}
|
|
142
142
|
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
// Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
|
|
164
|
-
else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
|
|
164
|
+
else if (Math.abs(this._x1 - x0) > epsilon$3 || Math.abs(this._y1 - y0) > epsilon$3) {
|
|
165
165
|
this._ += "L" + x0 + "," + y0;
|
|
166
166
|
}
|
|
167
167
|
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
if (!r) return;
|
|
170
170
|
|
|
171
171
|
// Does the angle go the wrong way? Flip the direction.
|
|
172
|
-
if (da < 0) da = da % tau + tau;
|
|
172
|
+
if (da < 0) da = da % tau$3 + tau$3;
|
|
173
173
|
|
|
174
174
|
// Is this a complete circle? Draw two arcs to complete the circle.
|
|
175
175
|
if (da > tauEpsilon) {
|
|
@@ -177,8 +177,8 @@
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
// Is this arc non-empty? Draw an arc!
|
|
180
|
-
else if (da > epsilon) {
|
|
181
|
-
this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
|
|
180
|
+
else if (da > epsilon$3) {
|
|
181
|
+
this._ += "A" + r + "," + r + ",0," + (+(da >= pi$3)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
184
|
rect: function(x, y, w, h) {
|
|
@@ -189,68 +189,68 @@
|
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
|
|
192
|
-
function constant(x) {
|
|
192
|
+
function constant$3(x) {
|
|
193
193
|
return function constant() {
|
|
194
194
|
return x;
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
var abs = Math.abs;
|
|
198
|
+
var abs$1 = Math.abs;
|
|
199
199
|
var atan2 = Math.atan2;
|
|
200
200
|
var cos = Math.cos;
|
|
201
201
|
var max = Math.max;
|
|
202
202
|
var min = Math.min;
|
|
203
203
|
var sin = Math.sin;
|
|
204
|
-
var sqrt = Math.sqrt;
|
|
204
|
+
var sqrt$1 = Math.sqrt;
|
|
205
205
|
|
|
206
|
-
var epsilon$
|
|
207
|
-
var pi$
|
|
208
|
-
var halfPi = pi$
|
|
209
|
-
var tau$
|
|
206
|
+
var epsilon$2 = 1e-12;
|
|
207
|
+
var pi$2 = Math.PI;
|
|
208
|
+
var halfPi$1 = pi$2 / 2;
|
|
209
|
+
var tau$2 = 2 * pi$2;
|
|
210
210
|
|
|
211
211
|
function acos(x) {
|
|
212
|
-
return x > 1 ? 0 : x < -1 ? pi$
|
|
212
|
+
return x > 1 ? 0 : x < -1 ? pi$2 : Math.acos(x);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
function asin(x) {
|
|
216
|
-
return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
|
|
215
|
+
function asin$1(x) {
|
|
216
|
+
return x >= 1 ? halfPi$1 : x <= -1 ? -halfPi$1 : Math.asin(x);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
function arcInnerRadius(d) {
|
|
219
|
+
function arcInnerRadius$1(d) {
|
|
220
220
|
return d.innerRadius;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
function arcOuterRadius(d) {
|
|
223
|
+
function arcOuterRadius$1(d) {
|
|
224
224
|
return d.outerRadius;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
function arcStartAngle(d) {
|
|
227
|
+
function arcStartAngle$1(d) {
|
|
228
228
|
return d.startAngle;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
function arcEndAngle(d) {
|
|
231
|
+
function arcEndAngle$1(d) {
|
|
232
232
|
return d.endAngle;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
function arcPadAngle(d) {
|
|
235
|
+
function arcPadAngle$1(d) {
|
|
236
236
|
return d && d.padAngle; // Note: optional!
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
239
|
+
function intersect$1(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
240
240
|
var x10 = x1 - x0, y10 = y1 - y0,
|
|
241
241
|
x32 = x3 - x2, y32 = y3 - y2,
|
|
242
242
|
t = y32 * x10 - x32 * y10;
|
|
243
|
-
if (t * t < epsilon$
|
|
243
|
+
if (t * t < epsilon$2) return;
|
|
244
244
|
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
|
|
245
245
|
return [x0 + t * x10, y0 + t * y10];
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
// Compute perpendicular offset line of length rc.
|
|
249
249
|
// http://mathworld.wolfram.com/Circle-LineIntersection.html
|
|
250
|
-
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
|
250
|
+
function cornerTangents$1(x0, y0, x1, y1, r1, rc, cw) {
|
|
251
251
|
var x01 = x0 - x1,
|
|
252
252
|
y01 = y0 - y1,
|
|
253
|
-
lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),
|
|
253
|
+
lo = (cw ? rc : -rc) / sqrt$1(x01 * x01 + y01 * y01),
|
|
254
254
|
ox = lo * y01,
|
|
255
255
|
oy = -lo * x01,
|
|
256
256
|
x11 = x0 + ox,
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
d2 = dx * dx + dy * dy,
|
|
265
265
|
r = r1 - rc,
|
|
266
266
|
D = x11 * y10 - x10 * y11,
|
|
267
|
-
d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),
|
|
267
|
+
d = (dy < 0 ? -1 : 1) * sqrt$1(max(0, r * r * d2 - D * D)),
|
|
268
268
|
cx0 = (D * dy - dx * d) / d2,
|
|
269
269
|
cy0 = (-D * dx - dy * d) / d2,
|
|
270
270
|
cx1 = (D * dy + dx * d) / d2,
|
|
@@ -289,13 +289,13 @@
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
function d3Arc() {
|
|
292
|
-
var innerRadius = arcInnerRadius,
|
|
293
|
-
outerRadius = arcOuterRadius,
|
|
294
|
-
cornerRadius = constant(0),
|
|
292
|
+
var innerRadius = arcInnerRadius$1,
|
|
293
|
+
outerRadius = arcOuterRadius$1,
|
|
294
|
+
cornerRadius = constant$3(0),
|
|
295
295
|
padRadius = null,
|
|
296
|
-
startAngle = arcStartAngle,
|
|
297
|
-
endAngle = arcEndAngle,
|
|
298
|
-
padAngle = arcPadAngle,
|
|
296
|
+
startAngle = arcStartAngle$1,
|
|
297
|
+
endAngle = arcEndAngle$1,
|
|
298
|
+
padAngle = arcPadAngle$1,
|
|
299
299
|
context = null;
|
|
300
300
|
|
|
301
301
|
function arc() {
|
|
@@ -303,9 +303,9 @@
|
|
|
303
303
|
r,
|
|
304
304
|
r0 = +innerRadius.apply(this, arguments),
|
|
305
305
|
r1 = +outerRadius.apply(this, arguments),
|
|
306
|
-
a0 = startAngle.apply(this, arguments) - halfPi,
|
|
307
|
-
a1 = endAngle.apply(this, arguments) - halfPi,
|
|
308
|
-
da = abs(a1 - a0),
|
|
306
|
+
a0 = startAngle.apply(this, arguments) - halfPi$1,
|
|
307
|
+
a1 = endAngle.apply(this, arguments) - halfPi$1,
|
|
308
|
+
da = abs$1(a1 - a0),
|
|
309
309
|
cw = a1 > a0;
|
|
310
310
|
|
|
311
311
|
if (!context) context = buffer = path();
|
|
@@ -314,13 +314,13 @@
|
|
|
314
314
|
if (r1 < r0) r = r1, r1 = r0, r0 = r;
|
|
315
315
|
|
|
316
316
|
// Is it a point?
|
|
317
|
-
if (!(r1 > epsilon$
|
|
317
|
+
if (!(r1 > epsilon$2)) context.moveTo(0, 0);
|
|
318
318
|
|
|
319
319
|
// Or is it a circle or annulus?
|
|
320
|
-
else if (da > tau$
|
|
320
|
+
else if (da > tau$2 - epsilon$2) {
|
|
321
321
|
context.moveTo(r1 * cos(a0), r1 * sin(a0));
|
|
322
322
|
context.arc(0, 0, r1, a0, a1, !cw);
|
|
323
|
-
if (r0 > epsilon$
|
|
323
|
+
if (r0 > epsilon$2) {
|
|
324
324
|
context.moveTo(r0 * cos(a1), r0 * sin(a1));
|
|
325
325
|
context.arc(0, 0, r0, a1, a0, cw);
|
|
326
326
|
}
|
|
@@ -335,20 +335,20 @@
|
|
|
335
335
|
da0 = da,
|
|
336
336
|
da1 = da,
|
|
337
337
|
ap = padAngle.apply(this, arguments) / 2,
|
|
338
|
-
rp = (ap > epsilon$
|
|
339
|
-
rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
|
|
338
|
+
rp = (ap > epsilon$2) && (padRadius ? +padRadius.apply(this, arguments) : sqrt$1(r0 * r0 + r1 * r1)),
|
|
339
|
+
rc = min(abs$1(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
|
|
340
340
|
rc0 = rc,
|
|
341
341
|
rc1 = rc,
|
|
342
342
|
t0,
|
|
343
343
|
t1;
|
|
344
344
|
|
|
345
345
|
// Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
|
|
346
|
-
if (rp > epsilon$
|
|
347
|
-
var p0 = asin(rp / r0 * sin(ap)),
|
|
348
|
-
p1 = asin(rp / r1 * sin(ap));
|
|
349
|
-
if ((da0 -= p0 * 2) > epsilon$
|
|
346
|
+
if (rp > epsilon$2) {
|
|
347
|
+
var p0 = asin$1(rp / r0 * sin(ap)),
|
|
348
|
+
p1 = asin$1(rp / r1 * sin(ap));
|
|
349
|
+
if ((da0 -= p0 * 2) > epsilon$2) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
|
|
350
350
|
else da0 = 0, a00 = a10 = (a0 + a1) / 2;
|
|
351
|
-
if ((da1 -= p1 * 2) > epsilon$
|
|
351
|
+
if ((da1 -= p1 * 2) > epsilon$2) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
|
|
352
352
|
else da1 = 0, a01 = a11 = (a0 + a1) / 2;
|
|
353
353
|
}
|
|
354
354
|
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
y10 = r0 * sin(a10);
|
|
359
359
|
|
|
360
360
|
// Apply rounded corners?
|
|
361
|
-
if (rc > epsilon$
|
|
361
|
+
if (rc > epsilon$2) {
|
|
362
362
|
var x11 = r1 * cos(a11),
|
|
363
363
|
y11 = r1 * sin(a11),
|
|
364
364
|
x00 = r0 * cos(a00),
|
|
@@ -366,25 +366,25 @@
|
|
|
366
366
|
oc;
|
|
367
367
|
|
|
368
368
|
// Restrict the corner radius according to the sector angle.
|
|
369
|
-
if (da < pi$
|
|
369
|
+
if (da < pi$2 && (oc = intersect$1(x01, y01, x00, y00, x11, y11, x10, y10))) {
|
|
370
370
|
var ax = x01 - oc[0],
|
|
371
371
|
ay = y01 - oc[1],
|
|
372
372
|
bx = x11 - oc[0],
|
|
373
373
|
by = y11 - oc[1],
|
|
374
|
-
kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),
|
|
375
|
-
lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
|
|
374
|
+
kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt$1(ax * ax + ay * ay) * sqrt$1(bx * bx + by * by))) / 2),
|
|
375
|
+
lc = sqrt$1(oc[0] * oc[0] + oc[1] * oc[1]);
|
|
376
376
|
rc0 = min(rc, (r0 - lc) / (kc - 1));
|
|
377
377
|
rc1 = min(rc, (r1 - lc) / (kc + 1));
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
// Is the sector collapsed to a line?
|
|
382
|
-
if (!(da1 > epsilon$
|
|
382
|
+
if (!(da1 > epsilon$2)) context.moveTo(x01, y01);
|
|
383
383
|
|
|
384
384
|
// Does the sector’s outer ring have rounded corners?
|
|
385
|
-
else if (rc1 > epsilon$
|
|
386
|
-
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
|
|
387
|
-
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
|
|
385
|
+
else if (rc1 > epsilon$2) {
|
|
386
|
+
t0 = cornerTangents$1(x00, y00, x01, y01, r1, rc1, cw);
|
|
387
|
+
t1 = cornerTangents$1(x11, y11, x10, y10, r1, rc1, cw);
|
|
388
388
|
|
|
389
389
|
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
390
390
|
|
|
@@ -404,12 +404,12 @@
|
|
|
404
404
|
|
|
405
405
|
// Is there no inner ring, and it’s a circular sector?
|
|
406
406
|
// Or perhaps it’s an annular sector collapsed due to padding?
|
|
407
|
-
if (!(r0 > epsilon$
|
|
407
|
+
if (!(r0 > epsilon$2) || !(da0 > epsilon$2)) context.lineTo(x10, y10);
|
|
408
408
|
|
|
409
409
|
// Does the sector’s inner ring (or point) have rounded corners?
|
|
410
|
-
else if (rc0 > epsilon$
|
|
411
|
-
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
|
|
412
|
-
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
|
|
410
|
+
else if (rc0 > epsilon$2) {
|
|
411
|
+
t0 = cornerTangents$1(x10, y10, x11, y11, r0, -rc0, cw);
|
|
412
|
+
t1 = cornerTangents$1(x01, y01, x00, y00, r0, -rc0, cw);
|
|
413
413
|
|
|
414
414
|
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
415
415
|
|
|
@@ -435,36 +435,36 @@
|
|
|
435
435
|
|
|
436
436
|
arc.centroid = function() {
|
|
437
437
|
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
|
|
438
|
-
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi$
|
|
438
|
+
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi$2 / 2;
|
|
439
439
|
return [cos(a) * r, sin(a) * r];
|
|
440
440
|
};
|
|
441
441
|
|
|
442
442
|
arc.innerRadius = function(_) {
|
|
443
|
-
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
|
|
443
|
+
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant$3(+_), arc) : innerRadius;
|
|
444
444
|
};
|
|
445
445
|
|
|
446
446
|
arc.outerRadius = function(_) {
|
|
447
|
-
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
|
|
447
|
+
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant$3(+_), arc) : outerRadius;
|
|
448
448
|
};
|
|
449
449
|
|
|
450
450
|
arc.cornerRadius = function(_) {
|
|
451
|
-
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
|
|
451
|
+
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant$3(+_), arc) : cornerRadius;
|
|
452
452
|
};
|
|
453
453
|
|
|
454
454
|
arc.padRadius = function(_) {
|
|
455
|
-
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
|
|
455
|
+
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant$3(+_), arc) : padRadius;
|
|
456
456
|
};
|
|
457
457
|
|
|
458
458
|
arc.startAngle = function(_) {
|
|
459
|
-
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
|
|
459
|
+
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$3(+_), arc) : startAngle;
|
|
460
460
|
};
|
|
461
461
|
|
|
462
462
|
arc.endAngle = function(_) {
|
|
463
|
-
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
|
|
463
|
+
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$3(+_), arc) : endAngle;
|
|
464
464
|
};
|
|
465
465
|
|
|
466
466
|
arc.padAngle = function(_) {
|
|
467
|
-
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
|
|
467
|
+
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$3(+_), arc) : padAngle;
|
|
468
468
|
};
|
|
469
469
|
|
|
470
470
|
arc.context = function(_) {
|
|
@@ -474,11 +474,11 @@
|
|
|
474
474
|
return arc;
|
|
475
475
|
}
|
|
476
476
|
|
|
477
|
-
function Linear(context) {
|
|
477
|
+
function Linear$1(context) {
|
|
478
478
|
this._context = context;
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
-
Linear.prototype = {
|
|
481
|
+
Linear$1.prototype = {
|
|
482
482
|
areaStart: function() {
|
|
483
483
|
this._line = 0;
|
|
484
484
|
},
|
|
@@ -503,21 +503,21 @@
|
|
|
503
503
|
};
|
|
504
504
|
|
|
505
505
|
function d3CurveLinear(context) {
|
|
506
|
-
return new Linear(context);
|
|
506
|
+
return new Linear$1(context);
|
|
507
507
|
}
|
|
508
508
|
|
|
509
|
-
function x(p) {
|
|
509
|
+
function x$1(p) {
|
|
510
510
|
return p[0];
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
function y(p) {
|
|
513
|
+
function y$1(p) {
|
|
514
514
|
return p[1];
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
function d3Line() {
|
|
518
|
-
var x
|
|
519
|
-
y
|
|
520
|
-
defined = constant(true),
|
|
518
|
+
var x = x$1,
|
|
519
|
+
y = y$1,
|
|
520
|
+
defined = constant$3(true),
|
|
521
521
|
context = null,
|
|
522
522
|
curve = d3CurveLinear,
|
|
523
523
|
output = null;
|
|
@@ -536,22 +536,22 @@
|
|
|
536
536
|
if (defined0 = !defined0) output.lineStart();
|
|
537
537
|
else output.lineEnd();
|
|
538
538
|
}
|
|
539
|
-
if (defined0) output.point(+x
|
|
539
|
+
if (defined0) output.point(+x(d, i, data), +y(d, i, data));
|
|
540
540
|
}
|
|
541
541
|
|
|
542
542
|
if (buffer) return output = null, buffer + "" || null;
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
line.x = function(_) {
|
|
546
|
-
return arguments.length ? (x
|
|
546
|
+
return arguments.length ? (x = typeof _ === "function" ? _ : constant$3(+_), line) : x;
|
|
547
547
|
};
|
|
548
548
|
|
|
549
549
|
line.y = function(_) {
|
|
550
|
-
return arguments.length ? (y
|
|
550
|
+
return arguments.length ? (y = typeof _ === "function" ? _ : constant$3(+_), line) : y;
|
|
551
551
|
};
|
|
552
552
|
|
|
553
553
|
line.defined = function(_) {
|
|
554
|
-
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined;
|
|
554
|
+
return arguments.length ? (defined = typeof _ === "function" ? _ : constant$3(!!_), line) : defined;
|
|
555
555
|
};
|
|
556
556
|
|
|
557
557
|
line.curve = function(_) {
|
|
@@ -566,11 +566,11 @@
|
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
function d3Area() {
|
|
569
|
-
var x0 = x,
|
|
569
|
+
var x0 = x$1,
|
|
570
570
|
x1 = null,
|
|
571
|
-
y0 = constant(0),
|
|
572
|
-
y1 = y,
|
|
573
|
-
defined = constant(true),
|
|
571
|
+
y0 = constant$3(0),
|
|
572
|
+
y1 = y$1,
|
|
573
|
+
defined = constant$3(true),
|
|
574
574
|
context = null,
|
|
575
575
|
curve = d3CurveLinear,
|
|
576
576
|
output = null;
|
|
@@ -618,27 +618,27 @@
|
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
area.x = function(_) {
|
|
621
|
-
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), x1 = null, area) : x0;
|
|
621
|
+
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$3(+_), x1 = null, area) : x0;
|
|
622
622
|
};
|
|
623
623
|
|
|
624
624
|
area.x0 = function(_) {
|
|
625
|
-
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), area) : x0;
|
|
625
|
+
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$3(+_), area) : x0;
|
|
626
626
|
};
|
|
627
627
|
|
|
628
628
|
area.x1 = function(_) {
|
|
629
|
-
return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : x1;
|
|
629
|
+
return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant$3(+_), area) : x1;
|
|
630
630
|
};
|
|
631
631
|
|
|
632
632
|
area.y = function(_) {
|
|
633
|
-
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), y1 = null, area) : y0;
|
|
633
|
+
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$3(+_), y1 = null, area) : y0;
|
|
634
634
|
};
|
|
635
635
|
|
|
636
636
|
area.y0 = function(_) {
|
|
637
|
-
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), area) : y0;
|
|
637
|
+
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$3(+_), area) : y0;
|
|
638
638
|
};
|
|
639
639
|
|
|
640
640
|
area.y1 = function(_) {
|
|
641
|
-
return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : y1;
|
|
641
|
+
return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant$3(+_), area) : y1;
|
|
642
642
|
};
|
|
643
643
|
|
|
644
644
|
area.lineX0 =
|
|
@@ -655,7 +655,7 @@
|
|
|
655
655
|
};
|
|
656
656
|
|
|
657
657
|
area.defined = function(_) {
|
|
658
|
-
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), area) : defined;
|
|
658
|
+
return arguments.length ? (defined = typeof _ === "function" ? _ : constant$3(!!_), area) : defined;
|
|
659
659
|
};
|
|
660
660
|
|
|
661
661
|
area.curve = function(_) {
|
|
@@ -673,17 +673,17 @@
|
|
|
673
673
|
return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
|
|
674
674
|
}
|
|
675
675
|
|
|
676
|
-
function identity(d) {
|
|
676
|
+
function identity$2(d) {
|
|
677
677
|
return d;
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
function d3Pie() {
|
|
681
|
-
var value = identity,
|
|
681
|
+
var value = identity$2,
|
|
682
682
|
sortValues = descending,
|
|
683
683
|
sort = null,
|
|
684
|
-
startAngle = constant(0),
|
|
685
|
-
endAngle = constant(tau$
|
|
686
|
-
padAngle = constant(0);
|
|
684
|
+
startAngle = constant$3(0),
|
|
685
|
+
endAngle = constant$3(tau$2),
|
|
686
|
+
padAngle = constant$3(0);
|
|
687
687
|
|
|
688
688
|
function pie(data) {
|
|
689
689
|
var i,
|
|
@@ -694,7 +694,7 @@
|
|
|
694
694
|
index = new Array(n),
|
|
695
695
|
arcs = new Array(n),
|
|
696
696
|
a0 = +startAngle.apply(this, arguments),
|
|
697
|
-
da = Math.min(tau$
|
|
697
|
+
da = Math.min(tau$2, Math.max(-tau$2, endAngle.apply(this, arguments) - a0)),
|
|
698
698
|
a1,
|
|
699
699
|
p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),
|
|
700
700
|
pa = p * (da < 0 ? -1 : 1),
|
|
@@ -726,7 +726,7 @@
|
|
|
726
726
|
}
|
|
727
727
|
|
|
728
728
|
pie.value = function(_) {
|
|
729
|
-
return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), pie) : value;
|
|
729
|
+
return arguments.length ? (value = typeof _ === "function" ? _ : constant$3(+_), pie) : value;
|
|
730
730
|
};
|
|
731
731
|
|
|
732
732
|
pie.sortValues = function(_) {
|
|
@@ -738,21 +738,21 @@
|
|
|
738
738
|
};
|
|
739
739
|
|
|
740
740
|
pie.startAngle = function(_) {
|
|
741
|
-
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), pie) : startAngle;
|
|
741
|
+
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$3(+_), pie) : startAngle;
|
|
742
742
|
};
|
|
743
743
|
|
|
744
744
|
pie.endAngle = function(_) {
|
|
745
|
-
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), pie) : endAngle;
|
|
745
|
+
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$3(+_), pie) : endAngle;
|
|
746
746
|
};
|
|
747
747
|
|
|
748
748
|
pie.padAngle = function(_) {
|
|
749
|
-
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), pie) : padAngle;
|
|
749
|
+
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$3(+_), pie) : padAngle;
|
|
750
750
|
};
|
|
751
751
|
|
|
752
752
|
return pie;
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
-
function point(that, x, y) {
|
|
755
|
+
function point$6(that, x, y) {
|
|
756
756
|
that._context.bezierCurveTo(
|
|
757
757
|
(2 * that._x0 + that._x1) / 3,
|
|
758
758
|
(2 * that._y0 + that._y1) / 3,
|
|
@@ -781,7 +781,7 @@
|
|
|
781
781
|
},
|
|
782
782
|
lineEnd: function() {
|
|
783
783
|
switch (this._point) {
|
|
784
|
-
case 3: point(this, this._x1, this._y1); // proceed
|
|
784
|
+
case 3: point$6(this, this._x1, this._y1); // proceed
|
|
785
785
|
case 2: this._context.lineTo(this._x1, this._y1); break;
|
|
786
786
|
}
|
|
787
787
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
@@ -793,7 +793,7 @@
|
|
|
793
793
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
794
794
|
case 1: this._point = 2; break;
|
|
795
795
|
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed
|
|
796
|
-
default: point(this, x, y); break;
|
|
796
|
+
default: point$6(this, x, y); break;
|
|
797
797
|
}
|
|
798
798
|
this._x0 = this._x1, this._x1 = x;
|
|
799
799
|
this._y0 = this._y1, this._y1 = y;
|
|
@@ -859,7 +859,7 @@
|
|
|
859
859
|
return bundle;
|
|
860
860
|
})(0.85);
|
|
861
861
|
|
|
862
|
-
function point$
|
|
862
|
+
function point$5(that, x, y) {
|
|
863
863
|
that._context.bezierCurveTo(
|
|
864
864
|
that._x1 + that._k * (that._x2 - that._x0),
|
|
865
865
|
that._y1 + that._k * (that._y2 - that._y0),
|
|
@@ -870,12 +870,12 @@
|
|
|
870
870
|
);
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
function Cardinal(context, tension) {
|
|
873
|
+
function Cardinal$1(context, tension) {
|
|
874
874
|
this._context = context;
|
|
875
875
|
this._k = (1 - tension) / 6;
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
-
Cardinal.prototype = {
|
|
878
|
+
Cardinal$1.prototype = {
|
|
879
879
|
areaStart: function() {
|
|
880
880
|
this._line = 0;
|
|
881
881
|
},
|
|
@@ -890,7 +890,7 @@
|
|
|
890
890
|
lineEnd: function() {
|
|
891
891
|
switch (this._point) {
|
|
892
892
|
case 2: this._context.lineTo(this._x2, this._y2); break;
|
|
893
|
-
case 3: point$
|
|
893
|
+
case 3: point$5(this, this._x1, this._y1); break;
|
|
894
894
|
}
|
|
895
895
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
896
896
|
this._line = 1 - this._line;
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
902
902
|
case 1: this._point = 2; this._x1 = x, this._y1 = y; break;
|
|
903
903
|
case 2: this._point = 3; // proceed
|
|
904
|
-
default: point$
|
|
904
|
+
default: point$5(this, x, y); break;
|
|
905
905
|
}
|
|
906
906
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
907
907
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
|
|
@@ -911,7 +911,7 @@
|
|
|
911
911
|
var d3CurveCardinal = (function custom(tension) {
|
|
912
912
|
|
|
913
913
|
function cardinal(context) {
|
|
914
|
-
return new Cardinal(context, tension);
|
|
914
|
+
return new Cardinal$1(context, tension);
|
|
915
915
|
}
|
|
916
916
|
|
|
917
917
|
cardinal.tension = function(tension) {
|
|
@@ -921,20 +921,20 @@
|
|
|
921
921
|
return cardinal;
|
|
922
922
|
})(0);
|
|
923
923
|
|
|
924
|
-
function point$
|
|
924
|
+
function point$4(that, x, y) {
|
|
925
925
|
var x1 = that._x1,
|
|
926
926
|
y1 = that._y1,
|
|
927
927
|
x2 = that._x2,
|
|
928
928
|
y2 = that._y2;
|
|
929
929
|
|
|
930
|
-
if (that._l01_a > epsilon$
|
|
930
|
+
if (that._l01_a > epsilon$2) {
|
|
931
931
|
var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,
|
|
932
932
|
n = 3 * that._l01_a * (that._l01_a + that._l12_a);
|
|
933
933
|
x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
|
|
934
934
|
y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
|
|
935
935
|
}
|
|
936
936
|
|
|
937
|
-
if (that._l23_a > epsilon$
|
|
937
|
+
if (that._l23_a > epsilon$2) {
|
|
938
938
|
var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,
|
|
939
939
|
m = 3 * that._l23_a * (that._l23_a + that._l12_a);
|
|
940
940
|
x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
|
|
@@ -944,12 +944,12 @@
|
|
|
944
944
|
that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
|
|
945
945
|
}
|
|
946
946
|
|
|
947
|
-
function CatmullRom(context, alpha) {
|
|
947
|
+
function CatmullRom$1(context, alpha) {
|
|
948
948
|
this._context = context;
|
|
949
949
|
this._alpha = alpha;
|
|
950
950
|
}
|
|
951
951
|
|
|
952
|
-
CatmullRom.prototype = {
|
|
952
|
+
CatmullRom$1.prototype = {
|
|
953
953
|
areaStart: function() {
|
|
954
954
|
this._line = 0;
|
|
955
955
|
},
|
|
@@ -984,7 +984,7 @@
|
|
|
984
984
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
985
985
|
case 1: this._point = 2; break;
|
|
986
986
|
case 2: this._point = 3; // proceed
|
|
987
|
-
default: point$
|
|
987
|
+
default: point$4(this, x, y); break;
|
|
988
988
|
}
|
|
989
989
|
|
|
990
990
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
@@ -997,7 +997,7 @@
|
|
|
997
997
|
var d3curveCatmullRom = (function custom(alpha) {
|
|
998
998
|
|
|
999
999
|
function catmullRom(context) {
|
|
1000
|
-
return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
|
|
1000
|
+
return alpha ? new CatmullRom$1(context, alpha) : new Cardinal$1(context, 0);
|
|
1001
1001
|
}
|
|
1002
1002
|
|
|
1003
1003
|
catmullRom.alpha = function(alpha) {
|
|
@@ -1007,7 +1007,7 @@
|
|
|
1007
1007
|
return catmullRom;
|
|
1008
1008
|
})(0.5);
|
|
1009
1009
|
|
|
1010
|
-
function sign(x) {
|
|
1010
|
+
function sign$1(x) {
|
|
1011
1011
|
return x < 0 ? -1 : 1;
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
@@ -1015,17 +1015,17 @@
|
|
|
1015
1015
|
// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
|
|
1016
1016
|
// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
|
|
1017
1017
|
// NOV(II), P. 443, 1990.
|
|
1018
|
-
function slope3(that, x2, y2) {
|
|
1018
|
+
function slope3$1(that, x2, y2) {
|
|
1019
1019
|
var h0 = that._x1 - that._x0,
|
|
1020
1020
|
h1 = x2 - that._x1,
|
|
1021
1021
|
s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
|
|
1022
1022
|
s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),
|
|
1023
1023
|
p = (s0 * h1 + s1 * h0) / (h0 + h1);
|
|
1024
|
-
return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
|
|
1024
|
+
return (sign$1(s0) + sign$1(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
|
|
1025
1025
|
}
|
|
1026
1026
|
|
|
1027
1027
|
// Calculate a one-sided slope.
|
|
1028
|
-
function slope2(that, t) {
|
|
1028
|
+
function slope2$1(that, t) {
|
|
1029
1029
|
var h = that._x1 - that._x0;
|
|
1030
1030
|
return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
|
|
1031
1031
|
}
|
|
@@ -1042,11 +1042,11 @@
|
|
|
1042
1042
|
that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
|
|
1043
1043
|
}
|
|
1044
1044
|
|
|
1045
|
-
function MonotoneX(context) {
|
|
1045
|
+
function MonotoneX$1(context) {
|
|
1046
1046
|
this._context = context;
|
|
1047
1047
|
}
|
|
1048
1048
|
|
|
1049
|
-
MonotoneX.prototype = {
|
|
1049
|
+
MonotoneX$1.prototype = {
|
|
1050
1050
|
areaStart: function() {
|
|
1051
1051
|
this._line = 0;
|
|
1052
1052
|
},
|
|
@@ -1062,7 +1062,7 @@
|
|
|
1062
1062
|
lineEnd: function() {
|
|
1063
1063
|
switch (this._point) {
|
|
1064
1064
|
case 2: this._context.lineTo(this._x1, this._y1); break;
|
|
1065
|
-
case 3: point$3(this, this._t0, slope2(this, this._t0)); break;
|
|
1065
|
+
case 3: point$3(this, this._t0, slope2$1(this, this._t0)); break;
|
|
1066
1066
|
}
|
|
1067
1067
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
1068
1068
|
this._line = 1 - this._line;
|
|
@@ -1075,8 +1075,8 @@
|
|
|
1075
1075
|
switch (this._point) {
|
|
1076
1076
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
1077
1077
|
case 1: this._point = 2; break;
|
|
1078
|
-
case 2: this._point = 3; point$3(this, slope2(this, t1 = slope3(this, x, y)), t1); break;
|
|
1079
|
-
default: point$3(this, this._t0, t1 = slope3(this, x, y)); break;
|
|
1078
|
+
case 2: this._point = 3; point$3(this, slope2$1(this, t1 = slope3$1(this, x, y)), t1); break;
|
|
1079
|
+
default: point$3(this, this._t0, t1 = slope3$1(this, x, y)); break;
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
1082
|
this._x0 = this._x1, this._x1 = x;
|
|
@@ -1085,27 +1085,12 @@
|
|
|
1085
1085
|
}
|
|
1086
1086
|
};
|
|
1087
1087
|
|
|
1088
|
-
function
|
|
1089
|
-
this
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
|
|
1093
|
-
MonotoneX.prototype.point.call(this, y, x);
|
|
1094
|
-
};
|
|
1095
|
-
|
|
1096
|
-
function ReflectContext(context) {
|
|
1097
|
-
this._context = context;
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
ReflectContext.prototype = {
|
|
1101
|
-
moveTo: function(x, y) { this._context.moveTo(y, x); },
|
|
1102
|
-
closePath: function() { this._context.closePath(); },
|
|
1103
|
-
lineTo: function(x, y) { this._context.lineTo(y, x); },
|
|
1104
|
-
bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }
|
|
1088
|
+
(Object.create(MonotoneX$1.prototype)).point = function(x, y) {
|
|
1089
|
+
MonotoneX$1.prototype.point.call(this, y, x);
|
|
1105
1090
|
};
|
|
1106
1091
|
|
|
1107
1092
|
function monotoneX(context) {
|
|
1108
|
-
return new MonotoneX(context);
|
|
1093
|
+
return new MonotoneX$1(context);
|
|
1109
1094
|
}
|
|
1110
1095
|
|
|
1111
1096
|
function Natural(context) {
|
|
@@ -1174,12 +1159,12 @@
|
|
|
1174
1159
|
return new Natural(context);
|
|
1175
1160
|
}
|
|
1176
1161
|
|
|
1177
|
-
function Step(context, t) {
|
|
1162
|
+
function Step$1(context, t) {
|
|
1178
1163
|
this._context = context;
|
|
1179
1164
|
this._t = t;
|
|
1180
1165
|
}
|
|
1181
1166
|
|
|
1182
|
-
Step.prototype = {
|
|
1167
|
+
Step$1.prototype = {
|
|
1183
1168
|
areaStart: function() {
|
|
1184
1169
|
this._line = 0;
|
|
1185
1170
|
},
|
|
@@ -1217,18 +1202,18 @@
|
|
|
1217
1202
|
};
|
|
1218
1203
|
|
|
1219
1204
|
function d3CurveStep(context) {
|
|
1220
|
-
return new Step(context, 0.5);
|
|
1205
|
+
return new Step$1(context, 0.5);
|
|
1221
1206
|
}
|
|
1222
1207
|
|
|
1223
1208
|
function stepBefore(context) {
|
|
1224
|
-
return new Step(context, 0);
|
|
1209
|
+
return new Step$1(context, 0);
|
|
1225
1210
|
}
|
|
1226
1211
|
|
|
1227
1212
|
function stepAfter(context) {
|
|
1228
|
-
return new Step(context, 1);
|
|
1213
|
+
return new Step$1(context, 1);
|
|
1229
1214
|
}
|
|
1230
1215
|
|
|
1231
|
-
var slice = Array.prototype.slice;
|
|
1216
|
+
var slice$2 = Array.prototype.slice;
|
|
1232
1217
|
|
|
1233
1218
|
function identity$1(x) {
|
|
1234
1219
|
return x;
|
|
@@ -1238,7 +1223,7 @@
|
|
|
1238
1223
|
right = 2,
|
|
1239
1224
|
bottom = 3,
|
|
1240
1225
|
left = 4,
|
|
1241
|
-
epsilon$
|
|
1226
|
+
epsilon$1 = 1e-6;
|
|
1242
1227
|
|
|
1243
1228
|
function translateX(x) {
|
|
1244
1229
|
return "translate(" + (x + 0.5) + ",0)";
|
|
@@ -1315,11 +1300,11 @@
|
|
|
1315
1300
|
text = text.transition(context);
|
|
1316
1301
|
|
|
1317
1302
|
tickExit = tickExit.transition(context)
|
|
1318
|
-
.attr("opacity", epsilon$
|
|
1303
|
+
.attr("opacity", epsilon$1)
|
|
1319
1304
|
.attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); });
|
|
1320
1305
|
|
|
1321
1306
|
tickEnter
|
|
1322
|
-
.attr("opacity", epsilon$
|
|
1307
|
+
.attr("opacity", epsilon$1)
|
|
1323
1308
|
.attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); });
|
|
1324
1309
|
}
|
|
1325
1310
|
|
|
@@ -1356,15 +1341,15 @@
|
|
|
1356
1341
|
};
|
|
1357
1342
|
|
|
1358
1343
|
axis.ticks = function() {
|
|
1359
|
-
return tickArguments = slice.call(arguments), axis;
|
|
1344
|
+
return tickArguments = slice$2.call(arguments), axis;
|
|
1360
1345
|
};
|
|
1361
1346
|
|
|
1362
1347
|
axis.tickArguments = function(_) {
|
|
1363
|
-
return arguments.length ? (tickArguments = _ == null ? [] : slice.call(_), axis) : tickArguments.slice();
|
|
1348
|
+
return arguments.length ? (tickArguments = _ == null ? [] : slice$2.call(_), axis) : tickArguments.slice();
|
|
1364
1349
|
};
|
|
1365
1350
|
|
|
1366
1351
|
axis.tickValues = function(_) {
|
|
1367
|
-
return arguments.length ? (tickValues = _ == null ? null : slice.call(_), axis) : tickValues && tickValues.slice();
|
|
1352
|
+
return arguments.length ? (tickValues = _ == null ? null : slice$2.call(_), axis) : tickValues && tickValues.slice();
|
|
1368
1353
|
};
|
|
1369
1354
|
|
|
1370
1355
|
axis.tickFormat = function(_) {
|
|
@@ -1433,8 +1418,8 @@
|
|
|
1433
1418
|
}
|
|
1434
1419
|
}
|
|
1435
1420
|
|
|
1436
|
-
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}";
|
|
1437
|
-
styleInject(css_248z);
|
|
1421
|
+
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}";
|
|
1422
|
+
styleInject(css_248z$c);
|
|
1438
1423
|
|
|
1439
1424
|
var Axis = /** @class */ (function (_super) {
|
|
1440
1425
|
__extends(Axis, _super);
|
|
@@ -2033,8 +2018,8 @@
|
|
|
2033
2018
|
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"; } });
|
|
2034
2019
|
Axis.prototype.publish("ordinalMappings", null, "object", "Alternative label mappings (icons)", null, { optional: true });
|
|
2035
2020
|
|
|
2036
|
-
var css_248z$
|
|
2037
|
-
styleInject(css_248z$
|
|
2021
|
+
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}";
|
|
2022
|
+
styleInject(css_248z$b);
|
|
2038
2023
|
|
|
2039
2024
|
var XYAxis = /** @class */ (function (_super) {
|
|
2040
2025
|
__extends(XYAxis, _super);
|
|
@@ -2499,7 +2484,7 @@
|
|
|
2499
2484
|
if (!retVal.length) {
|
|
2500
2485
|
return masterColumns;
|
|
2501
2486
|
}
|
|
2502
|
-
return __spreadArray([masterColumns[0]], retVal);
|
|
2487
|
+
return __spreadArray([masterColumns[0]], retVal, true);
|
|
2503
2488
|
};
|
|
2504
2489
|
XYAxis.prototype.layerColumnIndices = function (host) {
|
|
2505
2490
|
var masterColumns = host.columns();
|
|
@@ -2562,7 +2547,7 @@
|
|
|
2562
2547
|
common.select(this)
|
|
2563
2548
|
.classed("selected", selected)
|
|
2564
2549
|
.classed("deselected", !selected)
|
|
2565
|
-
.attr("filter", context._selection.svgGlowID() && selected ? "url(#"
|
|
2550
|
+
.attr("filter", context._selection.svgGlowID() && selected ? "url(#".concat(context._selection.svgGlowID(), ")") : null);
|
|
2566
2551
|
});
|
|
2567
2552
|
var selRows = _selected.map(function (d) {
|
|
2568
2553
|
return _this.rowToObj(d);
|
|
@@ -2627,8 +2612,8 @@
|
|
|
2627
2612
|
XYAxis.prototype.publish("regions", [], "array", "Regions");
|
|
2628
2613
|
XYAxis.prototype.publish("layers", [], "widgetArray", "Layers", null, { render: false });
|
|
2629
2614
|
|
|
2630
|
-
var css_248z$
|
|
2631
|
-
styleInject(css_248z$
|
|
2615
|
+
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}";
|
|
2616
|
+
styleInject(css_248z$a);
|
|
2632
2617
|
|
|
2633
2618
|
var Scatter = /** @class */ (function (_super) {
|
|
2634
2619
|
__extends(Scatter, _super);
|
|
@@ -2937,8 +2922,8 @@
|
|
|
2937
2922
|
}(Scatter));
|
|
2938
2923
|
Area.prototype._class += " chart_Area";
|
|
2939
2924
|
|
|
2940
|
-
var css_248z$
|
|
2941
|
-
styleInject(css_248z$
|
|
2925
|
+
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}";
|
|
2926
|
+
styleInject(css_248z$9);
|
|
2942
2927
|
|
|
2943
2928
|
var Column = /** @class */ (function (_super) {
|
|
2944
2929
|
__extends(Column, _super);
|
|
@@ -3166,7 +3151,7 @@
|
|
|
3166
3151
|
_texts
|
|
3167
3152
|
.attr("x", domainPos + (domainLength / 2))
|
|
3168
3153
|
.attr("y", y + textHeightOffset)
|
|
3169
|
-
.attr("transform", "rotate(-90, "
|
|
3154
|
+
.attr("transform", "rotate(-90, ".concat(domainPos + (domainLength / 2), ", ").concat(y, ")"));
|
|
3170
3155
|
}
|
|
3171
3156
|
else { // Bar
|
|
3172
3157
|
_texts
|
|
@@ -3189,7 +3174,7 @@
|
|
|
3189
3174
|
return "";
|
|
3190
3175
|
});
|
|
3191
3176
|
}
|
|
3192
|
-
var dataText = element.selectAll(".dataText").data(context.showValue() ? [""
|
|
3177
|
+
var dataText = element.selectAll(".dataText").data(context.showValue() ? ["".concat(upperValue)] : []);
|
|
3193
3178
|
var dataTextEnter = dataText.enter().append("g")
|
|
3194
3179
|
.attr("class", "dataText")
|
|
3195
3180
|
.each(function (d) {
|
|
@@ -3330,7 +3315,7 @@
|
|
|
3330
3315
|
.anchor(valueAnchor)
|
|
3331
3316
|
.fontFamily(valueFontFamily)
|
|
3332
3317
|
.fontSize(valueFontSize)
|
|
3333
|
-
.text(""
|
|
3318
|
+
.text("".concat(valueText))
|
|
3334
3319
|
.colorFill(textColor)
|
|
3335
3320
|
.visible(context.showValue())
|
|
3336
3321
|
.render();
|
|
@@ -3594,7 +3579,7 @@
|
|
|
3594
3579
|
}
|
|
3595
3580
|
|
|
3596
3581
|
function hierarchy(data, children) {
|
|
3597
|
-
var root = new Node(data),
|
|
3582
|
+
var root = new Node$1(data),
|
|
3598
3583
|
valued = +data.value && (root.value = data.value),
|
|
3599
3584
|
node,
|
|
3600
3585
|
nodes = [root],
|
|
@@ -3610,7 +3595,7 @@
|
|
|
3610
3595
|
if ((childs = children(node.data)) && (n = childs.length)) {
|
|
3611
3596
|
node.children = new Array(n);
|
|
3612
3597
|
for (i = n - 1; i >= 0; --i) {
|
|
3613
|
-
nodes.push(child = node.children[i] = new Node(childs[i]));
|
|
3598
|
+
nodes.push(child = node.children[i] = new Node$1(childs[i]));
|
|
3614
3599
|
child.parent = node;
|
|
3615
3600
|
child.depth = node.depth + 1;
|
|
3616
3601
|
}
|
|
@@ -3638,15 +3623,15 @@
|
|
|
3638
3623
|
while ((node = node.parent) && (node.height < ++height));
|
|
3639
3624
|
}
|
|
3640
3625
|
|
|
3641
|
-
function Node(data) {
|
|
3626
|
+
function Node$1(data) {
|
|
3642
3627
|
this.data = data;
|
|
3643
3628
|
this.depth =
|
|
3644
3629
|
this.height = 0;
|
|
3645
3630
|
this.parent = null;
|
|
3646
3631
|
}
|
|
3647
3632
|
|
|
3648
|
-
Node.prototype = hierarchy.prototype = {
|
|
3649
|
-
constructor: Node,
|
|
3633
|
+
Node$1.prototype = hierarchy.prototype = {
|
|
3634
|
+
constructor: Node$1,
|
|
3650
3635
|
count: node_count,
|
|
3651
3636
|
each: node_each,
|
|
3652
3637
|
eachAfter: node_eachAfter,
|
|
@@ -3833,7 +3818,7 @@
|
|
|
3833
3818
|
return dx * dx + dy * dy;
|
|
3834
3819
|
}
|
|
3835
3820
|
|
|
3836
|
-
function Node
|
|
3821
|
+
function Node(circle) {
|
|
3837
3822
|
this._ = circle;
|
|
3838
3823
|
this.next = null;
|
|
3839
3824
|
this.previous = null;
|
|
@@ -3856,14 +3841,14 @@
|
|
|
3856
3841
|
place(b, a, c = circles[2]);
|
|
3857
3842
|
|
|
3858
3843
|
// Initialize the front-chain using the first three circles a, b and c.
|
|
3859
|
-
a = new Node
|
|
3844
|
+
a = new Node(a), b = new Node(b), c = new Node(c);
|
|
3860
3845
|
a.next = c.previous = b;
|
|
3861
3846
|
b.next = a.previous = c;
|
|
3862
3847
|
c.next = b.previous = a;
|
|
3863
3848
|
|
|
3864
3849
|
// Attempt to place each remaining circle…
|
|
3865
3850
|
pack: for (i = 3; i < n; ++i) {
|
|
3866
|
-
place(a._, b._, c = circles[i]), c = new Node
|
|
3851
|
+
place(a._, b._, c = circles[i]), c = new Node(c);
|
|
3867
3852
|
|
|
3868
3853
|
// Find the closest intersecting circle on the front-chain, if any.
|
|
3869
3854
|
// “Closeness” is determined by linear distance along the front-chain.
|
|
@@ -3920,7 +3905,7 @@
|
|
|
3920
3905
|
return 0;
|
|
3921
3906
|
}
|
|
3922
3907
|
|
|
3923
|
-
function constant$
|
|
3908
|
+
function constant$2(x) {
|
|
3924
3909
|
return function() {
|
|
3925
3910
|
return x;
|
|
3926
3911
|
};
|
|
@@ -3960,7 +3945,7 @@
|
|
|
3960
3945
|
};
|
|
3961
3946
|
|
|
3962
3947
|
pack.padding = function(x) {
|
|
3963
|
-
return arguments.length ? (padding = typeof x === "function" ? x : constant$
|
|
3948
|
+
return arguments.length ? (padding = typeof x === "function" ? x : constant$2(+x), pack) : padding;
|
|
3964
3949
|
};
|
|
3965
3950
|
|
|
3966
3951
|
return pack;
|
|
@@ -4002,8 +3987,8 @@
|
|
|
4002
3987
|
};
|
|
4003
3988
|
}
|
|
4004
3989
|
|
|
4005
|
-
var css_248z$
|
|
4006
|
-
styleInject(css_248z$
|
|
3990
|
+
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}";
|
|
3991
|
+
styleInject(css_248z$8);
|
|
4007
3992
|
|
|
4008
3993
|
var Bubble = /** @class */ (function (_super) {
|
|
4009
3994
|
__extends(Bubble, _super);
|
|
@@ -4360,8 +4345,8 @@
|
|
|
4360
4345
|
};
|
|
4361
4346
|
}
|
|
4362
4347
|
|
|
4363
|
-
var css_248z$
|
|
4364
|
-
styleInject(css_248z$
|
|
4348
|
+
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}";
|
|
4349
|
+
styleInject(css_248z$7);
|
|
4365
4350
|
|
|
4366
4351
|
var Bullet = /** @class */ (function (_super) {
|
|
4367
4352
|
__extends(Bullet, _super);
|
|
@@ -4459,13 +4444,13 @@
|
|
|
4459
4444
|
svgUpdate
|
|
4460
4445
|
.attr("width", width)
|
|
4461
4446
|
.attr("height", height + margin.top + margin.bottom)
|
|
4462
|
-
.style("margin-left", margin.left
|
|
4447
|
+
.style("margin-left", "".concat(margin.left, "px"));
|
|
4463
4448
|
svgUpdate.select(".bulletBar")
|
|
4464
4449
|
.attr("transform", "translate(" + (titleWidth + 6) + "," + margin.top + ")")
|
|
4465
4450
|
.call(chart);
|
|
4466
4451
|
svg.exit().remove();
|
|
4467
4452
|
if (Object.keys(this._hiddenColumns).length > 0) {
|
|
4468
|
-
element.selectAll("."
|
|
4453
|
+
element.selectAll(".".concat(Object.keys(this._hiddenColumns).join(",.")))
|
|
4469
4454
|
.style("display", "none");
|
|
4470
4455
|
}
|
|
4471
4456
|
};
|
|
@@ -4505,7 +4490,7 @@
|
|
|
4505
4490
|
|
|
4506
4491
|
var array = Array.prototype;
|
|
4507
4492
|
|
|
4508
|
-
var slice
|
|
4493
|
+
var slice = array.slice;
|
|
4509
4494
|
|
|
4510
4495
|
function ascending(a, b) {
|
|
4511
4496
|
return a - b;
|
|
@@ -4517,7 +4502,7 @@
|
|
|
4517
4502
|
return area;
|
|
4518
4503
|
}
|
|
4519
4504
|
|
|
4520
|
-
function constant$
|
|
4505
|
+
function constant$1(x) {
|
|
4521
4506
|
return function() {
|
|
4522
4507
|
return x;
|
|
4523
4508
|
};
|
|
@@ -4551,7 +4536,7 @@
|
|
|
4551
4536
|
return p <= q && q <= r || r <= q && q <= p;
|
|
4552
4537
|
}
|
|
4553
4538
|
|
|
4554
|
-
function noop() {}
|
|
4539
|
+
function noop$1() {}
|
|
4555
4540
|
|
|
4556
4541
|
var cases = [
|
|
4557
4542
|
[],
|
|
@@ -4739,11 +4724,11 @@
|
|
|
4739
4724
|
};
|
|
4740
4725
|
|
|
4741
4726
|
contours.thresholds = function(_) {
|
|
4742
|
-
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$
|
|
4727
|
+
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$1(slice.call(_)) : constant$1(_), contours) : threshold;
|
|
4743
4728
|
};
|
|
4744
4729
|
|
|
4745
4730
|
contours.smooth = function(_) {
|
|
4746
|
-
return arguments.length ? (smooth = _ ? smoothLinear : noop, contours) : smooth === smoothLinear;
|
|
4731
|
+
return arguments.length ? (smooth = _ ? smoothLinear : noop$1, contours) : smooth === smoothLinear;
|
|
4747
4732
|
};
|
|
4748
4733
|
|
|
4749
4734
|
return contours;
|
|
@@ -4816,7 +4801,7 @@
|
|
|
4816
4801
|
o = r * 3, // grid offset, to pad for blur
|
|
4817
4802
|
n = (dx + o * 2) >> k, // grid width
|
|
4818
4803
|
m = (dy + o * 2) >> k, // grid height
|
|
4819
|
-
threshold = constant$
|
|
4804
|
+
threshold = constant$1(20);
|
|
4820
4805
|
|
|
4821
4806
|
function density(data) {
|
|
4822
4807
|
var values0 = new Float32Array(n * m),
|
|
@@ -4884,15 +4869,15 @@
|
|
|
4884
4869
|
}
|
|
4885
4870
|
|
|
4886
4871
|
density.x = function(_) {
|
|
4887
|
-
return arguments.length ? (x = typeof _ === "function" ? _ : constant$
|
|
4872
|
+
return arguments.length ? (x = typeof _ === "function" ? _ : constant$1(+_), density) : x;
|
|
4888
4873
|
};
|
|
4889
4874
|
|
|
4890
4875
|
density.y = function(_) {
|
|
4891
|
-
return arguments.length ? (y = typeof _ === "function" ? _ : constant$
|
|
4876
|
+
return arguments.length ? (y = typeof _ === "function" ? _ : constant$1(+_), density) : y;
|
|
4892
4877
|
};
|
|
4893
4878
|
|
|
4894
4879
|
density.weight = function(_) {
|
|
4895
|
-
return arguments.length ? (weight = typeof _ === "function" ? _ : constant$
|
|
4880
|
+
return arguments.length ? (weight = typeof _ === "function" ? _ : constant$1(+_), density) : weight;
|
|
4896
4881
|
};
|
|
4897
4882
|
|
|
4898
4883
|
density.size = function(_) {
|
|
@@ -4909,7 +4894,7 @@
|
|
|
4909
4894
|
};
|
|
4910
4895
|
|
|
4911
4896
|
density.thresholds = function(_) {
|
|
4912
|
-
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$
|
|
4897
|
+
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$1(slice.call(_)) : constant$1(_), density) : threshold;
|
|
4913
4898
|
};
|
|
4914
4899
|
|
|
4915
4900
|
density.bandwidth = function(_) {
|
|
@@ -4962,13 +4947,13 @@
|
|
|
4962
4947
|
adder.t = (a - av) + (b - bv);
|
|
4963
4948
|
}
|
|
4964
4949
|
|
|
4965
|
-
var pi$
|
|
4966
|
-
var tau$
|
|
4950
|
+
var pi$1 = Math.PI;
|
|
4951
|
+
var tau$1 = pi$1 * 2;
|
|
4967
4952
|
|
|
4968
|
-
var abs
|
|
4969
|
-
var sqrt
|
|
4953
|
+
var abs = Math.abs;
|
|
4954
|
+
var sqrt = Math.sqrt;
|
|
4970
4955
|
|
|
4971
|
-
function noop
|
|
4956
|
+
function noop() {}
|
|
4972
4957
|
|
|
4973
4958
|
function streamGeometry(geometry, stream) {
|
|
4974
4959
|
if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {
|
|
@@ -5040,28 +5025,28 @@
|
|
|
5040
5025
|
}
|
|
5041
5026
|
}
|
|
5042
5027
|
|
|
5043
|
-
function identity
|
|
5028
|
+
function identity(x) {
|
|
5044
5029
|
return x;
|
|
5045
5030
|
}
|
|
5046
5031
|
|
|
5047
5032
|
var areaSum = adder(),
|
|
5048
5033
|
areaRingSum = adder(),
|
|
5049
|
-
x00,
|
|
5050
|
-
y00,
|
|
5051
|
-
x0,
|
|
5052
|
-
y0;
|
|
5034
|
+
x00$2,
|
|
5035
|
+
y00$2,
|
|
5036
|
+
x0$3,
|
|
5037
|
+
y0$3;
|
|
5053
5038
|
|
|
5054
5039
|
var areaStream = {
|
|
5055
|
-
point: noop
|
|
5056
|
-
lineStart: noop
|
|
5057
|
-
lineEnd: noop
|
|
5040
|
+
point: noop,
|
|
5041
|
+
lineStart: noop,
|
|
5042
|
+
lineEnd: noop,
|
|
5058
5043
|
polygonStart: function() {
|
|
5059
5044
|
areaStream.lineStart = areaRingStart;
|
|
5060
5045
|
areaStream.lineEnd = areaRingEnd;
|
|
5061
5046
|
},
|
|
5062
5047
|
polygonEnd: function() {
|
|
5063
|
-
areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop
|
|
5064
|
-
areaSum.add(abs
|
|
5048
|
+
areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;
|
|
5049
|
+
areaSum.add(abs(areaRingSum));
|
|
5065
5050
|
areaRingSum.reset();
|
|
5066
5051
|
},
|
|
5067
5052
|
result: function() {
|
|
@@ -5077,43 +5062,47 @@
|
|
|
5077
5062
|
|
|
5078
5063
|
function areaPointFirst(x, y) {
|
|
5079
5064
|
areaStream.point = areaPoint;
|
|
5080
|
-
x00 = x0 = x, y00 = y0 = y;
|
|
5065
|
+
x00$2 = x0$3 = x, y00$2 = y0$3 = y;
|
|
5081
5066
|
}
|
|
5082
5067
|
|
|
5083
5068
|
function areaPoint(x, y) {
|
|
5084
|
-
areaRingSum.add(y0 * x - x0 * y);
|
|
5085
|
-
x0 = x, y0 = y;
|
|
5069
|
+
areaRingSum.add(y0$3 * x - x0$3 * y);
|
|
5070
|
+
x0$3 = x, y0$3 = y;
|
|
5086
5071
|
}
|
|
5087
5072
|
|
|
5088
5073
|
function areaRingEnd() {
|
|
5089
|
-
areaPoint(x00, y00);
|
|
5074
|
+
areaPoint(x00$2, y00$2);
|
|
5090
5075
|
}
|
|
5091
5076
|
|
|
5092
|
-
var
|
|
5093
|
-
|
|
5094
|
-
|
|
5077
|
+
var pathArea = areaStream;
|
|
5078
|
+
|
|
5079
|
+
var x0$2 = Infinity,
|
|
5080
|
+
y0$2 = x0$2,
|
|
5081
|
+
x1 = -x0$2,
|
|
5095
5082
|
y1 = x1;
|
|
5096
5083
|
|
|
5097
5084
|
var boundsStream = {
|
|
5098
5085
|
point: boundsPoint,
|
|
5099
|
-
lineStart: noop
|
|
5100
|
-
lineEnd: noop
|
|
5101
|
-
polygonStart: noop
|
|
5102
|
-
polygonEnd: noop
|
|
5086
|
+
lineStart: noop,
|
|
5087
|
+
lineEnd: noop,
|
|
5088
|
+
polygonStart: noop,
|
|
5089
|
+
polygonEnd: noop,
|
|
5103
5090
|
result: function() {
|
|
5104
|
-
var bounds = [[x0$
|
|
5105
|
-
x1 = y1 = -(y0$
|
|
5091
|
+
var bounds = [[x0$2, y0$2], [x1, y1]];
|
|
5092
|
+
x1 = y1 = -(y0$2 = x0$2 = Infinity);
|
|
5106
5093
|
return bounds;
|
|
5107
5094
|
}
|
|
5108
5095
|
};
|
|
5109
5096
|
|
|
5110
5097
|
function boundsPoint(x, y) {
|
|
5111
|
-
if (x < x0$
|
|
5098
|
+
if (x < x0$2) x0$2 = x;
|
|
5112
5099
|
if (x > x1) x1 = x;
|
|
5113
|
-
if (y < y0$
|
|
5100
|
+
if (y < y0$2) y0$2 = y;
|
|
5114
5101
|
if (y > y1) y1 = y;
|
|
5115
5102
|
}
|
|
5116
5103
|
|
|
5104
|
+
var boundsStream$1 = boundsStream;
|
|
5105
|
+
|
|
5117
5106
|
// TODO Enforce positive area for exterior, negative area for interior?
|
|
5118
5107
|
|
|
5119
5108
|
var X0 = 0,
|
|
@@ -5127,8 +5116,8 @@
|
|
|
5127
5116
|
Z2 = 0,
|
|
5128
5117
|
x00$1,
|
|
5129
5118
|
y00$1,
|
|
5130
|
-
x0$
|
|
5131
|
-
y0$
|
|
5119
|
+
x0$1,
|
|
5120
|
+
y0$1;
|
|
5132
5121
|
|
|
5133
5122
|
var centroidStream = {
|
|
5134
5123
|
point: centroidPoint,
|
|
@@ -5167,15 +5156,15 @@
|
|
|
5167
5156
|
|
|
5168
5157
|
function centroidPointFirstLine(x, y) {
|
|
5169
5158
|
centroidStream.point = centroidPointLine;
|
|
5170
|
-
centroidPoint(x0$
|
|
5159
|
+
centroidPoint(x0$1 = x, y0$1 = y);
|
|
5171
5160
|
}
|
|
5172
5161
|
|
|
5173
5162
|
function centroidPointLine(x, y) {
|
|
5174
|
-
var dx = x - x0$
|
|
5175
|
-
X1 += z * (x0$
|
|
5176
|
-
Y1 += z * (y0$
|
|
5163
|
+
var dx = x - x0$1, dy = y - y0$1, z = sqrt(dx * dx + dy * dy);
|
|
5164
|
+
X1 += z * (x0$1 + x) / 2;
|
|
5165
|
+
Y1 += z * (y0$1 + y) / 2;
|
|
5177
5166
|
Z1 += z;
|
|
5178
|
-
centroidPoint(x0$
|
|
5167
|
+
centroidPoint(x0$1 = x, y0$1 = y);
|
|
5179
5168
|
}
|
|
5180
5169
|
|
|
5181
5170
|
function centroidLineEnd() {
|
|
@@ -5192,25 +5181,27 @@
|
|
|
5192
5181
|
|
|
5193
5182
|
function centroidPointFirstRing(x, y) {
|
|
5194
5183
|
centroidStream.point = centroidPointRing;
|
|
5195
|
-
centroidPoint(x00$1 = x0$
|
|
5184
|
+
centroidPoint(x00$1 = x0$1 = x, y00$1 = y0$1 = y);
|
|
5196
5185
|
}
|
|
5197
5186
|
|
|
5198
5187
|
function centroidPointRing(x, y) {
|
|
5199
|
-
var dx = x - x0$
|
|
5200
|
-
dy = y - y0$
|
|
5201
|
-
z = sqrt
|
|
5188
|
+
var dx = x - x0$1,
|
|
5189
|
+
dy = y - y0$1,
|
|
5190
|
+
z = sqrt(dx * dx + dy * dy);
|
|
5202
5191
|
|
|
5203
|
-
X1 += z * (x0$
|
|
5204
|
-
Y1 += z * (y0$
|
|
5192
|
+
X1 += z * (x0$1 + x) / 2;
|
|
5193
|
+
Y1 += z * (y0$1 + y) / 2;
|
|
5205
5194
|
Z1 += z;
|
|
5206
5195
|
|
|
5207
|
-
z = y0$
|
|
5208
|
-
X2 += z * (x0$
|
|
5209
|
-
Y2 += z * (y0$
|
|
5196
|
+
z = y0$1 * x - x0$1 * y;
|
|
5197
|
+
X2 += z * (x0$1 + x);
|
|
5198
|
+
Y2 += z * (y0$1 + y);
|
|
5210
5199
|
Z2 += z * 3;
|
|
5211
|
-
centroidPoint(x0$
|
|
5200
|
+
centroidPoint(x0$1 = x, y0$1 = y);
|
|
5212
5201
|
}
|
|
5213
5202
|
|
|
5203
|
+
var pathCentroid = centroidStream;
|
|
5204
|
+
|
|
5214
5205
|
function PathContext(context) {
|
|
5215
5206
|
this._context = context;
|
|
5216
5207
|
}
|
|
@@ -5246,29 +5237,29 @@
|
|
|
5246
5237
|
}
|
|
5247
5238
|
default: {
|
|
5248
5239
|
this._context.moveTo(x + this._radius, y);
|
|
5249
|
-
this._context.arc(x, y, this._radius, 0, tau$
|
|
5240
|
+
this._context.arc(x, y, this._radius, 0, tau$1);
|
|
5250
5241
|
break;
|
|
5251
5242
|
}
|
|
5252
5243
|
}
|
|
5253
5244
|
},
|
|
5254
|
-
result: noop
|
|
5245
|
+
result: noop
|
|
5255
5246
|
};
|
|
5256
5247
|
|
|
5257
5248
|
var lengthSum = adder(),
|
|
5258
5249
|
lengthRing,
|
|
5259
|
-
x00
|
|
5260
|
-
y00
|
|
5261
|
-
x0
|
|
5262
|
-
y0
|
|
5250
|
+
x00,
|
|
5251
|
+
y00,
|
|
5252
|
+
x0,
|
|
5253
|
+
y0;
|
|
5263
5254
|
|
|
5264
5255
|
var lengthStream = {
|
|
5265
|
-
point: noop
|
|
5256
|
+
point: noop,
|
|
5266
5257
|
lineStart: function() {
|
|
5267
5258
|
lengthStream.point = lengthPointFirst;
|
|
5268
5259
|
},
|
|
5269
5260
|
lineEnd: function() {
|
|
5270
|
-
if (lengthRing) lengthPoint(x00
|
|
5271
|
-
lengthStream.point = noop
|
|
5261
|
+
if (lengthRing) lengthPoint(x00, y00);
|
|
5262
|
+
lengthStream.point = noop;
|
|
5272
5263
|
},
|
|
5273
5264
|
polygonStart: function() {
|
|
5274
5265
|
lengthRing = true;
|
|
@@ -5285,15 +5276,17 @@
|
|
|
5285
5276
|
|
|
5286
5277
|
function lengthPointFirst(x, y) {
|
|
5287
5278
|
lengthStream.point = lengthPoint;
|
|
5288
|
-
x00
|
|
5279
|
+
x00 = x0 = x, y00 = y0 = y;
|
|
5289
5280
|
}
|
|
5290
5281
|
|
|
5291
5282
|
function lengthPoint(x, y) {
|
|
5292
|
-
x0
|
|
5293
|
-
lengthSum.add(sqrt
|
|
5294
|
-
x0
|
|
5283
|
+
x0 -= x, y0 -= y;
|
|
5284
|
+
lengthSum.add(sqrt(x0 * x0 + y0 * y0));
|
|
5285
|
+
x0 = x, y0 = y;
|
|
5295
5286
|
}
|
|
5296
5287
|
|
|
5288
|
+
var pathMeasure = lengthStream;
|
|
5289
|
+
|
|
5297
5290
|
function PathString() {
|
|
5298
5291
|
this._string = [];
|
|
5299
5292
|
}
|
|
@@ -5368,27 +5361,27 @@
|
|
|
5368
5361
|
}
|
|
5369
5362
|
|
|
5370
5363
|
path.area = function(object) {
|
|
5371
|
-
geoStream(object, projectionStream(
|
|
5372
|
-
return
|
|
5364
|
+
geoStream(object, projectionStream(pathArea));
|
|
5365
|
+
return pathArea.result();
|
|
5373
5366
|
};
|
|
5374
5367
|
|
|
5375
5368
|
path.measure = function(object) {
|
|
5376
|
-
geoStream(object, projectionStream(
|
|
5377
|
-
return
|
|
5369
|
+
geoStream(object, projectionStream(pathMeasure));
|
|
5370
|
+
return pathMeasure.result();
|
|
5378
5371
|
};
|
|
5379
5372
|
|
|
5380
5373
|
path.bounds = function(object) {
|
|
5381
|
-
geoStream(object, projectionStream(boundsStream));
|
|
5382
|
-
return boundsStream.result();
|
|
5374
|
+
geoStream(object, projectionStream(boundsStream$1));
|
|
5375
|
+
return boundsStream$1.result();
|
|
5383
5376
|
};
|
|
5384
5377
|
|
|
5385
5378
|
path.centroid = function(object) {
|
|
5386
|
-
geoStream(object, projectionStream(
|
|
5387
|
-
return
|
|
5379
|
+
geoStream(object, projectionStream(pathCentroid));
|
|
5380
|
+
return pathCentroid.result();
|
|
5388
5381
|
};
|
|
5389
5382
|
|
|
5390
5383
|
path.projection = function(_) {
|
|
5391
|
-
return arguments.length ? (projectionStream = _ == null ? (projection = null, identity
|
|
5384
|
+
return arguments.length ? (projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream, path) : projection;
|
|
5392
5385
|
};
|
|
5393
5386
|
|
|
5394
5387
|
path.context = function(_) {
|
|
@@ -5489,42 +5482,42 @@
|
|
|
5489
5482
|
}(Bar));
|
|
5490
5483
|
Gantt.prototype._class += " chart_Gantt";
|
|
5491
5484
|
|
|
5492
|
-
function constant
|
|
5485
|
+
function constant(x) {
|
|
5493
5486
|
return function constant() {
|
|
5494
5487
|
return x;
|
|
5495
5488
|
};
|
|
5496
5489
|
}
|
|
5497
5490
|
|
|
5498
|
-
var epsilon
|
|
5499
|
-
var pi
|
|
5500
|
-
var halfPi
|
|
5501
|
-
var tau
|
|
5491
|
+
var epsilon = 1e-12;
|
|
5492
|
+
var pi = Math.PI;
|
|
5493
|
+
var halfPi = pi / 2;
|
|
5494
|
+
var tau = 2 * pi;
|
|
5502
5495
|
|
|
5503
|
-
function arcInnerRadius
|
|
5496
|
+
function arcInnerRadius(d) {
|
|
5504
5497
|
return d.innerRadius;
|
|
5505
5498
|
}
|
|
5506
5499
|
|
|
5507
|
-
function arcOuterRadius
|
|
5500
|
+
function arcOuterRadius(d) {
|
|
5508
5501
|
return d.outerRadius;
|
|
5509
5502
|
}
|
|
5510
5503
|
|
|
5511
|
-
function arcStartAngle
|
|
5504
|
+
function arcStartAngle(d) {
|
|
5512
5505
|
return d.startAngle;
|
|
5513
5506
|
}
|
|
5514
5507
|
|
|
5515
|
-
function arcEndAngle
|
|
5508
|
+
function arcEndAngle(d) {
|
|
5516
5509
|
return d.endAngle;
|
|
5517
5510
|
}
|
|
5518
5511
|
|
|
5519
|
-
function arcPadAngle
|
|
5512
|
+
function arcPadAngle(d) {
|
|
5520
5513
|
return d && d.padAngle; // Note: optional!
|
|
5521
5514
|
}
|
|
5522
5515
|
|
|
5523
|
-
function asin
|
|
5524
|
-
return x >= 1 ? halfPi
|
|
5516
|
+
function asin(x) {
|
|
5517
|
+
return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
|
|
5525
5518
|
}
|
|
5526
5519
|
|
|
5527
|
-
function intersect
|
|
5520
|
+
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
5528
5521
|
var x10 = x1 - x0, y10 = y1 - y0,
|
|
5529
5522
|
x32 = x3 - x2, y32 = y3 - y2,
|
|
5530
5523
|
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / (y32 * x10 - x32 * y10);
|
|
@@ -5533,7 +5526,7 @@
|
|
|
5533
5526
|
|
|
5534
5527
|
// Compute perpendicular offset line of length rc.
|
|
5535
5528
|
// http://mathworld.wolfram.com/Circle-LineIntersection.html
|
|
5536
|
-
function cornerTangents
|
|
5529
|
+
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
|
5537
5530
|
var x01 = x0 - x1,
|
|
5538
5531
|
y01 = y0 - y1,
|
|
5539
5532
|
lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01),
|
|
@@ -5575,13 +5568,13 @@
|
|
|
5575
5568
|
}
|
|
5576
5569
|
|
|
5577
5570
|
function arc() {
|
|
5578
|
-
var innerRadius = arcInnerRadius
|
|
5579
|
-
outerRadius = arcOuterRadius
|
|
5580
|
-
cornerRadius = constant
|
|
5571
|
+
var innerRadius = arcInnerRadius,
|
|
5572
|
+
outerRadius = arcOuterRadius,
|
|
5573
|
+
cornerRadius = constant(0),
|
|
5581
5574
|
padRadius = null,
|
|
5582
|
-
startAngle = arcStartAngle
|
|
5583
|
-
endAngle = arcEndAngle
|
|
5584
|
-
padAngle = arcPadAngle
|
|
5575
|
+
startAngle = arcStartAngle,
|
|
5576
|
+
endAngle = arcEndAngle,
|
|
5577
|
+
padAngle = arcPadAngle,
|
|
5585
5578
|
context = null;
|
|
5586
5579
|
|
|
5587
5580
|
function arc() {
|
|
@@ -5589,8 +5582,8 @@
|
|
|
5589
5582
|
r,
|
|
5590
5583
|
r0 = +innerRadius.apply(this, arguments),
|
|
5591
5584
|
r1 = +outerRadius.apply(this, arguments),
|
|
5592
|
-
a0 = startAngle.apply(this, arguments) - halfPi
|
|
5593
|
-
a1 = endAngle.apply(this, arguments) - halfPi
|
|
5585
|
+
a0 = startAngle.apply(this, arguments) - halfPi,
|
|
5586
|
+
a1 = endAngle.apply(this, arguments) - halfPi,
|
|
5594
5587
|
da = Math.abs(a1 - a0),
|
|
5595
5588
|
cw = a1 > a0;
|
|
5596
5589
|
|
|
@@ -5600,13 +5593,13 @@
|
|
|
5600
5593
|
if (r1 < r0) r = r1, r1 = r0, r0 = r;
|
|
5601
5594
|
|
|
5602
5595
|
// Is it a point?
|
|
5603
|
-
if (!(r1 > epsilon
|
|
5596
|
+
if (!(r1 > epsilon)) context.moveTo(0, 0);
|
|
5604
5597
|
|
|
5605
5598
|
// Or is it a circle or annulus?
|
|
5606
|
-
else if (da > tau
|
|
5599
|
+
else if (da > tau - epsilon) {
|
|
5607
5600
|
context.moveTo(r1 * Math.cos(a0), r1 * Math.sin(a0));
|
|
5608
5601
|
context.arc(0, 0, r1, a0, a1, !cw);
|
|
5609
|
-
if (r0 > epsilon
|
|
5602
|
+
if (r0 > epsilon) {
|
|
5610
5603
|
context.moveTo(r0 * Math.cos(a1), r0 * Math.sin(a1));
|
|
5611
5604
|
context.arc(0, 0, r0, a1, a0, cw);
|
|
5612
5605
|
}
|
|
@@ -5621,7 +5614,7 @@
|
|
|
5621
5614
|
da0 = da,
|
|
5622
5615
|
da1 = da,
|
|
5623
5616
|
ap = padAngle.apply(this, arguments) / 2,
|
|
5624
|
-
rp = (ap > epsilon
|
|
5617
|
+
rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : Math.sqrt(r0 * r0 + r1 * r1)),
|
|
5625
5618
|
rc = Math.min(Math.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
|
|
5626
5619
|
rc0 = rc,
|
|
5627
5620
|
rc1 = rc,
|
|
@@ -5629,12 +5622,12 @@
|
|
|
5629
5622
|
t1;
|
|
5630
5623
|
|
|
5631
5624
|
// Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
|
|
5632
|
-
if (rp > epsilon
|
|
5633
|
-
var p0 = asin
|
|
5634
|
-
p1 = asin
|
|
5635
|
-
if ((da0 -= p0 * 2) > epsilon
|
|
5625
|
+
if (rp > epsilon) {
|
|
5626
|
+
var p0 = asin(rp / r0 * Math.sin(ap)),
|
|
5627
|
+
p1 = asin(rp / r1 * Math.sin(ap));
|
|
5628
|
+
if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
|
|
5636
5629
|
else da0 = 0, a00 = a10 = (a0 + a1) / 2;
|
|
5637
|
-
if ((da1 -= p1 * 2) > epsilon
|
|
5630
|
+
if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
|
|
5638
5631
|
else da1 = 0, a01 = a11 = (a0 + a1) / 2;
|
|
5639
5632
|
}
|
|
5640
5633
|
|
|
@@ -5644,15 +5637,15 @@
|
|
|
5644
5637
|
y10 = r0 * Math.sin(a10);
|
|
5645
5638
|
|
|
5646
5639
|
// Apply rounded corners?
|
|
5647
|
-
if (rc > epsilon
|
|
5640
|
+
if (rc > epsilon) {
|
|
5648
5641
|
var x11 = r1 * Math.cos(a11),
|
|
5649
5642
|
y11 = r1 * Math.sin(a11),
|
|
5650
5643
|
x00 = r0 * Math.cos(a00),
|
|
5651
5644
|
y00 = r0 * Math.sin(a00);
|
|
5652
5645
|
|
|
5653
5646
|
// Restrict the corner radius according to the sector angle.
|
|
5654
|
-
if (da < pi
|
|
5655
|
-
var oc = da0 > epsilon
|
|
5647
|
+
if (da < pi) {
|
|
5648
|
+
var oc = da0 > epsilon ? intersect(x01, y01, x00, y00, x11, y11, x10, y10) : [x10, y10],
|
|
5656
5649
|
ax = x01 - oc[0],
|
|
5657
5650
|
ay = y01 - oc[1],
|
|
5658
5651
|
bx = x11 - oc[0],
|
|
@@ -5665,12 +5658,12 @@
|
|
|
5665
5658
|
}
|
|
5666
5659
|
|
|
5667
5660
|
// Is the sector collapsed to a line?
|
|
5668
|
-
if (!(da1 > epsilon
|
|
5661
|
+
if (!(da1 > epsilon)) context.moveTo(x01, y01);
|
|
5669
5662
|
|
|
5670
5663
|
// Does the sector’s outer ring have rounded corners?
|
|
5671
|
-
else if (rc1 > epsilon
|
|
5672
|
-
t0 = cornerTangents
|
|
5673
|
-
t1 = cornerTangents
|
|
5664
|
+
else if (rc1 > epsilon) {
|
|
5665
|
+
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
|
|
5666
|
+
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
|
|
5674
5667
|
|
|
5675
5668
|
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
5676
5669
|
|
|
@@ -5690,12 +5683,12 @@
|
|
|
5690
5683
|
|
|
5691
5684
|
// Is there no inner ring, and it’s a circular sector?
|
|
5692
5685
|
// Or perhaps it’s an annular sector collapsed due to padding?
|
|
5693
|
-
if (!(r0 > epsilon
|
|
5686
|
+
if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);
|
|
5694
5687
|
|
|
5695
5688
|
// Does the sector’s inner ring (or point) have rounded corners?
|
|
5696
|
-
else if (rc0 > epsilon
|
|
5697
|
-
t0 = cornerTangents
|
|
5698
|
-
t1 = cornerTangents
|
|
5689
|
+
else if (rc0 > epsilon) {
|
|
5690
|
+
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
|
|
5691
|
+
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
|
|
5699
5692
|
|
|
5700
5693
|
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
5701
5694
|
|
|
@@ -5721,36 +5714,36 @@
|
|
|
5721
5714
|
|
|
5722
5715
|
arc.centroid = function() {
|
|
5723
5716
|
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
|
|
5724
|
-
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi
|
|
5717
|
+
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
|
|
5725
5718
|
return [Math.cos(a) * r, Math.sin(a) * r];
|
|
5726
5719
|
};
|
|
5727
5720
|
|
|
5728
5721
|
arc.innerRadius = function(_) {
|
|
5729
|
-
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant
|
|
5722
|
+
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
|
|
5730
5723
|
};
|
|
5731
5724
|
|
|
5732
5725
|
arc.outerRadius = function(_) {
|
|
5733
|
-
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant
|
|
5726
|
+
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
|
|
5734
5727
|
};
|
|
5735
5728
|
|
|
5736
5729
|
arc.cornerRadius = function(_) {
|
|
5737
|
-
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant
|
|
5730
|
+
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
|
|
5738
5731
|
};
|
|
5739
5732
|
|
|
5740
5733
|
arc.padRadius = function(_) {
|
|
5741
|
-
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant
|
|
5734
|
+
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
|
|
5742
5735
|
};
|
|
5743
5736
|
|
|
5744
5737
|
arc.startAngle = function(_) {
|
|
5745
|
-
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant
|
|
5738
|
+
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
|
|
5746
5739
|
};
|
|
5747
5740
|
|
|
5748
5741
|
arc.endAngle = function(_) {
|
|
5749
|
-
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant
|
|
5742
|
+
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
|
|
5750
5743
|
};
|
|
5751
5744
|
|
|
5752
5745
|
arc.padAngle = function(_) {
|
|
5753
|
-
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant
|
|
5746
|
+
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
|
|
5754
5747
|
};
|
|
5755
5748
|
|
|
5756
5749
|
arc.context = function(_) {
|
|
@@ -5760,11 +5753,11 @@
|
|
|
5760
5753
|
return arc;
|
|
5761
5754
|
}
|
|
5762
5755
|
|
|
5763
|
-
function Linear
|
|
5756
|
+
function Linear(context) {
|
|
5764
5757
|
this._context = context;
|
|
5765
5758
|
}
|
|
5766
5759
|
|
|
5767
|
-
Linear
|
|
5760
|
+
Linear.prototype = {
|
|
5768
5761
|
areaStart: function() {
|
|
5769
5762
|
this._line = 0;
|
|
5770
5763
|
},
|
|
@@ -5789,21 +5782,21 @@
|
|
|
5789
5782
|
};
|
|
5790
5783
|
|
|
5791
5784
|
function curveLinear(context) {
|
|
5792
|
-
return new Linear
|
|
5785
|
+
return new Linear(context);
|
|
5793
5786
|
}
|
|
5794
5787
|
|
|
5795
|
-
function x
|
|
5788
|
+
function x(p) {
|
|
5796
5789
|
return p[0];
|
|
5797
5790
|
}
|
|
5798
5791
|
|
|
5799
|
-
function y
|
|
5792
|
+
function y(p) {
|
|
5800
5793
|
return p[1];
|
|
5801
5794
|
}
|
|
5802
5795
|
|
|
5803
5796
|
function line() {
|
|
5804
|
-
var x = x
|
|
5805
|
-
y = y
|
|
5806
|
-
defined = constant
|
|
5797
|
+
var x$1 = x,
|
|
5798
|
+
y$1 = y,
|
|
5799
|
+
defined = constant(true),
|
|
5807
5800
|
context = null,
|
|
5808
5801
|
curve = curveLinear,
|
|
5809
5802
|
output = null;
|
|
@@ -5822,22 +5815,22 @@
|
|
|
5822
5815
|
if (defined0 = !defined0) output.lineStart();
|
|
5823
5816
|
else output.lineEnd();
|
|
5824
5817
|
}
|
|
5825
|
-
if (defined0) output.point(+x(d, i, data), +y(d, i, data));
|
|
5818
|
+
if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data));
|
|
5826
5819
|
}
|
|
5827
5820
|
|
|
5828
5821
|
if (buffer) return output = null, buffer + "" || null;
|
|
5829
5822
|
}
|
|
5830
5823
|
|
|
5831
5824
|
line.x = function(_) {
|
|
5832
|
-
return arguments.length ? (x = typeof _ === "function" ? _ : constant
|
|
5825
|
+
return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), line) : x$1;
|
|
5833
5826
|
};
|
|
5834
5827
|
|
|
5835
5828
|
line.y = function(_) {
|
|
5836
|
-
return arguments.length ? (y = typeof _ === "function" ? _ : constant
|
|
5829
|
+
return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), line) : y$1;
|
|
5837
5830
|
};
|
|
5838
5831
|
|
|
5839
5832
|
line.defined = function(_) {
|
|
5840
|
-
return arguments.length ? (defined = typeof _ === "function" ? _ : constant
|
|
5833
|
+
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined;
|
|
5841
5834
|
};
|
|
5842
5835
|
|
|
5843
5836
|
line.curve = function(_) {
|
|
@@ -5851,7 +5844,7 @@
|
|
|
5851
5844
|
return line;
|
|
5852
5845
|
}
|
|
5853
5846
|
|
|
5854
|
-
function point$
|
|
5847
|
+
function point$2(that, x, y) {
|
|
5855
5848
|
that._context.bezierCurveTo(
|
|
5856
5849
|
that._x1 + that._k * (that._x2 - that._x0),
|
|
5857
5850
|
that._y1 + that._k * (that._y2 - that._y0),
|
|
@@ -5862,12 +5855,12 @@
|
|
|
5862
5855
|
);
|
|
5863
5856
|
}
|
|
5864
5857
|
|
|
5865
|
-
function Cardinal
|
|
5858
|
+
function Cardinal(context, tension) {
|
|
5866
5859
|
this._context = context;
|
|
5867
5860
|
this._k = (1 - tension) / 6;
|
|
5868
5861
|
}
|
|
5869
5862
|
|
|
5870
|
-
Cardinal
|
|
5863
|
+
Cardinal.prototype = {
|
|
5871
5864
|
areaStart: function() {
|
|
5872
5865
|
this._line = 0;
|
|
5873
5866
|
},
|
|
@@ -5882,7 +5875,7 @@
|
|
|
5882
5875
|
lineEnd: function() {
|
|
5883
5876
|
switch (this._point) {
|
|
5884
5877
|
case 2: this._context.lineTo(this._x2, this._y2); break;
|
|
5885
|
-
case 3: point$
|
|
5878
|
+
case 3: point$2(this, this._x1, this._y1); break;
|
|
5886
5879
|
}
|
|
5887
5880
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
5888
5881
|
this._line = 1 - this._line;
|
|
@@ -5893,27 +5886,27 @@
|
|
|
5893
5886
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
5894
5887
|
case 1: this._point = 2; this._x1 = x, this._y1 = y; break;
|
|
5895
5888
|
case 2: this._point = 3; // proceed
|
|
5896
|
-
default: point$
|
|
5889
|
+
default: point$2(this, x, y); break;
|
|
5897
5890
|
}
|
|
5898
5891
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
5899
5892
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
|
|
5900
5893
|
}
|
|
5901
5894
|
};
|
|
5902
5895
|
|
|
5903
|
-
function point$
|
|
5896
|
+
function point$1(that, x, y) {
|
|
5904
5897
|
var x1 = that._x1,
|
|
5905
5898
|
y1 = that._y1,
|
|
5906
5899
|
x2 = that._x2,
|
|
5907
5900
|
y2 = that._y2;
|
|
5908
5901
|
|
|
5909
|
-
if (that._l01_a > epsilon
|
|
5902
|
+
if (that._l01_a > epsilon) {
|
|
5910
5903
|
var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,
|
|
5911
5904
|
n = 3 * that._l01_a * (that._l01_a + that._l12_a);
|
|
5912
5905
|
x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
|
|
5913
5906
|
y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
|
|
5914
5907
|
}
|
|
5915
5908
|
|
|
5916
|
-
if (that._l23_a > epsilon
|
|
5909
|
+
if (that._l23_a > epsilon) {
|
|
5917
5910
|
var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,
|
|
5918
5911
|
m = 3 * that._l23_a * (that._l23_a + that._l12_a);
|
|
5919
5912
|
x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
|
|
@@ -5923,12 +5916,12 @@
|
|
|
5923
5916
|
that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
|
|
5924
5917
|
}
|
|
5925
5918
|
|
|
5926
|
-
function CatmullRom
|
|
5919
|
+
function CatmullRom(context, alpha) {
|
|
5927
5920
|
this._context = context;
|
|
5928
5921
|
this._alpha = alpha;
|
|
5929
5922
|
}
|
|
5930
5923
|
|
|
5931
|
-
CatmullRom
|
|
5924
|
+
CatmullRom.prototype = {
|
|
5932
5925
|
areaStart: function() {
|
|
5933
5926
|
this._line = 0;
|
|
5934
5927
|
},
|
|
@@ -5963,7 +5956,7 @@
|
|
|
5963
5956
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
5964
5957
|
case 1: this._point = 2; break;
|
|
5965
5958
|
case 2: this._point = 3; // proceed
|
|
5966
|
-
default: point$
|
|
5959
|
+
default: point$1(this, x, y); break;
|
|
5967
5960
|
}
|
|
5968
5961
|
|
|
5969
5962
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
@@ -5976,7 +5969,7 @@
|
|
|
5976
5969
|
var curveCatmullRom = (function custom(alpha) {
|
|
5977
5970
|
|
|
5978
5971
|
function catmullRom(context) {
|
|
5979
|
-
return alpha ? new CatmullRom
|
|
5972
|
+
return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
|
|
5980
5973
|
}
|
|
5981
5974
|
|
|
5982
5975
|
catmullRom.alpha = function(alpha) {
|
|
@@ -5986,7 +5979,7 @@
|
|
|
5986
5979
|
return catmullRom;
|
|
5987
5980
|
})(0.5);
|
|
5988
5981
|
|
|
5989
|
-
function sign
|
|
5982
|
+
function sign(x) {
|
|
5990
5983
|
return x < 0 ? -1 : 1;
|
|
5991
5984
|
}
|
|
5992
5985
|
|
|
@@ -5994,17 +5987,17 @@
|
|
|
5994
5987
|
// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
|
|
5995
5988
|
// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
|
|
5996
5989
|
// NOV(II), P. 443, 1990.
|
|
5997
|
-
function slope3
|
|
5990
|
+
function slope3(that, x2, y2) {
|
|
5998
5991
|
var h0 = that._x1 - that._x0,
|
|
5999
5992
|
h1 = x2 - that._x1,
|
|
6000
5993
|
s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
|
|
6001
5994
|
s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),
|
|
6002
5995
|
p = (s0 * h1 + s1 * h0) / (h0 + h1);
|
|
6003
|
-
return (sign
|
|
5996
|
+
return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
|
|
6004
5997
|
}
|
|
6005
5998
|
|
|
6006
5999
|
// Calculate a one-sided slope.
|
|
6007
|
-
function slope2
|
|
6000
|
+
function slope2(that, t) {
|
|
6008
6001
|
var h = that._x1 - that._x0;
|
|
6009
6002
|
return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
|
|
6010
6003
|
}
|
|
@@ -6012,7 +6005,7 @@
|
|
|
6012
6005
|
// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
|
|
6013
6006
|
// "you can express cubic Hermite interpolation in terms of cubic Bézier curves
|
|
6014
6007
|
// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
|
|
6015
|
-
function point
|
|
6008
|
+
function point(that, t0, t1) {
|
|
6016
6009
|
var x0 = that._x0,
|
|
6017
6010
|
y0 = that._y0,
|
|
6018
6011
|
x1 = that._x1,
|
|
@@ -6021,11 +6014,11 @@
|
|
|
6021
6014
|
that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
|
|
6022
6015
|
}
|
|
6023
6016
|
|
|
6024
|
-
function MonotoneX
|
|
6017
|
+
function MonotoneX(context) {
|
|
6025
6018
|
this._context = context;
|
|
6026
6019
|
}
|
|
6027
6020
|
|
|
6028
|
-
MonotoneX
|
|
6021
|
+
MonotoneX.prototype = {
|
|
6029
6022
|
areaStart: function() {
|
|
6030
6023
|
this._line = 0;
|
|
6031
6024
|
},
|
|
@@ -6041,7 +6034,7 @@
|
|
|
6041
6034
|
lineEnd: function() {
|
|
6042
6035
|
switch (this._point) {
|
|
6043
6036
|
case 2: this._context.lineTo(this._x1, this._y1); break;
|
|
6044
|
-
case 3: point
|
|
6037
|
+
case 3: point(this, this._t0, slope2(this, this._t0)); break;
|
|
6045
6038
|
}
|
|
6046
6039
|
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
6047
6040
|
this._line = 1 - this._line;
|
|
@@ -6054,8 +6047,8 @@
|
|
|
6054
6047
|
switch (this._point) {
|
|
6055
6048
|
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
6056
6049
|
case 1: this._point = 2; break;
|
|
6057
|
-
case 2: this._point = 3; point
|
|
6058
|
-
default: point
|
|
6050
|
+
case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;
|
|
6051
|
+
default: point(this, this._t0, t1 = slope3(this, x, y)); break;
|
|
6059
6052
|
}
|
|
6060
6053
|
|
|
6061
6054
|
this._x0 = this._x1, this._x1 = x;
|
|
@@ -6064,23 +6057,8 @@
|
|
|
6064
6057
|
}
|
|
6065
6058
|
};
|
|
6066
6059
|
|
|
6067
|
-
function
|
|
6068
|
-
this
|
|
6069
|
-
}
|
|
6070
|
-
|
|
6071
|
-
(MonotoneY$1.prototype = Object.create(MonotoneX$1.prototype)).point = function(x, y) {
|
|
6072
|
-
MonotoneX$1.prototype.point.call(this, y, x);
|
|
6073
|
-
};
|
|
6074
|
-
|
|
6075
|
-
function ReflectContext$1(context) {
|
|
6076
|
-
this._context = context;
|
|
6077
|
-
}
|
|
6078
|
-
|
|
6079
|
-
ReflectContext$1.prototype = {
|
|
6080
|
-
moveTo: function(x, y) { this._context.moveTo(y, x); },
|
|
6081
|
-
closePath: function() { this._context.closePath(); },
|
|
6082
|
-
lineTo: function(x, y) { this._context.lineTo(y, x); },
|
|
6083
|
-
bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }
|
|
6060
|
+
(Object.create(MonotoneX.prototype)).point = function(x, y) {
|
|
6061
|
+
MonotoneX.prototype.point.call(this, y, x);
|
|
6084
6062
|
};
|
|
6085
6063
|
|
|
6086
6064
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
@@ -7834,7 +7812,7 @@
|
|
|
7834
7812
|
return d3NoteText;
|
|
7835
7813
|
}(Type);
|
|
7836
7814
|
|
|
7837
|
-
|
|
7815
|
+
customType(d3NoteText, {
|
|
7838
7816
|
className: "label",
|
|
7839
7817
|
note: { align: "middle" }
|
|
7840
7818
|
});
|
|
@@ -7849,25 +7827,25 @@
|
|
|
7849
7827
|
connector: { type: "elbow" }
|
|
7850
7828
|
});
|
|
7851
7829
|
|
|
7852
|
-
|
|
7830
|
+
customType(d3Callout, {
|
|
7853
7831
|
className: "callout curve",
|
|
7854
7832
|
connector: { type: "curve" }
|
|
7855
7833
|
});
|
|
7856
7834
|
|
|
7857
|
-
|
|
7835
|
+
customType(Type, {
|
|
7858
7836
|
className: "badge",
|
|
7859
7837
|
subject: { type: "badge" },
|
|
7860
7838
|
disable: ["connector", "note"]
|
|
7861
7839
|
});
|
|
7862
7840
|
|
|
7863
|
-
|
|
7841
|
+
customType(d3NoteText, {
|
|
7864
7842
|
className: "callout circle",
|
|
7865
7843
|
subject: { type: "circle" },
|
|
7866
7844
|
note: { lineType: "horizontal" },
|
|
7867
7845
|
connector: { type: "elbow" }
|
|
7868
7846
|
});
|
|
7869
7847
|
|
|
7870
|
-
|
|
7848
|
+
customType(d3NoteText, {
|
|
7871
7849
|
className: "callout rect",
|
|
7872
7850
|
subject: { type: "rect" },
|
|
7873
7851
|
note: { lineType: "horizontal" },
|
|
@@ -7910,7 +7888,7 @@
|
|
|
7910
7888
|
return ThresholdMap;
|
|
7911
7889
|
}(d3Callout);
|
|
7912
7890
|
|
|
7913
|
-
|
|
7891
|
+
customType(ThresholdMap, {
|
|
7914
7892
|
className: "callout xythreshold",
|
|
7915
7893
|
subject: { type: "threshold" }
|
|
7916
7894
|
});
|
|
@@ -8226,7 +8204,7 @@
|
|
|
8226
8204
|
if (inner === void 0) { inner = false; }
|
|
8227
8205
|
var point = pointOnArc(angle, radius);
|
|
8228
8206
|
var rotation = angle * 180 / Math.PI + (inner === true ? 180 : 0);
|
|
8229
|
-
return "translate("
|
|
8207
|
+
return "translate(".concat(point.x, ", ").concat(point.y, ") rotate(").concat(rotation, ")");
|
|
8230
8208
|
}
|
|
8231
8209
|
function indicatorTween(newAngle, radius, inner) {
|
|
8232
8210
|
if (inner === void 0) { inner = false; }
|
|
@@ -8327,7 +8305,7 @@
|
|
|
8327
8305
|
var size = this.calcSize(textElement, w, h);
|
|
8328
8306
|
var x2 = x + w / 2 - size.width / 2 * size.scale;
|
|
8329
8307
|
var y2 = y + h / 2 - size.height / 2 * size.scale;
|
|
8330
|
-
textElement.attr("transform", "translate("
|
|
8308
|
+
textElement.attr("transform", "translate(".concat(x2, ", ").concat(y2, ") scale(").concat(size.scale, ")"));
|
|
8331
8309
|
};
|
|
8332
8310
|
Gauge.prototype.calcWidth = function () {
|
|
8333
8311
|
return Math.min(this.width(), this.height(), this.maxDiameter());
|
|
@@ -8504,7 +8482,7 @@
|
|
|
8504
8482
|
Gauge.prototype.publish("emptyColor", "lightgrey", "html-color", "Color of the empty portion of the gauge");
|
|
8505
8483
|
Gauge.prototype.publish("tickColor", "black", "html-color", "Color of the tick");
|
|
8506
8484
|
|
|
8507
|
-
var css_248z$6 = ".chart_Pie>g>text
|
|
8485
|
+
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}";
|
|
8508
8486
|
styleInject(css_248z$6);
|
|
8509
8487
|
|
|
8510
8488
|
var Pie = /** @class */ (function (_super) {
|
|
@@ -8574,7 +8552,7 @@
|
|
|
8574
8552
|
}
|
|
8575
8553
|
}
|
|
8576
8554
|
if (this.showSeriesValue()) {
|
|
8577
|
-
label += " : "
|
|
8555
|
+
label += " : ".concat(this._seriesValueFormatter(d.data[1]));
|
|
8578
8556
|
}
|
|
8579
8557
|
if (this.showSeriesPercentage()) {
|
|
8580
8558
|
var sum = this._totalValue;
|
|
@@ -8583,7 +8561,7 @@
|
|
|
8583
8561
|
sum = dm.sum;
|
|
8584
8562
|
}
|
|
8585
8563
|
var perc = (d.data[1] / sum) * 100;
|
|
8586
|
-
label += " : "
|
|
8564
|
+
label += " : ".concat(this._seriesPercentageFormatter(perc), "%");
|
|
8587
8565
|
}
|
|
8588
8566
|
return label;
|
|
8589
8567
|
};
|
|
@@ -8633,7 +8611,7 @@
|
|
|
8633
8611
|
.padRadius(outerRadius)
|
|
8634
8612
|
.outerRadius(outerRadius);
|
|
8635
8613
|
this._quadIdxArr = [[], [], [], []];
|
|
8636
|
-
var data = __spreadArray([], this.data()).sort(function (a, b) {
|
|
8614
|
+
var data = __spreadArray([], this.data(), true).sort(function (a, b) {
|
|
8637
8615
|
return a[1] - b[1] > 0 ? -1 : 1;
|
|
8638
8616
|
});
|
|
8639
8617
|
var arc = this._slices.selectAll(".arc").data(this.d3Pie(data), function (d) { return d.data[0]; });
|
|
@@ -8727,7 +8705,7 @@
|
|
|
8727
8705
|
.attr("points", function (d, i) {
|
|
8728
8706
|
var pos = context.d3LabelArc.centroid(d);
|
|
8729
8707
|
var pos1 = context.d3Arc.centroid(d);
|
|
8730
|
-
var pos2 = __spreadArray([], pos);
|
|
8708
|
+
var pos2 = __spreadArray([], pos, true);
|
|
8731
8709
|
pos[0] = labelRadius * (context.isLeftSide(midAngle(d)) ? 1 : -1);
|
|
8732
8710
|
pos[1] = context._labelPositions[i].top;
|
|
8733
8711
|
return [pos1, pos2, pos];
|
|
@@ -8916,7 +8894,7 @@
|
|
|
8916
8894
|
Heat.prototype.layerEnter = function (host, element, duration) {
|
|
8917
8895
|
if (duration === void 0) { duration = 250; }
|
|
8918
8896
|
_super.prototype.layerEnter.call(this, host, element, duration);
|
|
8919
|
-
this._domForeignObject = this.svg.insert("foreignObject", "#"
|
|
8897
|
+
this._domForeignObject = this.svg.insert("foreignObject", "#".concat(this.id() + "_clippath"));
|
|
8920
8898
|
this._domCanvas = this._domForeignObject.append("xhtml:body")
|
|
8921
8899
|
.style("margin", "0px")
|
|
8922
8900
|
.style("padding", "0px")
|
|
@@ -9210,8 +9188,8 @@
|
|
|
9210
9188
|
return hexbin.radius(1);
|
|
9211
9189
|
}
|
|
9212
9190
|
|
|
9213
|
-
var css_248z$
|
|
9214
|
-
styleInject(css_248z$
|
|
9191
|
+
var css_248z$5 = ".chart_HexBin .hexagon{fill:none;stroke:#000;stroke-width:.5px}.chart_HexBin .hexagon.selected{stroke:red}";
|
|
9192
|
+
styleInject(css_248z$5);
|
|
9215
9193
|
|
|
9216
9194
|
var HexBin = /** @class */ (function (_super) {
|
|
9217
9195
|
__extends(HexBin, _super);
|
|
@@ -9224,8 +9202,8 @@
|
|
|
9224
9202
|
var seriesExtent = common.extent(d, function (d) { return d.label; });
|
|
9225
9203
|
var labelExtent = common.extent(d, function (d) { return d.value; });
|
|
9226
9204
|
return _this.tooltipFormat({
|
|
9227
|
-
series: seriesExtent[0] === seriesExtent[1] ? seriesExtent[0] : seriesExtent[0]
|
|
9228
|
-
label: labelExtent[0] === labelExtent[1] ? labelExtent[0] : labelExtent[0]
|
|
9205
|
+
series: seriesExtent[0] === seriesExtent[1] ? seriesExtent[0] : "".concat(seriesExtent[0], " -> ").concat(seriesExtent[1]),
|
|
9206
|
+
label: labelExtent[0] === labelExtent[1] ? labelExtent[0] : "".concat(labelExtent[0], " -> ").concat(labelExtent[1]),
|
|
9229
9207
|
value: d.length
|
|
9230
9208
|
});
|
|
9231
9209
|
});
|
|
@@ -9319,8 +9297,8 @@
|
|
|
9319
9297
|
HexBin.prototype.publish("useClonedPalette", false, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] });
|
|
9320
9298
|
HexBin.prototype.publish("binSize", 20, "number", "Bin radius", null, { range: { min: 1, max: 300, step: 1 } });
|
|
9321
9299
|
|
|
9322
|
-
var css_248z$
|
|
9323
|
-
styleInject(css_248z$
|
|
9300
|
+
var css_248z$4 = ".chart_Line .dataLine{fill:none;stroke:#4682b4;stroke-width:1.5px}";
|
|
9301
|
+
styleInject(css_248z$4);
|
|
9324
9302
|
|
|
9325
9303
|
var Line = /** @class */ (function (_super) {
|
|
9326
9304
|
__extends(Line, _super);
|
|
@@ -9457,7 +9435,7 @@
|
|
|
9457
9435
|
}
|
|
9458
9436
|
this._g
|
|
9459
9437
|
.style("shape-rendering", "crispEdges")
|
|
9460
|
-
.attr("transform", "translate("
|
|
9438
|
+
.attr("transform", "translate(".concat(transX, ",").concat(transY, ")rotate(").concat(rotate, ")scale(").concat(s, ")"));
|
|
9461
9439
|
this._leftLine
|
|
9462
9440
|
.attr("fill", lineColor)
|
|
9463
9441
|
.attr("height", candleWidth)
|
|
@@ -9512,7 +9490,7 @@
|
|
|
9512
9490
|
.attr("fill", this.textColor())
|
|
9513
9491
|
.attr("x", 0)
|
|
9514
9492
|
.attr("y", 0)
|
|
9515
|
-
.attr("transform", "translate("
|
|
9493
|
+
.attr("transform", "translate(".concat(q0x, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9516
9494
|
.attr("font-size", labelFontSize)
|
|
9517
9495
|
.attr("text-anchor", labelAnchor)
|
|
9518
9496
|
.attr("alignment-baseline", "hanging")
|
|
@@ -9524,7 +9502,7 @@
|
|
|
9524
9502
|
.attr("fill", this.textColor())
|
|
9525
9503
|
.attr("x", 0)
|
|
9526
9504
|
.attr("y", 0)
|
|
9527
|
-
.attr("transform", "translate("
|
|
9505
|
+
.attr("transform", "translate(".concat(q1x, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9528
9506
|
.attr("font-size", labelFontSize)
|
|
9529
9507
|
.attr("text-anchor", labelAnchor)
|
|
9530
9508
|
.attr("alignment-baseline", "middle")
|
|
@@ -9536,7 +9514,7 @@
|
|
|
9536
9514
|
.attr("fill", this.textColor())
|
|
9537
9515
|
.attr("x", 0)
|
|
9538
9516
|
.attr("y", 0)
|
|
9539
|
-
.attr("transform", "translate("
|
|
9517
|
+
.attr("transform", "translate(".concat(q2x, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9540
9518
|
.attr("font-size", labelFontSize)
|
|
9541
9519
|
.attr("text-anchor", labelAnchor)
|
|
9542
9520
|
.attr("alignment-baseline", "middle")
|
|
@@ -9548,7 +9526,7 @@
|
|
|
9548
9526
|
.attr("fill", this.textColor())
|
|
9549
9527
|
.attr("x", 0)
|
|
9550
9528
|
.attr("y", 0)
|
|
9551
|
-
.attr("transform", "translate("
|
|
9529
|
+
.attr("transform", "translate(".concat(q3x, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9552
9530
|
.attr("font-size", labelFontSize)
|
|
9553
9531
|
.attr("text-anchor", labelAnchor)
|
|
9554
9532
|
.attr("alignment-baseline", "middle")
|
|
@@ -9560,7 +9538,7 @@
|
|
|
9560
9538
|
.attr("fill", this.textColor())
|
|
9561
9539
|
.attr("x", 0)
|
|
9562
9540
|
.attr("y", 0)
|
|
9563
|
-
.attr("transform", "translate("
|
|
9541
|
+
.attr("transform", "translate(".concat(q4x + lineWidth, ", ").concat(dataTop - padding, ")rotate(").concat(upperTextRotation, ")scale(").concat(textScale, ")"))
|
|
9564
9542
|
.attr("font-size", labelFontSize)
|
|
9565
9543
|
.attr("text-anchor", labelAnchor)
|
|
9566
9544
|
.attr("alignment-baseline", "baseline")
|
|
@@ -9572,7 +9550,7 @@
|
|
|
9572
9550
|
.attr("fill", this.textColor())
|
|
9573
9551
|
.attr("x", 0)
|
|
9574
9552
|
.attr("y", 0)
|
|
9575
|
-
.attr("transform", "translate("
|
|
9553
|
+
.attr("transform", "translate(".concat(q0x, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9576
9554
|
.attr("font-size", valueFontSize)
|
|
9577
9555
|
.attr("text-anchor", valueAnchor)
|
|
9578
9556
|
.attr("alignment-baseline", "hanging")
|
|
@@ -9584,7 +9562,7 @@
|
|
|
9584
9562
|
.attr("fill", this.textColor())
|
|
9585
9563
|
.attr("x", 0)
|
|
9586
9564
|
.attr("y", 0)
|
|
9587
|
-
.attr("transform", "translate("
|
|
9565
|
+
.attr("transform", "translate(".concat(q1x, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9588
9566
|
.attr("font-size", valueFontSize)
|
|
9589
9567
|
.attr("text-anchor", valueAnchor)
|
|
9590
9568
|
.attr("alignment-baseline", "middle")
|
|
@@ -9596,7 +9574,7 @@
|
|
|
9596
9574
|
.attr("fill", this.textColor())
|
|
9597
9575
|
.attr("x", 0)
|
|
9598
9576
|
.attr("y", 0)
|
|
9599
|
-
.attr("transform", "translate("
|
|
9577
|
+
.attr("transform", "translate(".concat(q2x, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9600
9578
|
.attr("font-size", valueFontSize)
|
|
9601
9579
|
.attr("text-anchor", valueAnchor)
|
|
9602
9580
|
.attr("alignment-baseline", "middle")
|
|
@@ -9608,7 +9586,7 @@
|
|
|
9608
9586
|
.attr("fill", this.textColor())
|
|
9609
9587
|
.attr("x", 0)
|
|
9610
9588
|
.attr("y", 0)
|
|
9611
|
-
.attr("transform", "translate("
|
|
9589
|
+
.attr("transform", "translate(".concat(q3x, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9612
9590
|
.attr("font-size", valueFontSize)
|
|
9613
9591
|
.attr("text-anchor", valueAnchor)
|
|
9614
9592
|
.attr("alignment-baseline", "middle")
|
|
@@ -9620,7 +9598,7 @@
|
|
|
9620
9598
|
.attr("fill", this.textColor())
|
|
9621
9599
|
.attr("x", 0)
|
|
9622
9600
|
.attr("y", 0)
|
|
9623
|
-
.attr("transform", "translate("
|
|
9601
|
+
.attr("transform", "translate(".concat(q4x + lineWidth, ", ").concat(dataBottom + padding, ")rotate(").concat(lowerTextRotation, ")scale(").concat(textScale, ")"))
|
|
9624
9602
|
.attr("font-size", valueFontSize)
|
|
9625
9603
|
.attr("text-anchor", valueAnchor)
|
|
9626
9604
|
.attr("alignment-baseline", "baseline")
|
|
@@ -9645,8 +9623,8 @@
|
|
|
9645
9623
|
QuartileCandlestick.prototype.publish("upperTextRotation", -60, "number", "Rotation of label text (degrees)");
|
|
9646
9624
|
QuartileCandlestick.prototype.publish("lowerTextRotation", -60, "number", "Rotation of value text (degrees)");
|
|
9647
9625
|
|
|
9648
|
-
var css_248z$
|
|
9649
|
-
styleInject(css_248z$
|
|
9626
|
+
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}";
|
|
9627
|
+
styleInject(css_248z$3);
|
|
9650
9628
|
|
|
9651
9629
|
var Radar = /** @class */ (function (_super) {
|
|
9652
9630
|
__extends(Radar, _super);
|
|
@@ -9729,7 +9707,7 @@
|
|
|
9729
9707
|
var max_label_h = this.fontSize();
|
|
9730
9708
|
var max_label_w = 0;
|
|
9731
9709
|
flatData.filter(function (n) { return n.colIdx === 1; }).forEach(function (n) {
|
|
9732
|
-
var isize = _super.prototype.textSize.call(_this, n.label, ""
|
|
9710
|
+
var isize = _super.prototype.textSize.call(_this, n.label, "".concat(_this.fontFamily()), _this.fontSize());
|
|
9733
9711
|
if (max_label_w < isize.width)
|
|
9734
9712
|
max_label_w = isize.width;
|
|
9735
9713
|
});
|
|
@@ -9921,8 +9899,8 @@
|
|
|
9921
9899
|
Radar.prototype.publish("fontSize", 16, "number", "fontSize");
|
|
9922
9900
|
Radar.prototype.publish("labelPaddingRatio", 0.9, "number", "labelPaddingRatio");
|
|
9923
9901
|
|
|
9924
|
-
var css_248z$
|
|
9925
|
-
styleInject(css_248z$
|
|
9902
|
+
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}";
|
|
9903
|
+
styleInject(css_248z$2);
|
|
9926
9904
|
|
|
9927
9905
|
var RadialBar = /** @class */ (function (_super) {
|
|
9928
9906
|
__extends(RadialBar, _super);
|
|
@@ -9956,7 +9934,7 @@
|
|
|
9956
9934
|
var _this = this;
|
|
9957
9935
|
_super.prototype.update.call(this, domNode, element);
|
|
9958
9936
|
var context = this;
|
|
9959
|
-
var maxValue = Math.max.apply(Math, __spreadArray([this.valueDomainHigh_exists() ? this.valueDomainHigh() : 0], this.data().map(function (d) { return d[1]; })));
|
|
9937
|
+
var maxValue = Math.max.apply(Math, __spreadArray([this.valueDomainHigh_exists() ? this.valueDomainHigh() : 0], this.data().map(function (d) { return d[1]; }), false));
|
|
9960
9938
|
this._valueScale
|
|
9961
9939
|
.domain([0, maxValue])
|
|
9962
9940
|
.range([0, this.radians(this.valueMaxAngle())]);
|
|
@@ -10270,7 +10248,7 @@
|
|
|
10270
10248
|
StatChart.prototype.publish("candleHeight", 20, "number", "Height of candle widget (pixels)");
|
|
10271
10249
|
StatChart.prototype.publish("domainPadding", 10, "number", "Domain value padding");
|
|
10272
10250
|
|
|
10273
|
-
var Step
|
|
10251
|
+
var Step = /** @class */ (function (_super) {
|
|
10274
10252
|
__extends(Step, _super);
|
|
10275
10253
|
function Step() {
|
|
10276
10254
|
var _this = _super.call(this) || this;
|
|
@@ -10280,10 +10258,10 @@
|
|
|
10280
10258
|
}
|
|
10281
10259
|
return Step;
|
|
10282
10260
|
}(Scatter));
|
|
10283
|
-
Step
|
|
10261
|
+
Step.prototype._class += " chart_Step";
|
|
10284
10262
|
|
|
10285
|
-
var css_248z$
|
|
10286
|
-
styleInject(css_248z$
|
|
10263
|
+
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}";
|
|
10264
|
+
styleInject(css_248z$1);
|
|
10287
10265
|
|
|
10288
10266
|
var TEXT = "text";
|
|
10289
10267
|
var HTML = "html";
|
|
@@ -10461,9 +10439,9 @@
|
|
|
10461
10439
|
Summary.prototype.publish("minWidth", 225, "number", "Minimum Width");
|
|
10462
10440
|
Summary.prototype.publish("minHeight", 150, "number", "Minimum Height");
|
|
10463
10441
|
Summary.prototype.publish("playInterval", null, "number", "Play Interval", null, { optional: true });
|
|
10464
|
-
var playInterval = Summary.prototype.playInterval;
|
|
10442
|
+
var playInterval$1 = Summary.prototype.playInterval;
|
|
10465
10443
|
Summary.prototype.playInterval = function (_) {
|
|
10466
|
-
var retVal = playInterval.apply(this, arguments);
|
|
10444
|
+
var retVal = playInterval$1.apply(this, arguments);
|
|
10467
10445
|
if (arguments.length) {
|
|
10468
10446
|
if (this._playIntervalHandle) {
|
|
10469
10447
|
clearInterval(this._playIntervalHandle);
|
|
@@ -10535,13 +10513,13 @@
|
|
|
10535
10513
|
drawText(label, mainFontSize + p, subFontSize, context.labelAnchor());
|
|
10536
10514
|
function drawText(text, y, fontSize, anchorMode) {
|
|
10537
10515
|
ctx.textBaseline = "top";
|
|
10538
|
-
ctx.font = fontSize
|
|
10516
|
+
ctx.font = "".concat(fontSize, "px ").concat(fontFamily);
|
|
10539
10517
|
ctx.fillStyle = fontColor;
|
|
10540
10518
|
var measurement = ctx.measureText(text);
|
|
10541
10519
|
if (measurement.width > (size.width - (p * 2))) {
|
|
10542
10520
|
var fontSizeMult = (size.width - (p * 2)) / measurement.width;
|
|
10543
10521
|
fontSize = fontSize * fontSizeMult;
|
|
10544
|
-
ctx.font = fontSize
|
|
10522
|
+
ctx.font = "".concat(fontSize, "px ").concat(fontFamily);
|
|
10545
10523
|
measurement = ctx.measureText(text);
|
|
10546
10524
|
}
|
|
10547
10525
|
var x = getTextOffsetX(measurement.width, anchorMode);
|
|
@@ -10552,12 +10530,12 @@
|
|
|
10552
10530
|
if (typeof text === "undefined")
|
|
10553
10531
|
return;
|
|
10554
10532
|
ctx.textBaseline = context.iconBaseline();
|
|
10555
|
-
ctx.font = fontSize
|
|
10533
|
+
ctx.font = "".concat(fontSize, "px FontAwesome");
|
|
10556
10534
|
ctx.fillStyle = fontColor;
|
|
10557
10535
|
var measurement = ctx.measureText(text);
|
|
10558
10536
|
if (measurement.width > (size.width - (p * 2))) {
|
|
10559
10537
|
var fontSizeMult = (size.width - (p * 2)) / measurement.width;
|
|
10560
|
-
ctx.font = fontSize * fontSizeMult
|
|
10538
|
+
ctx.font = "".concat(fontSize * fontSizeMult, "px FontAwesome");
|
|
10561
10539
|
measurement = ctx.measureText(text);
|
|
10562
10540
|
}
|
|
10563
10541
|
var x = getTextOffsetX(measurement.width, anchorMode);
|
|
@@ -10612,9 +10590,9 @@
|
|
|
10612
10590
|
SummaryC.prototype.publish("iconOpacity", 0.3, "number", "Opacity of icon text (0..1)");
|
|
10613
10591
|
SummaryC.prototype.publish("paddingSizeRatio", 0.1, "number", "Ratio of the smallest dimension for edge padding (0..1)");
|
|
10614
10592
|
SummaryC.prototype.publish("iconSizeRatio", 0.9, "number", "Ratio of the height for icon size (0..1)");
|
|
10615
|
-
var playInterval
|
|
10593
|
+
var playInterval = SummaryC.prototype.playInterval;
|
|
10616
10594
|
SummaryC.prototype.playInterval = function (_) {
|
|
10617
|
-
var retVal = playInterval
|
|
10595
|
+
var retVal = playInterval.apply(this, arguments);
|
|
10618
10596
|
if (arguments.length) {
|
|
10619
10597
|
if (this._playIntervalHandle) {
|
|
10620
10598
|
clearInterval(this._playIntervalHandle);
|
|
@@ -11011,8 +10989,8 @@
|
|
|
11011
10989
|
rectangular: rectangularSpiral
|
|
11012
10990
|
};
|
|
11013
10991
|
|
|
11014
|
-
var css_248z
|
|
11015
|
-
styleInject(css_248z
|
|
10992
|
+
var css_248z = ".other_Wordcloud text{cursor:pointer}";
|
|
10993
|
+
styleInject(css_248z);
|
|
11016
10994
|
|
|
11017
10995
|
var WordCloud = /** @class */ (function (_super) {
|
|
11018
10996
|
__extends(WordCloud, _super);
|
|
@@ -11209,7 +11187,7 @@
|
|
|
11209
11187
|
exports.RadialBar = RadialBar;
|
|
11210
11188
|
exports.Scatter = Scatter;
|
|
11211
11189
|
exports.StatChart = StatChart;
|
|
11212
|
-
exports.Step = Step
|
|
11190
|
+
exports.Step = Step;
|
|
11213
11191
|
exports.Summary = Summary;
|
|
11214
11192
|
exports.SummaryC = SummaryC;
|
|
11215
11193
|
exports.WordCloud = WordCloud;
|
|
@@ -11217,5 +11195,5 @@
|
|
|
11217
11195
|
|
|
11218
11196
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11219
11197
|
|
|
11220
|
-
}))
|
|
11198
|
+
}));
|
|
11221
11199
|
//# sourceMappingURL=index.js.map
|