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