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