pace-chart-lib 1.0.56 → 1.0.57
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.
|
@@ -2392,7 +2392,7 @@ define$1(Hcl, hcl, extend$1(Color$2, {
|
|
|
2392
2392
|
}
|
|
2393
2393
|
}));
|
|
2394
2394
|
const constant$9 = (x2) => () => x2;
|
|
2395
|
-
function linear$
|
|
2395
|
+
function linear$3(a2, d) {
|
|
2396
2396
|
return function(t) {
|
|
2397
2397
|
return a2 + t * d;
|
|
2398
2398
|
};
|
|
@@ -2409,7 +2409,7 @@ function gamma$1(y2) {
|
|
|
2409
2409
|
}
|
|
2410
2410
|
function nogamma$1(a2, b) {
|
|
2411
2411
|
var d = b - a2;
|
|
2412
|
-
return d ? linear$
|
|
2412
|
+
return d ? linear$3(a2, d) : constant$9(isNaN(a2) ? b : a2);
|
|
2413
2413
|
}
|
|
2414
2414
|
const interpolateRgb$1 = (function rgbGamma(y2) {
|
|
2415
2415
|
var color2 = gamma$1(y2);
|
|
@@ -2634,7 +2634,7 @@ const interpolateZoom = (function zoomRho(rho, rho2, rho4) {
|
|
|
2634
2634
|
];
|
|
2635
2635
|
};
|
|
2636
2636
|
} else {
|
|
2637
|
-
var d1 = Math.sqrt(d2),
|
|
2637
|
+
var d1 = Math.sqrt(d2), b02 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b12 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b02 * b02 + 1) - b02), r1 = Math.log(Math.sqrt(b12 * b12 + 1) - b12);
|
|
2638
2638
|
S = (r1 - r0) / rho;
|
|
2639
2639
|
i = function(t) {
|
|
2640
2640
|
var s2 = t * S, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s2 + r0) - sinh(r0));
|
|
@@ -3358,49 +3358,85 @@ Transition$1.prototype = {
|
|
|
3358
3358
|
end: transition_end$1,
|
|
3359
3359
|
[Symbol.iterator]: selection_prototype$1[Symbol.iterator]
|
|
3360
3360
|
};
|
|
3361
|
+
const linear$2 = (t) => +t;
|
|
3362
|
+
function cubicIn(t) {
|
|
3363
|
+
return t * t * t;
|
|
3364
|
+
}
|
|
3365
|
+
function cubicOut(t) {
|
|
3366
|
+
return --t * t * t + 1;
|
|
3367
|
+
}
|
|
3361
3368
|
function cubicInOut$1(t) {
|
|
3362
3369
|
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
|
3363
3370
|
}
|
|
3364
3371
|
function tpmt(x2) {
|
|
3365
3372
|
return (Math.pow(2, -10 * x2) - 9765625e-10) * 1.0009775171065494;
|
|
3366
3373
|
}
|
|
3374
|
+
var b1 = 4 / 11, b2 = 6 / 11, b3 = 8 / 11, b4 = 3 / 4, b5 = 9 / 11, b6 = 10 / 11, b7 = 15 / 16, b8 = 21 / 22, b9 = 63 / 64, b0 = 1 / b1 / b1;
|
|
3375
|
+
function bounceOut(t) {
|
|
3376
|
+
return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;
|
|
3377
|
+
}
|
|
3378
|
+
var overshoot = 1.70158;
|
|
3379
|
+
(function custom(s2) {
|
|
3380
|
+
s2 = +s2;
|
|
3381
|
+
function backIn(t) {
|
|
3382
|
+
return (t = +t) * t * (s2 * (t - 1) + t);
|
|
3383
|
+
}
|
|
3384
|
+
backIn.overshoot = custom;
|
|
3385
|
+
return backIn;
|
|
3386
|
+
})(overshoot);
|
|
3387
|
+
var backOut = (function custom2(s2) {
|
|
3388
|
+
s2 = +s2;
|
|
3389
|
+
function backOut2(t) {
|
|
3390
|
+
return --t * t * ((t + 1) * s2 + t) + 1;
|
|
3391
|
+
}
|
|
3392
|
+
backOut2.overshoot = custom2;
|
|
3393
|
+
return backOut2;
|
|
3394
|
+
})(overshoot);
|
|
3395
|
+
(function custom3(s2) {
|
|
3396
|
+
s2 = +s2;
|
|
3397
|
+
function backInOut(t) {
|
|
3398
|
+
return ((t *= 2) < 1 ? t * t * ((s2 + 1) * t - s2) : (t -= 2) * t * ((s2 + 1) * t + s2) + 2) / 2;
|
|
3399
|
+
}
|
|
3400
|
+
backInOut.overshoot = custom3;
|
|
3401
|
+
return backInOut;
|
|
3402
|
+
})(overshoot);
|
|
3367
3403
|
var tau$5 = 2 * Math.PI, amplitude = 1, period = 0.3;
|
|
3368
|
-
(function
|
|
3404
|
+
(function custom4(a2, p) {
|
|
3369
3405
|
var s2 = Math.asin(1 / (a2 = Math.max(1, a2))) * (p /= tau$5);
|
|
3370
3406
|
function elasticIn2(t) {
|
|
3371
3407
|
return a2 * tpmt(- --t) * Math.sin((s2 - t) / p);
|
|
3372
3408
|
}
|
|
3373
3409
|
elasticIn2.amplitude = function(a3) {
|
|
3374
|
-
return
|
|
3410
|
+
return custom4(a3, p * tau$5);
|
|
3375
3411
|
};
|
|
3376
3412
|
elasticIn2.period = function(p2) {
|
|
3377
|
-
return
|
|
3413
|
+
return custom4(a2, p2);
|
|
3378
3414
|
};
|
|
3379
3415
|
return elasticIn2;
|
|
3380
3416
|
})(amplitude, period);
|
|
3381
|
-
var elasticOut$1 = (function
|
|
3417
|
+
var elasticOut$1 = (function custom5(a2, p) {
|
|
3382
3418
|
var s2 = Math.asin(1 / (a2 = Math.max(1, a2))) * (p /= tau$5);
|
|
3383
3419
|
function elasticOut2(t) {
|
|
3384
3420
|
return 1 - a2 * tpmt(t = +t) * Math.sin((t + s2) / p);
|
|
3385
3421
|
}
|
|
3386
3422
|
elasticOut2.amplitude = function(a3) {
|
|
3387
|
-
return
|
|
3423
|
+
return custom5(a3, p * tau$5);
|
|
3388
3424
|
};
|
|
3389
3425
|
elasticOut2.period = function(p2) {
|
|
3390
|
-
return
|
|
3426
|
+
return custom5(a2, p2);
|
|
3391
3427
|
};
|
|
3392
3428
|
return elasticOut2;
|
|
3393
3429
|
})(amplitude, period);
|
|
3394
|
-
(function
|
|
3430
|
+
(function custom6(a2, p) {
|
|
3395
3431
|
var s2 = Math.asin(1 / (a2 = Math.max(1, a2))) * (p /= tau$5);
|
|
3396
3432
|
function elasticInOut(t) {
|
|
3397
3433
|
return ((t = t * 2 - 1) < 0 ? a2 * tpmt(-t) * Math.sin((s2 - t) / p) : 2 - a2 * tpmt(t) * Math.sin((s2 + t) / p)) / 2;
|
|
3398
3434
|
}
|
|
3399
3435
|
elasticInOut.amplitude = function(a3) {
|
|
3400
|
-
return
|
|
3436
|
+
return custom6(a3, p * tau$5);
|
|
3401
3437
|
};
|
|
3402
3438
|
elasticInOut.period = function(p2) {
|
|
3403
|
-
return
|
|
3439
|
+
return custom6(a2, p2);
|
|
3404
3440
|
};
|
|
3405
3441
|
return elasticInOut;
|
|
3406
3442
|
})(amplitude, period);
|
|
@@ -4394,12 +4430,12 @@ function clipRectangle(x02, y02, x12, y12) {
|
|
|
4394
4430
|
function polygonInside() {
|
|
4395
4431
|
var winding = 0;
|
|
4396
4432
|
for (var i = 0, n = polygon.length; i < n; ++i) {
|
|
4397
|
-
for (var ring2 = polygon[i], j = 1, m = ring2.length, point3 = ring2[0], a0, a1,
|
|
4398
|
-
a0 =
|
|
4433
|
+
for (var ring2 = polygon[i], j = 1, m = ring2.length, point3 = ring2[0], a0, a1, b02 = point3[0], b12 = point3[1]; j < m; ++j) {
|
|
4434
|
+
a0 = b02, a1 = b12, point3 = ring2[j], b02 = point3[0], b12 = point3[1];
|
|
4399
4435
|
if (a1 <= y12) {
|
|
4400
|
-
if (
|
|
4436
|
+
if (b12 > y12 && (b02 - a0) * (y12 - a1) > (b12 - a1) * (x02 - a0)) ++winding;
|
|
4401
4437
|
} else {
|
|
4402
|
-
if (
|
|
4438
|
+
if (b12 <= y12 && (b02 - a0) * (y12 - a1) < (b12 - a1) * (x02 - a0)) --winding;
|
|
4403
4439
|
}
|
|
4404
4440
|
}
|
|
4405
4441
|
}
|
|
@@ -4873,19 +4909,19 @@ function resampleNone(project) {
|
|
|
4873
4909
|
});
|
|
4874
4910
|
}
|
|
4875
4911
|
function resample$1(project, delta2) {
|
|
4876
|
-
function resampleLineTo(x02, y02, lambda0, a0,
|
|
4912
|
+
function resampleLineTo(x02, y02, lambda0, a0, b02, c0, x12, y12, lambda1, a1, b12, c1, depth, stream) {
|
|
4877
4913
|
var dx = x12 - x02, dy = y12 - y02, d2 = dx * dx + dy * dy;
|
|
4878
4914
|
if (d2 > 4 * delta2 && depth--) {
|
|
4879
|
-
var a2 = a0 + a1, b =
|
|
4880
|
-
if (dz * dz / d2 > delta2 || abs$1((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 || a0 * a1 +
|
|
4881
|
-
resampleLineTo(x02, y02, lambda0, a0,
|
|
4915
|
+
var a2 = a0 + a1, b = b02 + b12, c2 = c0 + c1, m = sqrt$1(a2 * a2 + b * b + c2 * c2), phi2 = asin$2(c2 /= m), lambda2 = abs$1(abs$1(c2) - 1) < epsilon$3 || abs$1(lambda0 - lambda1) < epsilon$3 ? (lambda0 + lambda1) / 2 : atan2$1(b, a2), p = project(lambda2, phi2), x2 = p[0], y2 = p[1], dx2 = x2 - x02, dy2 = y2 - y02, dz = dy * dx2 - dx * dy2;
|
|
4916
|
+
if (dz * dz / d2 > delta2 || abs$1((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 || a0 * a1 + b02 * b12 + c0 * c1 < cosMinDistance) {
|
|
4917
|
+
resampleLineTo(x02, y02, lambda0, a0, b02, c0, x2, y2, lambda2, a2 /= m, b /= m, c2, depth, stream);
|
|
4882
4918
|
stream.point(x2, y2);
|
|
4883
|
-
resampleLineTo(x2, y2, lambda2, a2, b, c2, x12, y12, lambda1, a1,
|
|
4919
|
+
resampleLineTo(x2, y2, lambda2, a2, b, c2, x12, y12, lambda1, a1, b12, c1, depth, stream);
|
|
4884
4920
|
}
|
|
4885
4921
|
}
|
|
4886
4922
|
}
|
|
4887
4923
|
return function(stream) {
|
|
4888
|
-
var lambda00, x002, y002, a00, b00, c00, lambda0, x02, y02, a0,
|
|
4924
|
+
var lambda00, x002, y002, a00, b00, c00, lambda0, x02, y02, a0, b02, c0;
|
|
4889
4925
|
var resampleStream = {
|
|
4890
4926
|
point: point2,
|
|
4891
4927
|
lineStart,
|
|
@@ -4910,7 +4946,7 @@ function resample$1(project, delta2) {
|
|
|
4910
4946
|
}
|
|
4911
4947
|
function linePoint(lambda, phi2) {
|
|
4912
4948
|
var c2 = cartesian([lambda, phi2]), p = project(lambda, phi2);
|
|
4913
|
-
resampleLineTo(x02, y02, lambda0, a0,
|
|
4949
|
+
resampleLineTo(x02, y02, lambda0, a0, b02, c0, x02 = p[0], y02 = p[1], lambda0 = lambda, a0 = c2[0], b02 = c2[1], c0 = c2[2], maxDepth, stream);
|
|
4914
4950
|
stream.point(x02, y02);
|
|
4915
4951
|
}
|
|
4916
4952
|
function lineEnd() {
|
|
@@ -4923,11 +4959,11 @@ function resample$1(project, delta2) {
|
|
|
4923
4959
|
resampleStream.lineEnd = ringEnd;
|
|
4924
4960
|
}
|
|
4925
4961
|
function ringPoint(lambda, phi2) {
|
|
4926
|
-
linePoint(lambda00 = lambda, phi2), x002 = x02, y002 = y02, a00 = a0, b00 =
|
|
4962
|
+
linePoint(lambda00 = lambda, phi2), x002 = x02, y002 = y02, a00 = a0, b00 = b02, c00 = c0;
|
|
4927
4963
|
resampleStream.point = linePoint;
|
|
4928
4964
|
}
|
|
4929
4965
|
function ringEnd() {
|
|
4930
|
-
resampleLineTo(x02, y02, lambda0, a0,
|
|
4966
|
+
resampleLineTo(x02, y02, lambda0, a0, b02, c0, x002, y002, lambda00, a00, b00, c00, maxDepth, stream);
|
|
4931
4967
|
resampleStream.lineEnd = lineEnd;
|
|
4932
4968
|
lineEnd();
|
|
4933
4969
|
}
|
|
@@ -5674,12 +5710,12 @@ function squarifyRatio(ratio, parent, x02, y02, x12, y12) {
|
|
|
5674
5710
|
}
|
|
5675
5711
|
return rows;
|
|
5676
5712
|
}
|
|
5677
|
-
const squarify = (function
|
|
5713
|
+
const squarify = (function custom7(ratio) {
|
|
5678
5714
|
function squarify2(parent, x02, y02, x12, y12) {
|
|
5679
5715
|
squarifyRatio(ratio, parent, x02, y02, x12, y12);
|
|
5680
5716
|
}
|
|
5681
5717
|
squarify2.ratio = function(x2) {
|
|
5682
|
-
return
|
|
5718
|
+
return custom7((x2 = +x2) > 1 ? x2 : 1);
|
|
5683
5719
|
};
|
|
5684
5720
|
return squarify2;
|
|
5685
5721
|
})(phi);
|
|
@@ -6737,12 +6773,12 @@ Cardinal$1.prototype = {
|
|
|
6737
6773
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
6738
6774
|
}
|
|
6739
6775
|
};
|
|
6740
|
-
const cardinal = (function
|
|
6776
|
+
const cardinal = (function custom8(tension) {
|
|
6741
6777
|
function cardinal2(context) {
|
|
6742
6778
|
return new Cardinal$1(context, tension);
|
|
6743
6779
|
}
|
|
6744
6780
|
cardinal2.tension = function(tension2) {
|
|
6745
|
-
return
|
|
6781
|
+
return custom8(+tension2);
|
|
6746
6782
|
};
|
|
6747
6783
|
return cardinal2;
|
|
6748
6784
|
})(0);
|
|
@@ -8641,12 +8677,12 @@ Bundle.prototype = {
|
|
|
8641
8677
|
this._y.push(+y2);
|
|
8642
8678
|
}
|
|
8643
8679
|
};
|
|
8644
|
-
(function
|
|
8680
|
+
(function custom9(beta) {
|
|
8645
8681
|
function bundle(context) {
|
|
8646
8682
|
return beta === 1 ? new Basis(context) : new Bundle(context, beta);
|
|
8647
8683
|
}
|
|
8648
8684
|
bundle.beta = function(beta2) {
|
|
8649
|
-
return
|
|
8685
|
+
return custom9(+beta2);
|
|
8650
8686
|
};
|
|
8651
8687
|
return bundle;
|
|
8652
8688
|
})(0.85);
|
|
@@ -8709,12 +8745,12 @@ Cardinal.prototype = {
|
|
|
8709
8745
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
8710
8746
|
}
|
|
8711
8747
|
};
|
|
8712
|
-
(function
|
|
8748
|
+
(function custom10(tension) {
|
|
8713
8749
|
function cardinal2(context) {
|
|
8714
8750
|
return new Cardinal(context, tension);
|
|
8715
8751
|
}
|
|
8716
8752
|
cardinal2.tension = function(tension2) {
|
|
8717
|
-
return
|
|
8753
|
+
return custom10(+tension2);
|
|
8718
8754
|
};
|
|
8719
8755
|
return cardinal2;
|
|
8720
8756
|
})(0);
|
|
@@ -8772,12 +8808,12 @@ CardinalClosed.prototype = {
|
|
|
8772
8808
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
8773
8809
|
}
|
|
8774
8810
|
};
|
|
8775
|
-
(function
|
|
8811
|
+
(function custom11(tension) {
|
|
8776
8812
|
function cardinal2(context) {
|
|
8777
8813
|
return new CardinalClosed(context, tension);
|
|
8778
8814
|
}
|
|
8779
8815
|
cardinal2.tension = function(tension2) {
|
|
8780
|
-
return
|
|
8816
|
+
return custom11(+tension2);
|
|
8781
8817
|
};
|
|
8782
8818
|
return cardinal2;
|
|
8783
8819
|
})(0);
|
|
@@ -8824,12 +8860,12 @@ CardinalOpen.prototype = {
|
|
|
8824
8860
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
8825
8861
|
}
|
|
8826
8862
|
};
|
|
8827
|
-
(function
|
|
8863
|
+
(function custom12(tension) {
|
|
8828
8864
|
function cardinal2(context) {
|
|
8829
8865
|
return new CardinalOpen(context, tension);
|
|
8830
8866
|
}
|
|
8831
8867
|
cardinal2.tension = function(tension2) {
|
|
8832
|
-
return
|
|
8868
|
+
return custom12(+tension2);
|
|
8833
8869
|
};
|
|
8834
8870
|
return cardinal2;
|
|
8835
8871
|
})(0);
|
|
@@ -8901,12 +8937,12 @@ CatmullRom.prototype = {
|
|
|
8901
8937
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
8902
8938
|
}
|
|
8903
8939
|
};
|
|
8904
|
-
const curveCatmullRom = (function
|
|
8940
|
+
const curveCatmullRom = (function custom13(alpha2) {
|
|
8905
8941
|
function catmullRom(context) {
|
|
8906
8942
|
return alpha2 ? new CatmullRom(context, alpha2) : new Cardinal(context, 0);
|
|
8907
8943
|
}
|
|
8908
8944
|
catmullRom.alpha = function(alpha3) {
|
|
8909
|
-
return
|
|
8945
|
+
return custom13(+alpha3);
|
|
8910
8946
|
};
|
|
8911
8947
|
return catmullRom;
|
|
8912
8948
|
})(0.5);
|
|
@@ -8970,12 +9006,12 @@ CatmullRomClosed.prototype = {
|
|
|
8970
9006
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
8971
9007
|
}
|
|
8972
9008
|
};
|
|
8973
|
-
(function
|
|
9009
|
+
(function custom14(alpha2) {
|
|
8974
9010
|
function catmullRom(context) {
|
|
8975
9011
|
return alpha2 ? new CatmullRomClosed(context, alpha2) : new CardinalClosed(context, 0);
|
|
8976
9012
|
}
|
|
8977
9013
|
catmullRom.alpha = function(alpha3) {
|
|
8978
|
-
return
|
|
9014
|
+
return custom14(+alpha3);
|
|
8979
9015
|
};
|
|
8980
9016
|
return catmullRom;
|
|
8981
9017
|
})(0.5);
|
|
@@ -9028,12 +9064,12 @@ CatmullRomOpen.prototype = {
|
|
|
9028
9064
|
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
9029
9065
|
}
|
|
9030
9066
|
};
|
|
9031
|
-
(function
|
|
9067
|
+
(function custom15(alpha2) {
|
|
9032
9068
|
function catmullRom(context) {
|
|
9033
9069
|
return alpha2 ? new CatmullRomOpen(context, alpha2) : new CardinalOpen(context, 0);
|
|
9034
9070
|
}
|
|
9035
9071
|
catmullRom.alpha = function(alpha3) {
|
|
9036
|
-
return
|
|
9072
|
+
return custom15(+alpha3);
|
|
9037
9073
|
};
|
|
9038
9074
|
return catmullRom;
|
|
9039
9075
|
})(0.5);
|
|
@@ -10949,6 +10985,15 @@ var waterfallKeys = /* @__PURE__ */ ((waterfallKeys2) => {
|
|
|
10949
10985
|
waterfallKeys2["down"] = "down";
|
|
10950
10986
|
return waterfallKeys2;
|
|
10951
10987
|
})(waterfallKeys || {});
|
|
10988
|
+
const effectsMap = {
|
|
10989
|
+
"easeLinear": linear$2,
|
|
10990
|
+
"easeCubicIn": cubicIn,
|
|
10991
|
+
"easeCubicOut": cubicOut,
|
|
10992
|
+
"easeCubicInOut": cubicInOut$1,
|
|
10993
|
+
"easeBounceOut": bounceOut,
|
|
10994
|
+
"easeElasticOut": elasticOut$1,
|
|
10995
|
+
"easeBackOut": backOut
|
|
10996
|
+
};
|
|
10952
10997
|
const defaultChartFormatOptions = {
|
|
10953
10998
|
chartDescription: {
|
|
10954
10999
|
chartDescriptionVisibility: false,
|
|
@@ -11551,6 +11596,20 @@ const defaultChartFormatOptions = {
|
|
|
11551
11596
|
chartPadding: {
|
|
11552
11597
|
paddingArrayLTRB: [0, 0, 0, 0]
|
|
11553
11598
|
// left, top, right, bottom
|
|
11599
|
+
},
|
|
11600
|
+
statisticalTest: {
|
|
11601
|
+
zTest: false,
|
|
11602
|
+
runZTest: [],
|
|
11603
|
+
zTestInputData: []
|
|
11604
|
+
},
|
|
11605
|
+
cjsOptions: {
|
|
11606
|
+
cjsTension: 0,
|
|
11607
|
+
cjsBorderRadius: 0
|
|
11608
|
+
},
|
|
11609
|
+
animation: {
|
|
11610
|
+
animationEnabled: false,
|
|
11611
|
+
animationDuration: 1500,
|
|
11612
|
+
animationEffect: "easeCubicOut"
|
|
11554
11613
|
}
|
|
11555
11614
|
};
|
|
11556
11615
|
const chartMargins = {
|
|
@@ -13489,6 +13548,21 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13489
13548
|
connectorType,
|
|
13490
13549
|
barChart
|
|
13491
13550
|
);
|
|
13551
|
+
if (formatOptions.animation?.animationEnabled) {
|
|
13552
|
+
const duration = formatOptions.animation.animationDuration;
|
|
13553
|
+
const ease = effectsMap[formatOptions.animation.animationEffect];
|
|
13554
|
+
const accessors = makeAnnotations.accessors();
|
|
13555
|
+
annotations.selectAll(".annotation").attr("transform", function(d) {
|
|
13556
|
+
const x2 = accessors.x(d.data);
|
|
13557
|
+
const yScale = d.data?.y?.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
13558
|
+
const startY = yScale(0);
|
|
13559
|
+
return `translate(${x2}, ${startY})`;
|
|
13560
|
+
}).transition().duration(duration).ease(ease).attr("transform", function(d) {
|
|
13561
|
+
const x2 = accessors.x(d.data);
|
|
13562
|
+
const y2 = accessors.y(d.data);
|
|
13563
|
+
return `translate(${x2}, ${y2})`;
|
|
13564
|
+
});
|
|
13565
|
+
}
|
|
13492
13566
|
}
|
|
13493
13567
|
} catch (error) {
|
|
13494
13568
|
throw error;
|
|
@@ -13985,6 +14059,28 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13985
14059
|
}).notePadding(0).annotations(finalAnnotationList);
|
|
13986
14060
|
if (!formatOptions.plotArea.fitChart) svg.selectAll(".annotation-group").remove();
|
|
13987
14061
|
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType, false);
|
|
14062
|
+
if (formatOptions.animation?.animationEnabled) {
|
|
14063
|
+
const duration = formatOptions.animation.animationDuration;
|
|
14064
|
+
const ease = effectsMap[formatOptions.animation.animationEffect];
|
|
14065
|
+
const accessors = makeAnnotations.accessors();
|
|
14066
|
+
annotations.selectAll(".annotation").attr("transform", function(d) {
|
|
14067
|
+
const x2 = accessors.x(d.data);
|
|
14068
|
+
const chartType = d.data.type || d.type;
|
|
14069
|
+
const axis2 = d.data?.x?.axis || d.data?.axis;
|
|
14070
|
+
const yScale = axis2 === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
14071
|
+
let startY;
|
|
14072
|
+
if (chartType === chartTypes.StackColumnChart || chartType === chartTypes.StackAreaChart) {
|
|
14073
|
+
startY = yScale(d.data.prevValue ?? 0);
|
|
14074
|
+
} else {
|
|
14075
|
+
startY = yScale(0);
|
|
14076
|
+
}
|
|
14077
|
+
return `translate(${x2}, ${startY})`;
|
|
14078
|
+
}).transition().duration(duration).ease(ease).attr("transform", function(d) {
|
|
14079
|
+
const x2 = accessors.x(d.data);
|
|
14080
|
+
const y2 = accessors.y(d.data);
|
|
14081
|
+
return `translate(${x2}, ${y2})`;
|
|
14082
|
+
});
|
|
14083
|
+
}
|
|
13988
14084
|
}
|
|
13989
14085
|
} catch (error) {
|
|
13990
14086
|
throw error;
|
|
@@ -15400,6 +15496,21 @@ function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin
|
|
|
15400
15496
|
}).notePadding(0).annotations(finalAnnotationList);
|
|
15401
15497
|
if (true) svg.selectAll(".annotation-group").remove();
|
|
15402
15498
|
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType, barChart);
|
|
15499
|
+
if (formatOptions.animation?.animationEnabled) {
|
|
15500
|
+
const duration = formatOptions.animation.animationDuration;
|
|
15501
|
+
const ease = effectsMap[formatOptions.animation.animationEffect];
|
|
15502
|
+
const accessors = makeAnnotations.accessors();
|
|
15503
|
+
annotations.selectAll(".annotation").attr("transform", function(d) {
|
|
15504
|
+
const x2 = accessors.x(d.data);
|
|
15505
|
+
const yScale = d.data?.y?.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
15506
|
+
const startY = yScale ? yScale(0) : 0;
|
|
15507
|
+
return `translate(${x2}, ${startY})`;
|
|
15508
|
+
}).transition().duration(duration).ease(ease).attr("transform", function(d) {
|
|
15509
|
+
const x2 = accessors.x(d.data);
|
|
15510
|
+
const y2 = accessors.y(d.data);
|
|
15511
|
+
return `translate(${x2}, ${y2})`;
|
|
15512
|
+
});
|
|
15513
|
+
}
|
|
15403
15514
|
}
|
|
15404
15515
|
} catch (error) {
|
|
15405
15516
|
throw error;
|
|
@@ -16143,7 +16254,7 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
|
|
|
16143
16254
|
const group2 = select$2(this);
|
|
16144
16255
|
let markers = group2.selectAll("path").data(groupData.data);
|
|
16145
16256
|
let markersEnter = markers.enter().append("path").attr("fill", (d) => d.markerColor);
|
|
16146
|
-
markersEnter.merge(markers).attr("d", (d) => {
|
|
16257
|
+
const mergedMarkers = markersEnter.merge(markers).attr("d", (d) => {
|
|
16147
16258
|
return Symbol$1().type(Markershapes(d.markerShape)).size(d.markerSize * 50)();
|
|
16148
16259
|
}).attr("visibility", (d) => {
|
|
16149
16260
|
const hideByX = !xScale(d.dimension) && xScale(d.dimension) !== 0;
|
|
@@ -16211,6 +16322,26 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
|
|
|
16211
16322
|
return `translate(${x2},${y2}) scale(1)`;
|
|
16212
16323
|
});
|
|
16213
16324
|
});
|
|
16325
|
+
if (formatOptions.animation.animationEnabled) {
|
|
16326
|
+
const duration = formatOptions.animation.animationDuration;
|
|
16327
|
+
const ease = effectsMap[formatOptions.animation.animationEffect] ?? linear$2;
|
|
16328
|
+
const xRange = xScale.range();
|
|
16329
|
+
const xRangeMin = Math.min(xRange[0], xRange[1]);
|
|
16330
|
+
const xRangeSpan = Math.max(xRange[0], xRange[1]) - xRangeMin;
|
|
16331
|
+
const invertEase = (progress, steps = 100) => {
|
|
16332
|
+
for (let i = 0; i <= steps; i++) {
|
|
16333
|
+
const t = i / steps;
|
|
16334
|
+
if (ease(t) >= progress) return t;
|
|
16335
|
+
}
|
|
16336
|
+
return 1;
|
|
16337
|
+
};
|
|
16338
|
+
mergedMarkers.attr("opacity", 0).each(function(d) {
|
|
16339
|
+
const x2 = xScale(d.dimension) ?? xRangeMin;
|
|
16340
|
+
const fraction = xRangeSpan > 0 ? Math.max(0, Math.min(1, (x2 - xRangeMin) / xRangeSpan)) : 0;
|
|
16341
|
+
const delay = invertEase(fraction) * duration;
|
|
16342
|
+
select$2(this).transition().delay(delay).duration(0).attr("opacity", 1);
|
|
16343
|
+
});
|
|
16344
|
+
}
|
|
16214
16345
|
});
|
|
16215
16346
|
} catch (error) {
|
|
16216
16347
|
logError$2(fileName$b, "lineMarkers", error);
|
|
@@ -17617,7 +17748,7 @@ const ColumnChart = ({
|
|
|
17617
17748
|
"visibility",
|
|
17618
17749
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
17619
17750
|
);
|
|
17620
|
-
const finalBars = bars;
|
|
17751
|
+
const finalBars = formatOptions.animation.animationEnabled ? bars.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : bars;
|
|
17621
17752
|
finalBars.attr("y", (d) => {
|
|
17622
17753
|
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
17623
17754
|
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
@@ -17695,6 +17826,7 @@ const ColumnChart = ({
|
|
|
17695
17826
|
filteredDimension,
|
|
17696
17827
|
xScale
|
|
17697
17828
|
);
|
|
17829
|
+
getChartType(filteredData);
|
|
17698
17830
|
commonAnnotations(
|
|
17699
17831
|
seriesData,
|
|
17700
17832
|
xScale,
|
|
@@ -17746,7 +17878,6 @@ const ColumnChart = ({
|
|
|
17746
17878
|
margin,
|
|
17747
17879
|
innerHeight2
|
|
17748
17880
|
);
|
|
17749
|
-
getChartType(filteredData);
|
|
17750
17881
|
};
|
|
17751
17882
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17752
17883
|
"svg",
|
|
@@ -17829,6 +17960,7 @@ const CustomColumnChart = ({
|
|
|
17829
17960
|
let requiredData = [];
|
|
17830
17961
|
let scrollPosition = 0;
|
|
17831
17962
|
let visibleBars;
|
|
17963
|
+
let annotationTimeoutId;
|
|
17832
17964
|
let chartJSON = {
|
|
17833
17965
|
dimensionList,
|
|
17834
17966
|
chartType,
|
|
@@ -18334,13 +18466,10 @@ const CustomColumnChart = ({
|
|
|
18334
18466
|
"transform",
|
|
18335
18467
|
(d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
|
|
18336
18468
|
);
|
|
18337
|
-
columnGroupsEnter.append("rect").attr("x", (d) => xScaleForLegends(d.legendUniqueId)).attr("width", xScaleForLegends.bandwidth()).attr("y", (d) => {
|
|
18469
|
+
const bars = columnGroupsEnter.append("rect").attr("x", (d) => xScaleForLegends(d.legendUniqueId)).attr("width", xScaleForLegends.bandwidth()).attr("y", (d) => {
|
|
18338
18470
|
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
18339
|
-
return
|
|
18340
|
-
}).attr("height", (d) => {
|
|
18341
|
-
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
18342
|
-
return Math.abs(yScale(d.value) - yScale(0));
|
|
18343
|
-
}).attr("fill", data2.properties.color).attr("stroke-dasharray", (d) => data2.properties.stackBorderStyle == 2 ? "5,3" : "0").attr("stroke-width", (d) => `${data2.properties.stackBorderWidth}px`).attr(
|
|
18471
|
+
return yScale(0);
|
|
18472
|
+
}).attr("height", 0).attr("fill", data2.properties.color).attr("stroke-dasharray", (d) => data2.properties.stackBorderStyle == 2 ? "5,3" : "0").attr("stroke-width", (d) => `${data2.properties.stackBorderWidth}px`).attr(
|
|
18344
18473
|
"stroke",
|
|
18345
18474
|
(d) => data2.properties.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderColor : "none"
|
|
18346
18475
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
@@ -18378,6 +18507,14 @@ const CustomColumnChart = ({
|
|
|
18378
18507
|
seriesData.filter((e) => e.legend === d.legend)[0].properties
|
|
18379
18508
|
);
|
|
18380
18509
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
18510
|
+
const finalBars = formatOptions.animation.animationEnabled ? bars.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : bars;
|
|
18511
|
+
finalBars.attr("y", (d) => {
|
|
18512
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
18513
|
+
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
18514
|
+
}).attr("height", (d) => {
|
|
18515
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
18516
|
+
return Math.abs(yScale(d.value) - yScale(0));
|
|
18517
|
+
});
|
|
18381
18518
|
columnGroups.exit().remove();
|
|
18382
18519
|
};
|
|
18383
18520
|
const drawLineChart = (lineData) => {
|
|
@@ -18423,6 +18560,14 @@ const CustomColumnChart = ({
|
|
|
18423
18560
|
"stroke-width",
|
|
18424
18561
|
(d) => d.properties.lineStyle !== "None" ? d.properties.lineWidth : "0"
|
|
18425
18562
|
);
|
|
18563
|
+
if (formatOptions.animation.animationEnabled) {
|
|
18564
|
+
lineGroupsEnter.merge(lineGroups).select("path").each(function() {
|
|
18565
|
+
const path2 = select$2(this);
|
|
18566
|
+
const totalLength = this.getTotalLength();
|
|
18567
|
+
path2.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", totalLength);
|
|
18568
|
+
path2.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("stroke-dashoffset", 0);
|
|
18569
|
+
});
|
|
18570
|
+
}
|
|
18426
18571
|
lineGroups.exit().remove();
|
|
18427
18572
|
lineMarkers(
|
|
18428
18573
|
lines,
|
|
@@ -18463,6 +18608,10 @@ const CustomColumnChart = ({
|
|
|
18463
18608
|
)
|
|
18464
18609
|
// : yScaleRight((d as TDataPoint).value)
|
|
18465
18610
|
).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
|
|
18611
|
+
const areaGeneratorStart = area().x(
|
|
18612
|
+
(d) => xScale(d.dimension) ? xScale(d.dimension) : null
|
|
18613
|
+
).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
|
|
18614
|
+
const enableAreaTransition = formatOptions.animation.animationEnabled;
|
|
18466
18615
|
let areas = gTag.selectAll(".areas.parentGroup").data([1]);
|
|
18467
18616
|
let focus = gTag.append("g").attr("class", "focusClass");
|
|
18468
18617
|
areas = areas.enter().append("g").attr("class", "areas parentGroup").attr("clip-path", `url(#${chartId}-clip)`).merge(areas);
|
|
@@ -18477,8 +18626,13 @@ const CustomColumnChart = ({
|
|
|
18477
18626
|
).attr("class", "area parentGroup").attr(
|
|
18478
18627
|
"fill",
|
|
18479
18628
|
(d) => d.properties.color !== commonColors.white ? d.properties.color : "none"
|
|
18480
|
-
).style("fill-opacity", formatOptions.plotArea.fillOpacity)
|
|
18481
|
-
|
|
18629
|
+
).style("fill-opacity", formatOptions.plotArea.fillOpacity).attr("d", (d) => enableAreaTransition ? areaGeneratorStart(d.data) : areaGenerator(d.data)).each(function(d) {
|
|
18630
|
+
if (enableAreaTransition) {
|
|
18631
|
+
select$2(this).transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("d", areaGenerator(d.data));
|
|
18632
|
+
}
|
|
18633
|
+
});
|
|
18634
|
+
areaGroups.select("path").attr("d", (d) => areaGenerator(d.data));
|
|
18635
|
+
areaGroupsEnter.merge(areaGroups).select("path").attr(
|
|
18482
18636
|
"stroke",
|
|
18483
18637
|
(d) => d.properties.areaBorderColor !== commonColors.white ? d.properties.areaBorderColor : "none"
|
|
18484
18638
|
).attr("stroke-dasharray", (d) => {
|
|
@@ -18539,6 +18693,10 @@ const CustomColumnChart = ({
|
|
|
18539
18693
|
).y1(
|
|
18540
18694
|
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
18541
18695
|
).defined((d) => d.hideZero ? Boolean(d.key) : true).curve(getCurveType(formatOptions));
|
|
18696
|
+
const stackAreaGeneratorStart = area().x(
|
|
18697
|
+
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
18698
|
+
).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined((d) => d.hideZero ? Boolean(d.key) : true).curve(getCurveType(formatOptions));
|
|
18699
|
+
const enableStackAreaTransition = formatOptions.animation.animationEnabled;
|
|
18542
18700
|
let areas = gTag.selectAll(".parentGroup").data([stackAreaData]);
|
|
18543
18701
|
gTag.append("g").attr("class", "focusClass");
|
|
18544
18702
|
areas = areas.enter().append("g").attr("class", "areas parentGroup").attr("clip-path", `url(#${chartId}-clip)`).merge(areas);
|
|
@@ -18547,8 +18705,13 @@ const CustomColumnChart = ({
|
|
|
18547
18705
|
areaGroupsEnter.append("path").attr(
|
|
18548
18706
|
"hoverId",
|
|
18549
18707
|
(d) => (data2.data.filter((e) => e.legend === d.key)[0].properties.alias || data2.data.filter((e) => e.legend === d.key)[0].properties.name || "Legend").replace(/\s+/g, "-")
|
|
18550
|
-
).attr("class", "area parentGroup").attr("fill", (d) => d.color !== commonColors.white ? d.color : "none")
|
|
18551
|
-
|
|
18708
|
+
).attr("class", "area parentGroup").attr("fill", (d) => d.color !== commonColors.white ? d.color : "none").attr("d", (d) => enableStackAreaTransition ? stackAreaGeneratorStart(d) : areaGenerator(d)).each(function(d) {
|
|
18709
|
+
if (enableStackAreaTransition) {
|
|
18710
|
+
select$2(this).transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("d", areaGenerator(d));
|
|
18711
|
+
}
|
|
18712
|
+
});
|
|
18713
|
+
areaGroups.select("path").attr("d", (d) => areaGenerator(d));
|
|
18714
|
+
areaGroupsEnter.merge(areaGroups).select("path").style("opacity", formatOptions.plotArea.fillOpacity).attr(
|
|
18552
18715
|
"stroke",
|
|
18553
18716
|
(d) => d.color !== commonColors.white ? d.color : "none"
|
|
18554
18717
|
).attr(
|
|
@@ -18585,19 +18748,24 @@ const CustomColumnChart = ({
|
|
|
18585
18748
|
let stackColumnGroupsEnter = stackColumnGroups.enter().append("g").attr("class", (d) => "stackcolumns-group ");
|
|
18586
18749
|
stackColumnGroups = stackColumnGroupsEnter.merge(stackColumnGroups);
|
|
18587
18750
|
let rects = stackColumnGroups.selectAll("rect").data((d) => d);
|
|
18588
|
-
rects.
|
|
18589
|
-
"transform",
|
|
18590
|
-
(d) => `translate(${xScale(d.data.dimension) - columnWidth / 2},0)`
|
|
18591
|
-
).merge(rects).attr(
|
|
18592
|
-
"hoverId",
|
|
18593
|
-
(d) => d.alias.includes("~$~") ? d.alias.split("~$~")[1].replace(/ /g, "-") : d.alias.replace(/ /g, "-")
|
|
18594
|
-
).attr("x", (d) => xScaleForLegends(chartTypes.StackColumnChart)).attr(
|
|
18751
|
+
rects.attr(
|
|
18595
18752
|
"y",
|
|
18596
18753
|
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
18597
18754
|
).attr(
|
|
18598
18755
|
"height",
|
|
18599
18756
|
(d) => d.data.axis === axisTypes.primary ? customYaxisMaxValue && d[1] > customYaxisMaxValue ? yScaleLeft(d[0]) - yScaleLeft(customYaxisMaxValue) : yScaleLeft(d[0]) - yScaleLeft(d[1]) : secondaryCustomYaxisMaxValue && d[1] > secondaryCustomYaxisMaxValue ? yScaleRight(d[0]) - yScaleRight(secondaryCustomYaxisMaxValue) : yScaleRight(d[0]) - yScaleRight(d[1])
|
|
18600
|
-
)
|
|
18757
|
+
);
|
|
18758
|
+
const rectsEnter = rects.enter().append("rect").attr(
|
|
18759
|
+
"transform",
|
|
18760
|
+
(d) => `translate(${xScale(d.data.dimension) - columnWidth / 2},0)`
|
|
18761
|
+
).attr(
|
|
18762
|
+
"y",
|
|
18763
|
+
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(0) : yScaleRight(0)
|
|
18764
|
+
).attr("height", 0);
|
|
18765
|
+
rectsEnter.merge(rects).attr(
|
|
18766
|
+
"hoverId",
|
|
18767
|
+
(d) => d.alias.includes("~$~") ? d.alias.split("~$~")[1].replace(/ /g, "-") : d.alias.replace(/ /g, "-")
|
|
18768
|
+
).attr("x", (d) => xScaleForLegends(chartTypes.StackColumnChart)).attr("width", xScaleForLegends.bandwidth()).attr("fill", (d, i, nodes) => {
|
|
18601
18769
|
const seriesIndex = Array.from(seriesData).findIndex(
|
|
18602
18770
|
(sdata) => sdata.legend === d.key
|
|
18603
18771
|
);
|
|
@@ -18644,6 +18812,14 @@ const CustomColumnChart = ({
|
|
|
18644
18812
|
seriesData.filter((e) => e.legend === d.key)[0].properties
|
|
18645
18813
|
);
|
|
18646
18814
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
18815
|
+
const finalStackRects = formatOptions.animation.animationEnabled ? rectsEnter.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : rectsEnter;
|
|
18816
|
+
finalStackRects.attr(
|
|
18817
|
+
"y",
|
|
18818
|
+
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
18819
|
+
).attr(
|
|
18820
|
+
"height",
|
|
18821
|
+
(d) => d.data.axis === axisTypes.primary ? customYaxisMaxValue && d[1] > customYaxisMaxValue ? yScaleLeft(d[0]) - yScaleLeft(customYaxisMaxValue) : yScaleLeft(d[0]) - yScaleLeft(d[1]) : secondaryCustomYaxisMaxValue && d[1] > secondaryCustomYaxisMaxValue ? yScaleRight(d[0]) - yScaleRight(secondaryCustomYaxisMaxValue) : yScaleRight(d[0]) - yScaleRight(d[1])
|
|
18822
|
+
);
|
|
18647
18823
|
stackColumnGroups.exit().remove();
|
|
18648
18824
|
};
|
|
18649
18825
|
const setSVGContainer = (margin2) => {
|
|
@@ -18721,48 +18897,60 @@ const CustomColumnChart = ({
|
|
|
18721
18897
|
filteredDimension,
|
|
18722
18898
|
xScale
|
|
18723
18899
|
);
|
|
18724
|
-
|
|
18725
|
-
|
|
18726
|
-
|
|
18727
|
-
|
|
18728
|
-
|
|
18729
|
-
|
|
18730
|
-
|
|
18731
|
-
|
|
18732
|
-
|
|
18733
|
-
|
|
18734
|
-
|
|
18735
|
-
|
|
18736
|
-
|
|
18737
|
-
|
|
18738
|
-
|
|
18739
|
-
|
|
18740
|
-
|
|
18741
|
-
|
|
18742
|
-
|
|
18743
|
-
|
|
18744
|
-
|
|
18745
|
-
|
|
18746
|
-
|
|
18747
|
-
|
|
18748
|
-
|
|
18749
|
-
|
|
18750
|
-
|
|
18751
|
-
|
|
18752
|
-
|
|
18753
|
-
|
|
18754
|
-
|
|
18755
|
-
|
|
18756
|
-
|
|
18757
|
-
|
|
18758
|
-
|
|
18759
|
-
|
|
18760
|
-
|
|
18761
|
-
|
|
18762
|
-
|
|
18763
|
-
|
|
18764
|
-
|
|
18765
|
-
|
|
18900
|
+
clearTimeout(annotationTimeoutId);
|
|
18901
|
+
const renderAnnotationsAndTotals = () => {
|
|
18902
|
+
commonAnnotationsForCustomChart(
|
|
18903
|
+
filteredData,
|
|
18904
|
+
xScale,
|
|
18905
|
+
yScaleLeft,
|
|
18906
|
+
yScaleRight,
|
|
18907
|
+
// need to pass secondary axis scale if secondary axis is drawn
|
|
18908
|
+
margin,
|
|
18909
|
+
d3Annotation,
|
|
18910
|
+
stackColumnData,
|
|
18911
|
+
stackAreaData,
|
|
18912
|
+
[],
|
|
18913
|
+
//labelExcludeList
|
|
18914
|
+
[],
|
|
18915
|
+
// individualLabelColor
|
|
18916
|
+
columnWidth,
|
|
18917
|
+
// [], //old annotation list
|
|
18918
|
+
formatOptions,
|
|
18919
|
+
height,
|
|
18920
|
+
width,
|
|
18921
|
+
innerWidth2,
|
|
18922
|
+
filteredDimension,
|
|
18923
|
+
innerHeight2,
|
|
18924
|
+
chartId,
|
|
18925
|
+
svg,
|
|
18926
|
+
onDataLabelCoordinatesChange,
|
|
18927
|
+
xScaleForLegends,
|
|
18928
|
+
isReportEditable
|
|
18929
|
+
);
|
|
18930
|
+
addTotalValue(
|
|
18931
|
+
totalValueMap,
|
|
18932
|
+
xScale,
|
|
18933
|
+
yScaleLeft,
|
|
18934
|
+
margin,
|
|
18935
|
+
d3Annotation,
|
|
18936
|
+
[],
|
|
18937
|
+
formatOptions,
|
|
18938
|
+
chartType,
|
|
18939
|
+
height,
|
|
18940
|
+
width,
|
|
18941
|
+
svg,
|
|
18942
|
+
isReportEditable
|
|
18943
|
+
);
|
|
18944
|
+
};
|
|
18945
|
+
if (formatOptions.animation.animationEnabled) {
|
|
18946
|
+
svg.selectAll(".annotation-group").remove();
|
|
18947
|
+
annotationTimeoutId = setTimeout(
|
|
18948
|
+
renderAnnotationsAndTotals,
|
|
18949
|
+
formatOptions.animation.animationDuration
|
|
18950
|
+
);
|
|
18951
|
+
} else {
|
|
18952
|
+
renderAnnotationsAndTotals();
|
|
18953
|
+
}
|
|
18766
18954
|
};
|
|
18767
18955
|
const createStackData = (requiredStackChatData) => {
|
|
18768
18956
|
let legendList = requiredStackChatData.data.map((d) => d.legend);
|
|
@@ -18894,7 +19082,6 @@ const LayeredColumnChart = ({
|
|
|
18894
19082
|
let yScaleLeft;
|
|
18895
19083
|
let yScaleRight;
|
|
18896
19084
|
let xScale;
|
|
18897
|
-
let xScaleForLegends;
|
|
18898
19085
|
let calculatedRange;
|
|
18899
19086
|
let yAxisLeft;
|
|
18900
19087
|
let xAxis;
|
|
@@ -19150,7 +19337,7 @@ const LayeredColumnChart = ({
|
|
|
19150
19337
|
calculatedRange = [0, innerWidth2];
|
|
19151
19338
|
};
|
|
19152
19339
|
const getXScale = () => {
|
|
19153
|
-
|
|
19340
|
+
band().domain(["layeredLegend"]).range([0, columnWidth]).paddingInner(
|
|
19154
19341
|
chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
|
|
19155
19342
|
);
|
|
19156
19343
|
xScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
|
|
@@ -19209,15 +19396,12 @@ const LayeredColumnChart = ({
|
|
|
19209
19396
|
});
|
|
19210
19397
|
});
|
|
19211
19398
|
lineData.forEach((data2, index2) => {
|
|
19212
|
-
let column = gTag.selectAll(
|
|
19213
|
-
column = column.enter().append("g").attr("class", `column parentGroup`).attr("clip-path", `url(#${chartId}-clip)`).merge(column);
|
|
19214
|
-
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.properties.legendUniqueId);
|
|
19399
|
+
let column = gTag.selectAll(`.parentGroup-${data2.properties.legendUniqueId}`).data([data2], (d) => d.properties.legendUniqueId);
|
|
19400
|
+
column = column.enter().append("g").attr("class", `column parentGroup parentGroup-${data2.properties.legendUniqueId}`).attr("clip-path", `url(#${chartId}-clip)`).merge(column);
|
|
19401
|
+
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.dimension + "_" + data2.properties.legendUniqueId);
|
|
19215
19402
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
19216
19403
|
"hoverId",
|
|
19217
|
-
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
19218
|
-
/\s+/g,
|
|
19219
|
-
"-"
|
|
19220
|
-
)
|
|
19404
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")
|
|
19221
19405
|
).attr(
|
|
19222
19406
|
"transform",
|
|
19223
19407
|
(d) => index2 === 0 ? `translate(${xScale(d.dimension) - columnWidth / 2}, 0)` : `translate(${xScale(d.dimension) - columnWidth / (2 + index2 * 2)}, 0)`
|
|
@@ -19230,22 +19414,38 @@ const LayeredColumnChart = ({
|
|
|
19230
19414
|
"transform",
|
|
19231
19415
|
(d) => index2 === 0 ? `translate(${xScale(d.dimension) - columnWidth / 2}, 0)` : `translate(${xScale(d.dimension) - columnWidth / (2 + index2 * 2)}, 0)`
|
|
19232
19416
|
);
|
|
19233
|
-
columnGroupsEnter.append("rect").attr("x", (
|
|
19234
|
-
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
19235
|
-
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
19236
|
-
}).attr("height", (d) => {
|
|
19417
|
+
const bars = columnGroupsEnter.append("rect").attr("x", () => 0).attr("width", index2 === 0 ? columnWidth : columnWidth / 2 + index2 * 2).attr("y", (d) => {
|
|
19237
19418
|
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
19238
|
-
return
|
|
19239
|
-
}).attr("
|
|
19419
|
+
return yScale(0);
|
|
19420
|
+
}).attr("height", 0).attr(
|
|
19421
|
+
"fill",
|
|
19422
|
+
(d) => colorScaleMap.get(data2.properties.legendUniqueId)?.(d.value) ?? data2.properties.color
|
|
19423
|
+
).attr(
|
|
19240
19424
|
"stroke-dasharray",
|
|
19241
|
-
(
|
|
19242
|
-
).attr("stroke-width",
|
|
19425
|
+
() => data2.properties.stackBorderStyle == 2 ? "5,3" : "0"
|
|
19426
|
+
).attr("stroke-width", `${data2.properties.stackBorderWidth}px`).attr(
|
|
19243
19427
|
"stroke",
|
|
19244
19428
|
() => data2.properties.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderColor : "none"
|
|
19245
19429
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr("opacity", 0.7).attr(
|
|
19246
19430
|
"visibility",
|
|
19247
19431
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
19248
|
-
)
|
|
19432
|
+
);
|
|
19433
|
+
const finalBars = formatOptions.animation.animationEnabled ? bars.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : bars;
|
|
19434
|
+
finalBars.attr("y", (d) => {
|
|
19435
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
19436
|
+
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
19437
|
+
}).attr("height", (d) => {
|
|
19438
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
19439
|
+
return Math.abs(yScale(d.value) - yScale(0));
|
|
19440
|
+
});
|
|
19441
|
+
columnGroups.select("rect").transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("y", (d) => {
|
|
19442
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
19443
|
+
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
19444
|
+
}).attr("height", (d) => {
|
|
19445
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
19446
|
+
return Math.abs(yScale(d.value) - yScale(0));
|
|
19447
|
+
});
|
|
19448
|
+
columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
|
|
19249
19449
|
showTooltipOnMouseMove(
|
|
19250
19450
|
[
|
|
19251
19451
|
{
|
|
@@ -19287,6 +19487,7 @@ const LayeredColumnChart = ({
|
|
|
19287
19487
|
});
|
|
19288
19488
|
columnGroups.exit().remove();
|
|
19289
19489
|
});
|
|
19490
|
+
gTag.selectAll(".parentGroup").raise();
|
|
19290
19491
|
};
|
|
19291
19492
|
const setSVGContainer = (margin2) => {
|
|
19292
19493
|
innerWidth2 = width - margin2.left - margin2.right;
|
|
@@ -19779,7 +19980,7 @@ const StackColumnChart = ({
|
|
|
19779
19980
|
}).on("mouseout", (event2, d) => {
|
|
19780
19981
|
hideTooltipOnMouseOut();
|
|
19781
19982
|
});
|
|
19782
|
-
const finalRects = baseRects;
|
|
19983
|
+
const finalRects = formatOptions.animation.animationEnabled ? baseRects.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : baseRects;
|
|
19783
19984
|
finalRects.attr("y", (d) => d[1] >= d[0] ? yScaleLeft(d[1]) : yScaleLeft(d[0])).attr("height", (d) => Math.abs(yScaleLeft(d[0]) - yScaleLeft(d[1])));
|
|
19784
19985
|
columnGroups.exit().remove();
|
|
19785
19986
|
gTag.selectAll(".parentGroup").raise();
|
|
@@ -20515,7 +20716,8 @@ const NormalizedStackColumnChart = ({
|
|
|
20515
20716
|
const { props } = getPropsForRect(nodes, i);
|
|
20516
20717
|
return d.data[d.key] === 0 && props?.hideZeroValues ? "hidden" : "visible";
|
|
20517
20718
|
});
|
|
20518
|
-
const
|
|
20719
|
+
const shouldAnimate = formatOptions.animation.animationEnabled;
|
|
20720
|
+
const applyTransition = (sel) => shouldAnimate ? sel.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : sel;
|
|
20519
20721
|
applyTransition(rectsEnter).attr("y", (d) => d[1] >= d[0] ? yScaleLeft(d[1]) : yScaleLeft(d[0])).attr("height", (d) => Math.abs(yScaleLeft(d[0]) - yScaleLeft(d[1])));
|
|
20520
20722
|
rectsEnter.merge(rects).on("mousemove", (event2, d) => {
|
|
20521
20723
|
showTooltipOnMouseMove(
|
|
@@ -21322,6 +21524,15 @@ function pieFamilyAnnotation(d3Annotation2, chartData, formatOptions, getPiePosi
|
|
|
21322
21524
|
}).annotations(finalAnnotationList);
|
|
21323
21525
|
const annotations = svg.append("g").attr("class", "annotation-group parentGroup").attr("transform", getPiePosition).call(makeAnnotations);
|
|
21324
21526
|
annotations.selectAll("rect,.annotation-subject").remove();
|
|
21527
|
+
if (formatOptions.animation?.animationEnabled) {
|
|
21528
|
+
const duration = formatOptions.animation.animationDuration;
|
|
21529
|
+
const ease = effectsMap[formatOptions.animation.animationEffect];
|
|
21530
|
+
const labels = annotations.selectAll(".annotation-note-label");
|
|
21531
|
+
labels.interrupt().style("opacity", 0);
|
|
21532
|
+
setTimeout(() => {
|
|
21533
|
+
labels.transition().delay((d, i) => i * 30).duration(duration).ease(ease).style("opacity", 1);
|
|
21534
|
+
}, 50);
|
|
21535
|
+
}
|
|
21325
21536
|
annotations.selectAll(".connector").style("stroke", formatOptions.plotArea.connectorColor ?? "#ccc").attr(
|
|
21326
21537
|
"stroke-dasharray",
|
|
21327
21538
|
connectedStyle2[formatOptions.plotArea.connectorStyle?.toLowerCase()]
|
|
@@ -21753,7 +21964,8 @@ const ColumnHistogramChart = ({
|
|
|
21753
21964
|
formatOptions.bins.binsCalculation === "Automatic" ? xAxis.ticks(thresholds) : xAxis.tickValues(periods).ticks(innerWidth2 / 50);
|
|
21754
21965
|
};
|
|
21755
21966
|
const getChartType = (lineData) => {
|
|
21756
|
-
|
|
21967
|
+
const shouldAnimate = formatOptions.animation.animationEnabled;
|
|
21968
|
+
const bars = gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(bins).enter().append("g").selectAll("rect").data((d) => d).enter().append("rect").attr("class", "rect").attr(
|
|
21757
21969
|
"stroke",
|
|
21758
21970
|
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderColor
|
|
21759
21971
|
).attr(
|
|
@@ -21763,12 +21975,10 @@ const ColumnHistogramChart = ({
|
|
|
21763
21975
|
"stroke-opacity",
|
|
21764
21976
|
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderOpacity
|
|
21765
21977
|
).attr("x", 1).attr("transform", function(d) {
|
|
21766
|
-
return "translate(" + xScale(d.x0) + "," +
|
|
21978
|
+
return "translate(" + xScale(d.x0) + "," + innerHeight2 + ")";
|
|
21767
21979
|
}).attr("width", function(d) {
|
|
21768
21980
|
return xScale(d.x1) - xScale(d.x0) - parseFloat(formatOptions.bins.binsGapWidth) < 0 ? 0 : xScale(d.x1) - xScale(d.x0) - parseFloat(formatOptions.bins.binsGapWidth);
|
|
21769
|
-
}).attr("height",
|
|
21770
|
-
return innerHeight2 - yScaleLeft(d.length);
|
|
21771
|
-
}).style("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("opacity", formatOptions.bins.binsFillOpacity).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
21981
|
+
}).attr("height", 0).style("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("opacity", formatOptions.bins.binsFillOpacity).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
21772
21982
|
showTooltipOnMouseMove(
|
|
21773
21983
|
[
|
|
21774
21984
|
{
|
|
@@ -21790,6 +22000,12 @@ const ColumnHistogramChart = ({
|
|
|
21790
22000
|
event2
|
|
21791
22001
|
);
|
|
21792
22002
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
22003
|
+
const finalBars = shouldAnimate ? bars.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : bars;
|
|
22004
|
+
finalBars.attr("transform", function(d) {
|
|
22005
|
+
return "translate(" + xScale(d.x0) + "," + (yScaleLeft(d.length) > 0 ? yScaleLeft(d.length) : 0) + ")";
|
|
22006
|
+
}).attr("height", function(d) {
|
|
22007
|
+
return innerHeight2 - yScaleLeft(d.length);
|
|
22008
|
+
});
|
|
21793
22009
|
gTag.selectAll(".parentGroup").raise();
|
|
21794
22010
|
};
|
|
21795
22011
|
const setSVGContainer = (margin2) => {
|
|
@@ -22297,6 +22513,8 @@ const LineChart = ({
|
|
|
22297
22513
|
).defined(
|
|
22298
22514
|
(d) => d.hideZero || chartJSON.hideZeroValues ? Boolean(d.value) : true
|
|
22299
22515
|
).curve(getCurveType(formatOptions));
|
|
22516
|
+
const shouldAnimate = formatOptions.animation.animationEnabled;
|
|
22517
|
+
const applyTransition = (sel) => shouldAnimate ? sel.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : sel;
|
|
22300
22518
|
let lines = gTag.selectAll(".parentGroup").data([reversedLineData]);
|
|
22301
22519
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
22302
22520
|
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
@@ -22304,7 +22522,7 @@ const LineChart = ({
|
|
|
22304
22522
|
lineGroupsEnter.append("path").attr("class", "visibleLine").attr("fill", "none");
|
|
22305
22523
|
lineGroupsEnter.merge(lineGroups).each(function(d) {
|
|
22306
22524
|
const g = select$2(this);
|
|
22307
|
-
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", (d2) => lineGenerator(d2.data)).attr(
|
|
22525
|
+
const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", (d2) => lineGenerator(d2.data)).attr(
|
|
22308
22526
|
"stroke",
|
|
22309
22527
|
(d2) => d2.properties.color !== commonColors.white ? d2.properties.color : "none"
|
|
22310
22528
|
).attr("stroke-dasharray", (d2) => {
|
|
@@ -22327,6 +22545,14 @@ const LineChart = ({
|
|
|
22327
22545
|
"hoverId",
|
|
22328
22546
|
(d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-")
|
|
22329
22547
|
).attr("clip-path", `url(#${chartId}-clip)`).attr("d", (d2) => lineGenerator(d2.data));
|
|
22548
|
+
if (shouldAnimate) {
|
|
22549
|
+
pathSel.each(function() {
|
|
22550
|
+
const path2 = select$2(this);
|
|
22551
|
+
const totalLength = this.getTotalLength();
|
|
22552
|
+
path2.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", totalLength);
|
|
22553
|
+
applyTransition(path2).attr("stroke-dashoffset", 0);
|
|
22554
|
+
});
|
|
22555
|
+
}
|
|
22330
22556
|
});
|
|
22331
22557
|
lineGroups.exit().remove();
|
|
22332
22558
|
lineMarkers(
|
|
@@ -22857,7 +23083,13 @@ const StackLineChart = ({
|
|
|
22857
23083
|
"stroke-width",
|
|
22858
23084
|
seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : 0
|
|
22859
23085
|
).attr("fill", "none");
|
|
22860
|
-
|
|
23086
|
+
const enableTransition = formatOptions.animation.animationEnabled;
|
|
23087
|
+
const totalLength = pathSel.node().getTotalLength();
|
|
23088
|
+
if (enableTransition) {
|
|
23089
|
+
pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", totalLength).transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("stroke-dashoffset", 0);
|
|
23090
|
+
} else {
|
|
23091
|
+
pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", 0);
|
|
23092
|
+
}
|
|
22861
23093
|
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke", commonColors.transparent).attr("stroke-width", 20).attr("fill", "none").style("pointer-events", "stroke").on("mouseenter", function() {
|
|
22862
23094
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
22863
23095
|
svg.selectAll(
|
|
@@ -23361,7 +23593,7 @@ const NormalisedStackLineChart = ({
|
|
|
23361
23593
|
).append("path").attr("class", "line").attr("fill", "none");
|
|
23362
23594
|
lineGroupsEnter.merge(lineGroups).each(function(d, i) {
|
|
23363
23595
|
const g = select$2(this);
|
|
23364
|
-
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", lineGenerator(d)).attr("stroke", d.color !== commonColors.white ? d.color : "none").attr("stroke-dasharray", (d2) => {
|
|
23596
|
+
const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", lineGenerator(d)).attr("stroke", d.color !== commonColors.white ? d.color : "none").attr("stroke-dasharray", (d2) => {
|
|
23365
23597
|
const lineWidth = parseInt(
|
|
23366
23598
|
seriesData[i].properties.lineWidth.toString()
|
|
23367
23599
|
);
|
|
@@ -23380,6 +23612,13 @@ const NormalisedStackLineChart = ({
|
|
|
23380
23612
|
"stroke-width",
|
|
23381
23613
|
seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : 0
|
|
23382
23614
|
).attr("fill", "none");
|
|
23615
|
+
const enableTransition = formatOptions.animation.animationEnabled;
|
|
23616
|
+
const totalLength = pathSel.node().getTotalLength();
|
|
23617
|
+
if (enableTransition) {
|
|
23618
|
+
pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", totalLength).transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("stroke-dashoffset", 0);
|
|
23619
|
+
} else {
|
|
23620
|
+
pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", 0);
|
|
23621
|
+
}
|
|
23383
23622
|
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke", commonColors.transparent).attr("stroke-width", 20).attr("fill", "none").style("pointer-events", "stroke").on("mouseenter", function(event2, d2) {
|
|
23384
23623
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
23385
23624
|
svg.selectAll(
|
|
@@ -23969,7 +24208,7 @@ const HorizontalBarChart = ({
|
|
|
23969
24208
|
"visibility",
|
|
23970
24209
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
23971
24210
|
);
|
|
23972
|
-
const finalBars = bars;
|
|
24211
|
+
const finalBars = formatOptions.animation.animationEnabled ? bars.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : bars;
|
|
23973
24212
|
finalBars.attr("x", (d) => {
|
|
23974
24213
|
const xScaleUsed = data2.properties.axis === axisTypes.primary ? xScaleBottom : xScaleTop;
|
|
23975
24214
|
return d.value >= 0 ? xScaleUsed(0) : xScaleUsed(d.value);
|
|
@@ -24492,7 +24731,7 @@ const StackHorizontalChart = ({
|
|
|
24492
24731
|
hideTooltipOnMouseOut();
|
|
24493
24732
|
});
|
|
24494
24733
|
baseRects.attr("x", (d) => xScaleBottom(0));
|
|
24495
|
-
const finalRects = baseRects;
|
|
24734
|
+
const finalRects = formatOptions.animation.animationEnabled ? baseRects.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : baseRects;
|
|
24496
24735
|
finalRects.attr("x", (d) => Math.min(xScaleBottom(d[0]), xScaleBottom(d[1]))).attr("width", (d) => Math.abs(xScaleBottom(d[1]) - xScaleBottom(d[0])));
|
|
24497
24736
|
columnGroups.exit().remove();
|
|
24498
24737
|
gTag.selectAll(".parentGroup").raise();
|
|
@@ -25195,7 +25434,7 @@ const NormalizedStackHorizontalBarChart = ({
|
|
|
25195
25434
|
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
25196
25435
|
hideTooltipOnMouseOut();
|
|
25197
25436
|
});
|
|
25198
|
-
const finalRects = baseRects;
|
|
25437
|
+
const finalRects = formatOptions.animation.animationEnabled ? baseRects.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : baseRects;
|
|
25199
25438
|
finalRects.attr("x", (d) => Math.min(xScaleBottom(d[0]), xScaleBottom(d[1]))).attr("width", (d) => Math.abs(xScaleBottom(d[1]) - xScaleBottom(d[0])));
|
|
25200
25439
|
columnGroups.exit().remove();
|
|
25201
25440
|
gTag.selectAll(".parentGroup").raise();
|
|
@@ -25339,7 +25578,6 @@ const LayeredHorizontalBarChart = ({
|
|
|
25339
25578
|
let gTag;
|
|
25340
25579
|
let xScaleBottom;
|
|
25341
25580
|
let yScale;
|
|
25342
|
-
let yScaleLegend;
|
|
25343
25581
|
let calculatedRange;
|
|
25344
25582
|
let xAxisBottom;
|
|
25345
25583
|
let yAxis;
|
|
@@ -25579,7 +25817,7 @@ const LayeredHorizontalBarChart = ({
|
|
|
25579
25817
|
getYScale();
|
|
25580
25818
|
};
|
|
25581
25819
|
const getYScale = () => {
|
|
25582
|
-
|
|
25820
|
+
band().domain(["layeredLegend"]).range([0, columnWidth]).paddingInner(
|
|
25583
25821
|
chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
|
|
25584
25822
|
);
|
|
25585
25823
|
yScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
|
|
@@ -25626,58 +25864,63 @@ const LayeredHorizontalBarChart = ({
|
|
|
25626
25864
|
});
|
|
25627
25865
|
});
|
|
25628
25866
|
lineData.forEach((data2, index2) => {
|
|
25629
|
-
let column = gTag.selectAll(
|
|
25630
|
-
column = column.enter().append("g").attr("class", `column parentGroup`).attr("clip-path", `url(#${chartId}-clip)`).merge(column);
|
|
25631
|
-
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.properties.legendUniqueId);
|
|
25867
|
+
let column = gTag.selectAll(`.parentGroup-${data2.properties.legendUniqueId}`).data([data2], (d) => d.properties.legendUniqueId);
|
|
25868
|
+
column = column.enter().append("g").attr("class", `column parentGroup parentGroup-${data2.properties.legendUniqueId}`).attr("clip-path", `url(#${chartId}-clip)`).merge(column);
|
|
25869
|
+
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.dimension + "_" + data2.properties.legendUniqueId);
|
|
25632
25870
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
25633
25871
|
"hoverId",
|
|
25634
|
-
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
25635
|
-
/\s+/g,
|
|
25636
|
-
"-"
|
|
25637
|
-
)
|
|
25872
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")
|
|
25638
25873
|
).attr(
|
|
25639
25874
|
"transform",
|
|
25640
|
-
(d) => index2 === 0 ? `translate(0
|
|
25875
|
+
(d) => index2 === 0 ? `translate(0, ${yScale(d.dimension) - columnWidth / 2})` : `translate(0, ${yScale(d.dimension) - columnWidth / (2 + index2 * 2)})`
|
|
25641
25876
|
);
|
|
25642
25877
|
columnGroups.attr(
|
|
25643
25878
|
"transform",
|
|
25644
|
-
(d) => index2 === 0 ? `translate(0
|
|
25879
|
+
(d) => index2 === 0 ? `translate(0, ${yScale(d.dimension) - columnWidth / 2})` : `translate(0, ${yScale(d.dimension) - columnWidth / (2 + index2 * 2)})`
|
|
25645
25880
|
);
|
|
25646
25881
|
columnGroupsEnter.merge(columnGroups).attr(
|
|
25647
25882
|
"transform",
|
|
25648
|
-
(d) => index2 === 0 ? `translate(0
|
|
25883
|
+
(d) => index2 === 0 ? `translate(0, ${yScale(d.dimension) - columnWidth / 2})` : `translate(0, ${yScale(d.dimension) - columnWidth / (2 + index2 * 2)})`
|
|
25649
25884
|
);
|
|
25650
|
-
columnGroupsEnter.append("rect").attr("y",
|
|
25651
|
-
|
|
25652
|
-
|
|
25653
|
-
|
|
25654
|
-
(d) => d.value > 0 ? customYaxisMaxValue && d.value > customYaxisMaxValue ? xScaleBottom(customYaxisMaxValue) - xScaleBottom(0) : xScaleBottom(d.value) - xScaleBottom(0) : Math.abs(xScaleBottom(0) - xScaleBottom(d.value))
|
|
25655
|
-
).attr("fill", (d) => colorScaleMap.get(data2.properties.legendUniqueId)?.(d.value) ?? data2.properties.color).attr(
|
|
25885
|
+
const bars = columnGroupsEnter.append("rect").attr("y", 0).attr("height", index2 === 0 ? columnWidth : columnWidth / 2).attr("x", () => xScaleBottom(0)).attr("width", 0).attr(
|
|
25886
|
+
"fill",
|
|
25887
|
+
(d) => colorScaleMap.get(data2.properties.legendUniqueId)?.(d.value) ?? data2.properties.color
|
|
25888
|
+
).attr(
|
|
25656
25889
|
"stroke-dasharray",
|
|
25657
|
-
(
|
|
25658
|
-
).attr("stroke-width",
|
|
25890
|
+
() => data2.properties.stackBorderStyle == 2 ? "5,3" : "0"
|
|
25891
|
+
).attr("stroke-width", `${data2.properties.stackBorderWidth}px`).attr(
|
|
25659
25892
|
"stroke",
|
|
25660
|
-
(
|
|
25893
|
+
() => data2.properties.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderColor : "none"
|
|
25661
25894
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr("opacity", 0.7).attr(
|
|
25662
25895
|
"visibility",
|
|
25663
25896
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
25664
|
-
)
|
|
25897
|
+
);
|
|
25898
|
+
const finalBars = formatOptions.animation.animationEnabled ? bars.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : bars;
|
|
25899
|
+
finalBars.attr(
|
|
25900
|
+
"x",
|
|
25901
|
+
(d) => d.value > 0 ? xScaleBottom(0) : xScaleBottom(d.value)
|
|
25902
|
+
).attr(
|
|
25903
|
+
"width",
|
|
25904
|
+
(d) => d.value > 0 ? xScaleBottom(d.value) - xScaleBottom(0) : Math.abs(xScaleBottom(0) - xScaleBottom(d.value))
|
|
25905
|
+
);
|
|
25906
|
+
columnGroups.select("rect").transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr(
|
|
25907
|
+
"x",
|
|
25908
|
+
(d) => d.value > 0 ? xScaleBottom(0) : xScaleBottom(d.value)
|
|
25909
|
+
).attr(
|
|
25910
|
+
"width",
|
|
25911
|
+
(d) => d.value > 0 ? xScaleBottom(d.value) - xScaleBottom(0) : Math.abs(xScaleBottom(0) - xScaleBottom(d.value))
|
|
25912
|
+
);
|
|
25913
|
+
columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
|
|
25665
25914
|
showTooltipOnMouseMove(
|
|
25666
25915
|
[
|
|
25667
25916
|
{
|
|
25668
25917
|
key: formatOptions.xAxisTitle.xAxisTitleHTML !== "" ? new DOMParser().parseFromString(formatOptions.xAxisTitle.xAxisTitleHTML, "text/html").body.textContent?.trim() : formatOptions.xAxisTitle.xAxisTitleText.includes("~$~") ? formatOptions.xAxisTitle.xAxisTitleText.split("~$~")[1] : formatOptions.xAxisTitle.xAxisTitleText,
|
|
25669
|
-
value: chartJSON.formattedDimensionListMap.get(
|
|
25670
|
-
Array.isArray(d.dimension) ? d.dimension[0] : d.dimension
|
|
25671
|
-
)
|
|
25918
|
+
value: chartJSON.formattedDimensionListMap.get(d.dimension)
|
|
25672
25919
|
},
|
|
25673
25920
|
{
|
|
25674
|
-
key: formatOptions.yAxisTitle.yAxisTitleHTML !== "" ? new DOMParser().parseFromString(formatOptions.yAxisTitle.yAxisTitleHTML, "text/html").body.textContent?.trim() : d.properties?.currentMeasure
|
|
25921
|
+
key: formatOptions.yAxisTitle.yAxisTitleHTML !== "" ? new DOMParser().parseFromString(formatOptions.yAxisTitle.yAxisTitleHTML, "text/html").body.textContent?.trim() : d.properties?.currentMeasure || formatOptions.yAxisTitle.yAxisTitleText || d.value,
|
|
25675
25922
|
value: getNumberWithFormat(
|
|
25676
|
-
|
|
25677
|
-
chartTypes.NormalizedStackLineChart,
|
|
25678
|
-
chartTypes.NormalizedStackAreaChart,
|
|
25679
|
-
""
|
|
25680
|
-
].includes(chartType) ? d[1] - d[0] : d.value,
|
|
25923
|
+
d.value,
|
|
25681
25924
|
formatOptions.toolTip.toolTipDisplayUnits,
|
|
25682
25925
|
formatOptions.toolTip.toolTipNumberFormat,
|
|
25683
25926
|
formatOptions.toolTip.toolTipDecimalPrecision
|
|
@@ -25692,13 +25935,7 @@ const LayeredHorizontalBarChart = ({
|
|
|
25692
25935
|
event2,
|
|
25693
25936
|
data2.properties
|
|
25694
25937
|
);
|
|
25695
|
-
|
|
25696
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
25697
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
25698
|
-
}).on("mouseout", (e, d) => {
|
|
25699
|
-
let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
|
|
25700
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
25701
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
25938
|
+
}).on("mouseout", () => {
|
|
25702
25939
|
hideTooltipOnMouseOut();
|
|
25703
25940
|
});
|
|
25704
25941
|
columnGroups.exit().remove();
|
|
@@ -26385,7 +26622,8 @@ const HorizontalHistogramChart = ({
|
|
|
26385
26622
|
formatOptions.bins.binsCalculation === "Automatic" ? yAxisLeft.ticks(thresholds) : yAxisLeft.tickValues(periods).ticks(innerHeight2 / 50);
|
|
26386
26623
|
};
|
|
26387
26624
|
const getChartType = (lineData) => {
|
|
26388
|
-
|
|
26625
|
+
const shouldAnimate = formatOptions.animation.animationEnabled;
|
|
26626
|
+
const bars = gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(bins).enter().append("g").selectAll("rect").data((d) => d).enter().append("rect").attr("class", "rect").attr(
|
|
26389
26627
|
"stroke",
|
|
26390
26628
|
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderColor
|
|
26391
26629
|
).attr(
|
|
@@ -26403,7 +26641,7 @@ const HorizontalHistogramChart = ({
|
|
|
26403
26641
|
const y12 = yScaleLeft(d.x1);
|
|
26404
26642
|
const gap = parseFloat(formatOptions.bins.binsGapWidth) || 0;
|
|
26405
26643
|
return Math.max(1, Math.abs(y12 - y02) - gap);
|
|
26406
|
-
}).attr("width",
|
|
26644
|
+
}).attr("width", 0).style("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("opacity", formatOptions.bins.binsFillOpacity).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
26407
26645
|
showTooltipOnMouseMove(
|
|
26408
26646
|
[
|
|
26409
26647
|
{
|
|
@@ -26425,6 +26663,8 @@ const HorizontalHistogramChart = ({
|
|
|
26425
26663
|
event2
|
|
26426
26664
|
);
|
|
26427
26665
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
26666
|
+
const finalBars = shouldAnimate ? bars.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : bars;
|
|
26667
|
+
finalBars.attr("width", (d) => xScale(d.length));
|
|
26428
26668
|
gTag.selectAll(".parentGroup").raise();
|
|
26429
26669
|
};
|
|
26430
26670
|
const setSVGContainer = (margin2) => {
|
|
@@ -26920,6 +27160,7 @@ const AreaChart = ({
|
|
|
26920
27160
|
const areaGeneratorStart = area().x(
|
|
26921
27161
|
(d) => xScale(d.dimension) ? xScale(d.dimension) : null
|
|
26922
27162
|
).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
|
|
27163
|
+
const enableTransition = formatOptions.animation.animationEnabled;
|
|
26923
27164
|
let areas = gTag.selectAll(".parentGroup").data([lineData]);
|
|
26924
27165
|
let focus = gTag.append("g").attr("class", "focusClass");
|
|
26925
27166
|
areas = areas.enter().append("g").attr("class", "areas lineGroup").attr("clip-path", `url(#${chartId}-clip)`).merge(areas);
|
|
@@ -26935,7 +27176,9 @@ const AreaChart = ({
|
|
|
26935
27176
|
"-"
|
|
26936
27177
|
)
|
|
26937
27178
|
).attr("d", (d) => areaGeneratorStart(d.data)).each(function(d) {
|
|
26938
|
-
{
|
|
27179
|
+
if (enableTransition) {
|
|
27180
|
+
select$2(this).transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("d", areaGenerator(d.data));
|
|
27181
|
+
} else {
|
|
26939
27182
|
select$2(this).attr("d", areaGenerator(d.data));
|
|
26940
27183
|
}
|
|
26941
27184
|
});
|
|
@@ -27456,6 +27699,7 @@ const StackAreaChart = ({
|
|
|
27456
27699
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
27457
27700
|
};
|
|
27458
27701
|
const getChartType = (lineData) => {
|
|
27702
|
+
const enableTransition = formatOptions.animation.animationEnabled;
|
|
27459
27703
|
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
27460
27704
|
lineData.forEach((lData) => {
|
|
27461
27705
|
lData.data.forEach((cData) => {
|
|
@@ -27482,7 +27726,9 @@ const StackAreaChart = ({
|
|
|
27482
27726
|
"hoverId",
|
|
27483
27727
|
(d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")
|
|
27484
27728
|
).attr("class", "area parentGroup").attr("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => areaGeneratorStart(d)).each(function(d) {
|
|
27485
|
-
{
|
|
27729
|
+
if (enableTransition) {
|
|
27730
|
+
select$2(this).transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("d", areaGenerator(d));
|
|
27731
|
+
} else {
|
|
27486
27732
|
select$2(this).attr("d", areaGenerator(d));
|
|
27487
27733
|
}
|
|
27488
27734
|
});
|
|
@@ -28011,6 +28257,7 @@ const NormalizedStackAreaChart = ({
|
|
|
28011
28257
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
28012
28258
|
};
|
|
28013
28259
|
const getChartType = (lineData) => {
|
|
28260
|
+
const enableTransition = formatOptions.animation.animationEnabled;
|
|
28014
28261
|
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
28015
28262
|
stackChartData.forEach(
|
|
28016
28263
|
(data2, i) => data2.forEach((item, position) => {
|
|
@@ -28045,7 +28292,9 @@ const NormalizedStackAreaChart = ({
|
|
|
28045
28292
|
(d) => (lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
28046
28293
|
).attr("class", "area parentGroup").attr("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => columnGeneratorStart(d)).each(function(d) {
|
|
28047
28294
|
const path2 = select$2(this);
|
|
28048
|
-
{
|
|
28295
|
+
if (enableTransition) {
|
|
28296
|
+
path2.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("d", columnGenerator(d));
|
|
28297
|
+
} else {
|
|
28049
28298
|
path2.attr("d", columnGenerator(d));
|
|
28050
28299
|
}
|
|
28051
28300
|
});
|
|
@@ -28480,13 +28729,13 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
28480
28729
|
try {
|
|
28481
28730
|
const arc2 = arc$1().innerRadius(0).outerRadius(radius);
|
|
28482
28731
|
const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
|
|
28483
|
-
chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`).selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path").attr(
|
|
28732
|
+
const paths = chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`).selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path").attr(
|
|
28484
28733
|
"hoverId",
|
|
28485
28734
|
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
28486
28735
|
).attr(
|
|
28487
28736
|
"fill",
|
|
28488
28737
|
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
28489
|
-
).
|
|
28738
|
+
).on("mouseover.arc", function(d) {
|
|
28490
28739
|
select$2(this).transition().duration(100).attr("d", arcOver);
|
|
28491
28740
|
}).on("mousemove. ", (d) => {
|
|
28492
28741
|
showTooltipOnMouseMove(
|
|
@@ -28517,6 +28766,17 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
28517
28766
|
select$2(this).transition().duration(100).attr("d", arc2);
|
|
28518
28767
|
hideTooltipOnMouseOut();
|
|
28519
28768
|
});
|
|
28769
|
+
if (chartFormatOptions.animation.animationEnabled) {
|
|
28770
|
+
paths.transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attrTween("d", function(d) {
|
|
28771
|
+
const interpolate2 = interpolate$4(
|
|
28772
|
+
{ startAngle: d.startAngle, endAngle: d.startAngle },
|
|
28773
|
+
d
|
|
28774
|
+
);
|
|
28775
|
+
return (t) => arc2(interpolate2(t));
|
|
28776
|
+
});
|
|
28777
|
+
} else {
|
|
28778
|
+
paths.attr("d", (d) => arc2(d));
|
|
28779
|
+
}
|
|
28520
28780
|
} catch (error) {
|
|
28521
28781
|
logError$2(fileName$8, "drawPieChart", error);
|
|
28522
28782
|
}
|
|
@@ -28889,7 +29149,7 @@ const DonutChart = ({
|
|
|
28889
29149
|
};
|
|
28890
29150
|
const drawDonutChart = () => {
|
|
28891
29151
|
try {
|
|
28892
|
-
const enableTransition =
|
|
29152
|
+
const enableTransition = chartFormatOptions.animation.animationEnabled;
|
|
28893
29153
|
const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius);
|
|
28894
29154
|
const arcOver = arc$1().innerRadius(innerRadius).outerRadius(radius + 10);
|
|
28895
29155
|
const parentGroup = chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`);
|
|
@@ -28903,8 +29163,9 @@ const DonutChart = ({
|
|
|
28903
29163
|
const thisPath = d;
|
|
28904
29164
|
thisPath._current = { startAngle: 0, endAngle: 0 };
|
|
28905
29165
|
}).on("mouseover.arc", function() {
|
|
28906
|
-
if (enableTransition)
|
|
28907
|
-
|
|
29166
|
+
if (enableTransition) {
|
|
29167
|
+
select$2(this).transition().duration(150).attr("d", arcOver);
|
|
29168
|
+
} else {
|
|
28908
29169
|
select$2(this).attr("d", arcOver);
|
|
28909
29170
|
}
|
|
28910
29171
|
}).on("mousemove.text", (d) => {
|
|
@@ -28931,13 +29192,23 @@ const DonutChart = ({
|
|
|
28931
29192
|
d.currentTarget.__data__.data.properties
|
|
28932
29193
|
);
|
|
28933
29194
|
}).on("mouseout.text", () => hideTooltipOnMouseOut()).on("mouseout.arc", function() {
|
|
28934
|
-
if (enableTransition)
|
|
28935
|
-
|
|
29195
|
+
if (enableTransition) {
|
|
29196
|
+
select$2(this).transition().duration(150).attr("d", arc2);
|
|
29197
|
+
} else {
|
|
28936
29198
|
select$2(this).attr("d", arc2);
|
|
28937
29199
|
}
|
|
28938
29200
|
});
|
|
28939
|
-
if (enableTransition)
|
|
28940
|
-
|
|
29201
|
+
if (enableTransition) {
|
|
29202
|
+
paths.transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attrTween("d", function(d) {
|
|
29203
|
+
const interpolate2 = interpolate$4(
|
|
29204
|
+
{ startAngle: d.startAngle, endAngle: d.startAngle },
|
|
29205
|
+
d
|
|
29206
|
+
);
|
|
29207
|
+
return function(t) {
|
|
29208
|
+
return arc2(interpolate2(t));
|
|
29209
|
+
};
|
|
29210
|
+
});
|
|
29211
|
+
} else {
|
|
28941
29212
|
paths.attr("d", (d) => arc2(d));
|
|
28942
29213
|
}
|
|
28943
29214
|
} catch (error) {
|
|
@@ -29385,8 +29656,9 @@ const Treemap = ({ data, formatOptions, chartId }) => {
|
|
|
29385
29656
|
};
|
|
29386
29657
|
const initChartRect = () => {
|
|
29387
29658
|
try {
|
|
29659
|
+
const shouldAnimate = chartFormatOptions.animation.animationEnabled;
|
|
29388
29660
|
const leaf = chartAreaTagG.selectAll("g").data(chartData).enter().append("g").attr("transform", (d) => `translate(${d.x0},${d.y0})`);
|
|
29389
|
-
leaf.append("rect").attr("fill", (d) => getColor(d.data)).attr("fill-opacity", 0.7).attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0).on("mousemove", (d, data2) => {
|
|
29661
|
+
const rects = leaf.append("rect").attr("fill", (d) => getColor(d.data)).attr("fill-opacity", shouldAnimate ? 0 : 0.7).attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0).on("mousemove", (d, data2) => {
|
|
29390
29662
|
showTooltipOnMouseMove(
|
|
29391
29663
|
[
|
|
29392
29664
|
{
|
|
@@ -29404,6 +29676,9 @@ const Treemap = ({ data, formatOptions, chartId }) => {
|
|
|
29404
29676
|
getMarkerColorForTooltip(d)
|
|
29405
29677
|
);
|
|
29406
29678
|
}).on("mouseout", () => hideTooltipOnMouseOut());
|
|
29679
|
+
if (shouldAnimate) {
|
|
29680
|
+
rects.transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("fill-opacity", 0.7);
|
|
29681
|
+
}
|
|
29407
29682
|
leaf.append("clipPath").attr("id", (d, i) => `clip-${i}-${chartId}`).append("rect").attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0);
|
|
29408
29683
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
29409
29684
|
leaf.append("text").style("fill", (d) => d.data.properties.labelFontColor).style("font-family", (d) => d.data.properties.fontFamily).style("font-size", (d) => d.data.properties.fontSize).style(
|
|
@@ -29564,10 +29839,10 @@ const PieofPie = ({
|
|
|
29564
29839
|
try {
|
|
29565
29840
|
const arc2 = arc$1().innerRadius(0).outerRadius(radius);
|
|
29566
29841
|
const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
|
|
29567
|
-
chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getParentPiePosition()}`).selectAll("path").data(pieOfPieData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr(
|
|
29842
|
+
const paths = chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getParentPiePosition()}`).selectAll("path").data(pieOfPieData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr(
|
|
29568
29843
|
"fill",
|
|
29569
29844
|
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
29570
|
-
).
|
|
29845
|
+
).on("mouseover.arc", function(d) {
|
|
29571
29846
|
select$2(this).transition().duration(100).attr("d", arcOver);
|
|
29572
29847
|
}).on("mousemove.text", (d) => {
|
|
29573
29848
|
showTooltipOnMouseMove(
|
|
@@ -29612,14 +29887,25 @@ const PieofPie = ({
|
|
|
29612
29887
|
logError$2(fileName$5, "drawPieChart_onClick", error);
|
|
29613
29888
|
}
|
|
29614
29889
|
});
|
|
29890
|
+
if (chartFormatOptions.animation.animationEnabled) {
|
|
29891
|
+
paths.transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attrTween("d", function(d) {
|
|
29892
|
+
const interpolate2 = interpolate$4(
|
|
29893
|
+
{ startAngle: d.startAngle, endAngle: d.startAngle },
|
|
29894
|
+
d
|
|
29895
|
+
);
|
|
29896
|
+
return (t) => arc2(interpolate2(t));
|
|
29897
|
+
});
|
|
29898
|
+
} else {
|
|
29899
|
+
paths.attr("d", (d) => arc2(d));
|
|
29900
|
+
}
|
|
29615
29901
|
} catch (error) {
|
|
29616
29902
|
logError$2(fileName$5, "drawPieChart", error);
|
|
29617
29903
|
}
|
|
29618
29904
|
};
|
|
29619
29905
|
const drawChildPie = (childData, rotate2, parentArc) => {
|
|
29620
29906
|
try {
|
|
29621
|
-
chartAreaTagG.select(".parentGroup").transition().attr("transform", `${getParentPiePosition()} rotate(${rotate2})`)
|
|
29622
|
-
chartAreaTagG.selectAll(".parentLabels").transition().attr("transform", `${getParentPiePosition()} rotate(${rotate2})`)
|
|
29907
|
+
chartAreaTagG.select(".parentGroup").transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("transform", `${getParentPiePosition()} rotate(${rotate2})`);
|
|
29908
|
+
chartAreaTagG.selectAll(".parentLabels").transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("transform", `${getParentPiePosition()} rotate(${rotate2})`);
|
|
29623
29909
|
const childPie = pie().value((d) => d.data[0].value);
|
|
29624
29910
|
let childPieData = childPie(childData).map((d, i) => ({
|
|
29625
29911
|
...d,
|
|
@@ -29847,8 +30133,8 @@ const PieofPie = ({
|
|
|
29847
30133
|
let radius2 = angleData.y1;
|
|
29848
30134
|
let y2 = radius2 * Math.sin(arcAngle);
|
|
29849
30135
|
let x2 = y2 / Math.tan(arcAngle);
|
|
29850
|
-
chartAreaTagG.append("line").
|
|
29851
|
-
chartAreaTagG.append("line").
|
|
30136
|
+
chartAreaTagG.append("line").style("stroke", chartFormatOptions.pieofPie.pieOfPieLineColor).style("stroke-width", chartFormatOptions.pieofPie.pieOfPieLineWidth).style("stroke-dasharray", "3, 3").attr("opacity", 0.5).attr("x1", parentPieX + x2).attr("y1", parentPieY - y2).attr("x2", childPieX).attr("y2", childPieY - childRadius);
|
|
30137
|
+
chartAreaTagG.append("line").style("stroke", chartFormatOptions.pieofPie.pieOfPieLineColor).style("stroke-width", chartFormatOptions.pieofPie.pieOfPieLineWidth).style("stroke-dasharray", "3, 3").attr("opacity", 0.5).attr("x1", parentPieX + x2).attr("y1", parentPieY + y2).attr("x2", childPieX).attr("y2", childPieY + childRadius);
|
|
29852
30138
|
} catch (error) {
|
|
29853
30139
|
logError$2(fileName$5, "drawLines", error);
|
|
29854
30140
|
}
|
|
@@ -29988,7 +30274,8 @@ const PyramidChart = ({
|
|
|
29988
30274
|
const bottomWidth = pyramidSide * (inversionConstant - stackHeightArray[i + 1] / pyramidHeight);
|
|
29989
30275
|
const centerX = innerWidth2 / 2;
|
|
29990
30276
|
const pyramidContainer = chartAreaTagG.append("g").attr("id", "PyramidChart").attr("class", "parentGroup");
|
|
29991
|
-
|
|
30277
|
+
const shouldAnimate = chartFormatOptions.animation.animationEnabled;
|
|
30278
|
+
const polygon = pyramidContainer.append("polygon").attr("class", "segment").attr("hoverId", d.legend.replace(/\s+/g, "-")).attr(
|
|
29992
30279
|
"points",
|
|
29993
30280
|
`
|
|
29994
30281
|
${centerX - topWidth / 2},${yTop}
|
|
@@ -29996,7 +30283,7 @@ const PyramidChart = ({
|
|
|
29996
30283
|
${centerX + bottomWidth / 2},${yBottom}
|
|
29997
30284
|
${centerX - bottomWidth / 2},${yBottom}
|
|
29998
30285
|
`
|
|
29999
|
-
).attr("fill", d.properties.color || "#4cb2ff").on("mousemove", function() {
|
|
30286
|
+
).attr("fill", d.properties.color || "#4cb2ff").attr("opacity", shouldAnimate ? 0 : 1).on("mousemove", function() {
|
|
30000
30287
|
try {
|
|
30001
30288
|
showTooltipOnMouseMove(
|
|
30002
30289
|
[
|
|
@@ -30029,6 +30316,9 @@ const PyramidChart = ({
|
|
|
30029
30316
|
logError$2(fileName$4, "drawPyramidChart.onMouseOut", error);
|
|
30030
30317
|
}
|
|
30031
30318
|
});
|
|
30319
|
+
if (shouldAnimate) {
|
|
30320
|
+
polygon.transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", 1);
|
|
30321
|
+
}
|
|
30032
30322
|
} catch (error) {
|
|
30033
30323
|
logError$2(fileName$4, "drawPyramidChart.forEach", error);
|
|
30034
30324
|
}
|
|
@@ -30430,7 +30720,7 @@ const ProgressChart = ({
|
|
|
30430
30720
|
}).attr(
|
|
30431
30721
|
"transform",
|
|
30432
30722
|
"translate(" + innerWidth2 / 2 + "," + innerHeight2 / 2 + ")"
|
|
30433
|
-
).transition().duration(
|
|
30723
|
+
).transition().duration(chartFormatOptions.animation.animationEnabled ? chartFormatOptions.animation.animationDuration : 0).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attrTween("d", function(d) {
|
|
30434
30724
|
try {
|
|
30435
30725
|
const interpolate2 = interpolate$4(0, progressAngle);
|
|
30436
30726
|
return function(t) {
|
|
@@ -30838,7 +31128,7 @@ const Speedometer = ({
|
|
|
30838
31128
|
}
|
|
30839
31129
|
let ratio = scale2(newValue);
|
|
30840
31130
|
let newAngle = config.minAngle + ratio * range2;
|
|
30841
|
-
pointer2.transition().duration(
|
|
31131
|
+
pointer2.transition().duration(chartFormatOptions.animation.animationEnabled ? chartFormatOptions.animation.animationDuration : 0).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("transform", "rotate(" + newAngle + ")");
|
|
30842
31132
|
} catch (error) {
|
|
30843
31133
|
logError$2(fileName2, "gauge.update", error);
|
|
30844
31134
|
}
|
|
@@ -31255,9 +31545,7 @@ const RadialBarChart = ({
|
|
|
31255
31545
|
}).on("mouseout", () => {
|
|
31256
31546
|
hideTooltipOnMouseOut();
|
|
31257
31547
|
});
|
|
31258
|
-
arcs.transition().
|
|
31259
|
-
(d, i) => chartFormatOptions.plotArea.arcTransition ? i * 200 : 0
|
|
31260
|
-
).duration(chartFormatOptions.plotArea.arcTransition ? 500 : 0).attrTween("d", arcTween);
|
|
31548
|
+
arcs.transition().duration(chartFormatOptions.animation.animationEnabled ? chartFormatOptions.animation.animationDuration : 0).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attrTween("d", arcTween);
|
|
31261
31549
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
31262
31550
|
const labelsData = getModifiedDataForLabels(ChartData);
|
|
31263
31551
|
svg2.selectAll(".arc-label-" + chartId).data(labelsData).enter().append("text").attr("class", "arc-label-" + chartId).attr("class", "parentGroup").attr("text-anchor", "start").attr("dy", (d, i) => (getOuterRadius(d.index ?? i) - getInnerRadius(d.index ?? i)) / 1.75).append("textPath").attr("xlink:href", (d, i) => `#arc-path-${d.index ?? i}-` + chartId).style("startOffset", "50%").attr("hoverId", (d) => d.legend.replaceAll(" ", "-")).text(
|
|
@@ -31647,11 +31935,11 @@ function requireD3Cloud() {
|
|
|
31647
31935
|
return false;
|
|
31648
31936
|
}
|
|
31649
31937
|
function cloudBounds(bounds, d) {
|
|
31650
|
-
var
|
|
31651
|
-
if (d.x + d.x0 <
|
|
31652
|
-
if (d.y + d.y0 <
|
|
31653
|
-
if (d.x + d.x1 >
|
|
31654
|
-
if (d.y + d.y1 >
|
|
31938
|
+
var b02 = bounds[0], b12 = bounds[1];
|
|
31939
|
+
if (d.x + d.x0 < b02.x) b02.x = d.x + d.x0;
|
|
31940
|
+
if (d.y + d.y0 < b02.y) b02.y = d.y + d.y0;
|
|
31941
|
+
if (d.x + d.x1 > b12.x) b12.x = d.x + d.x1;
|
|
31942
|
+
if (d.y + d.y1 > b12.y) b12.y = d.y + d.y1;
|
|
31655
31943
|
}
|
|
31656
31944
|
function collideRects(a2, b) {
|
|
31657
31945
|
return a2.x + a2.x1 > b[0].x && a2.x + a2.x0 < b[1].x && a2.y + a2.y1 > b[0].y && a2.y + a2.y0 < b[1].y;
|
|
@@ -32329,8 +32617,8 @@ function addMissingAreas(areas) {
|
|
|
32329
32617
|
pairs[[b, a2]] = true;
|
|
32330
32618
|
}
|
|
32331
32619
|
}
|
|
32332
|
-
ids.sort(function(a3,
|
|
32333
|
-
return a3 >
|
|
32620
|
+
ids.sort(function(a3, b10) {
|
|
32621
|
+
return a3 > b10;
|
|
32334
32622
|
});
|
|
32335
32623
|
for (i = 0; i < ids.length; ++i) {
|
|
32336
32624
|
a2 = ids[i];
|
|
@@ -54374,7 +54662,8 @@ const BubbleChart = ({
|
|
|
54374
54662
|
let maxBubbleSize = 30;
|
|
54375
54663
|
let sizeData = { minimumValue: minMeasure, maximumValue: maxMeasure };
|
|
54376
54664
|
const circles = chartAreaTagG.append("g").attr("class", "circles").attr("class", "parentGroup");
|
|
54377
|
-
|
|
54665
|
+
const shouldAnimate = chartFormatOptions.animation.animationEnabled;
|
|
54666
|
+
const bubblePaths = circles.append("g").selectAll(".bubbleScatter").data(data).enter().append("g").attr(
|
|
54378
54667
|
"hoverId",
|
|
54379
54668
|
(d) => d.legendName.replace(/ /g, "-")
|
|
54380
54669
|
).attr(
|
|
@@ -54397,7 +54686,7 @@ const BubbleChart = ({
|
|
|
54397
54686
|
);
|
|
54398
54687
|
}).attr("transform", function(d) {
|
|
54399
54688
|
return `translate(${xScale(d.dimension)}, ${yScale(d.measure)})`;
|
|
54400
|
-
}).attr("opacity", chartFormatOptions.plotArea.fillOpacity).style(
|
|
54689
|
+
}).attr("opacity", shouldAnimate ? 0 : chartFormatOptions.plotArea.fillOpacity).style(
|
|
54401
54690
|
"visibility",
|
|
54402
54691
|
(d, i) => d.dimension[0] === 0 || d.measure === 0 && chartFormatOptions.plotArea.hideZeroValues || d.dimension < customXaxisMinValue || d.dimension > customXaxisMaxValue || d.measure < customYaxisMinValue || d.measure > customYaxisMaxValue ? "hidden" : "visible"
|
|
54403
54692
|
).on("mousemove", (event2, d) => {
|
|
@@ -54427,6 +54716,9 @@ const BubbleChart = ({
|
|
|
54427
54716
|
}).on("mouseout", () => {
|
|
54428
54717
|
hideTooltipOnMouseOut();
|
|
54429
54718
|
});
|
|
54719
|
+
if (shouldAnimate) {
|
|
54720
|
+
bubblePaths.transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", chartFormatOptions.plotArea.fillOpacity);
|
|
54721
|
+
}
|
|
54430
54722
|
} catch (e) {
|
|
54431
54723
|
logError$2("BubbleChart", "initCircles", e);
|
|
54432
54724
|
}
|
|
@@ -54824,7 +55116,8 @@ const ScatterChart = ({
|
|
|
54824
55116
|
return Shape == "Square" ? square : Shape == "Circle" ? circle : Shape == "Cross" ? cross : Shape == "Triangle" ? triangle : Shape == "Star" ? star : Shape == "Diamond" ? diamond : Shape == "Wye" ? wye : circle;
|
|
54825
55117
|
};
|
|
54826
55118
|
const circles = chartAreaTagG.append("g").attr("class", "circles").attr("class", "parentGroup");
|
|
54827
|
-
|
|
55119
|
+
const shouldAnimate = chartFormatOptions.animation.animationEnabled;
|
|
55120
|
+
const scatterPaths = circles.append("g").selectAll(".bubbleScatter").data(data).enter().append("g").attr("fill", (d) => d.selectedColor).attr(
|
|
54828
55121
|
"colorId",
|
|
54829
55122
|
(d) => d.legendName.includes("-") ? d.legendName.split("-")[0].replace(/ /g, "-") : d.legendName.replace(/ /g, "-")
|
|
54830
55123
|
).attr(
|
|
@@ -54841,7 +55134,7 @@ const ScatterChart = ({
|
|
|
54841
55134
|
);
|
|
54842
55135
|
}).attr("transform", function(d) {
|
|
54843
55136
|
return `translate(${xScale(d.dimension)}, ${yScale(d.measure)})`;
|
|
54844
|
-
}).attr("opacity", chartFormatOptions.plotArea.fillOpacity).style(
|
|
55137
|
+
}).attr("opacity", shouldAnimate ? 0 : chartFormatOptions.plotArea.fillOpacity).style(
|
|
54845
55138
|
"visibility",
|
|
54846
55139
|
(d, i) => d.dimension[0] === 0 || d.measure === 0 && chartFormatOptions.plotArea.hideZeroValues || d.dimension < customXaxisMinValue || d.dimension > customXaxisMaxValue || d.measure < customYaxisMinValue || d.measure > customYaxisMaxValue ? "hidden" : "visible"
|
|
54847
55140
|
).on("mousemove", (event2, d) => {
|
|
@@ -54871,6 +55164,9 @@ const ScatterChart = ({
|
|
|
54871
55164
|
}).on("mouseout", () => {
|
|
54872
55165
|
hideTooltipOnMouseOut();
|
|
54873
55166
|
});
|
|
55167
|
+
if (shouldAnimate) {
|
|
55168
|
+
scatterPaths.transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", chartFormatOptions.plotArea.fillOpacity);
|
|
55169
|
+
}
|
|
54874
55170
|
} catch (e) {
|
|
54875
55171
|
logError$2(fileName, "initCircles", e);
|
|
54876
55172
|
}
|
|
@@ -55710,6 +56006,7 @@ const WaterfallChart = ({
|
|
|
55710
56006
|
(d) => d,
|
|
55711
56007
|
(d) => d.key || d.Key
|
|
55712
56008
|
);
|
|
56009
|
+
const shouldAnimate = formatOptions.animation.animationEnabled;
|
|
55713
56010
|
const rectsEnter = rects.enter().append("rect").attr("class", "rect").attr(
|
|
55714
56011
|
"class",
|
|
55715
56012
|
(d) => d.key ? d.key.replace(/ /g, "-") : d.Key.replace(/ /g, "-")
|
|
@@ -55718,10 +56015,7 @@ const WaterfallChart = ({
|
|
|
55718
56015
|
(d) => xScale(
|
|
55719
56016
|
!isAdvancedWaterfall ? d.data.dimension || d.data.legend : d.data.xKey
|
|
55720
56017
|
)
|
|
55721
|
-
).attr("y",
|
|
55722
|
-
"height",
|
|
55723
|
-
(d) => d[1] ? yScaleLeft(d[0]) - yScaleLeft(d[1]) : 0
|
|
55724
|
-
).attr("width", xScale.bandwidth()).attr(
|
|
56018
|
+
).attr("y", yScaleLeft(0) ?? 0).attr("clip-path", `url(#${chartId}-clip)`).attr("height", 0).attr("width", xScale.bandwidth()).attr(
|
|
55725
56019
|
"visibility",
|
|
55726
56020
|
(d) => k2 === 0 && d.data.dimension && stackTotalData ? "hidden" : "visible"
|
|
55727
56021
|
).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
@@ -55753,6 +56047,8 @@ const WaterfallChart = ({
|
|
|
55753
56047
|
}).on("mouseout", () => {
|
|
55754
56048
|
hideTooltipOnMouseOut();
|
|
55755
56049
|
});
|
|
56050
|
+
const finalRects = shouldAnimate ? rectsEnter.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : rectsEnter;
|
|
56051
|
+
finalRects.attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr("height", (d) => d[1] ? yScaleLeft(d[0]) - yScaleLeft(d[1]) : 0);
|
|
55756
56052
|
rects.exit().remove();
|
|
55757
56053
|
rects = rectsEnter.merge(rects);
|
|
55758
56054
|
if (formatOptions.plotArea.plotAreaDataLabel == "2" && k2 != 1) {
|
|
@@ -56396,7 +56692,8 @@ const TornadoChart = ({
|
|
|
56396
56692
|
const positiveBarColor = formatOptions.plotArea.plotAreaCalculatedHigh;
|
|
56397
56693
|
const negativeBarColor = formatOptions.plotArea.plotAreaCalculatedLow;
|
|
56398
56694
|
const parent = gTag.append("g").attr("class", "parentGroup");
|
|
56399
|
-
|
|
56695
|
+
const shouldAnimate = formatOptions.animation.animationEnabled;
|
|
56696
|
+
const bars = parent.selectAll("rect").data(
|
|
56400
56697
|
filteredData.flatMap(
|
|
56401
56698
|
(d) => d.data.map((child) => ({
|
|
56402
56699
|
...child,
|
|
@@ -56407,7 +56704,7 @@ const TornadoChart = ({
|
|
|
56407
56704
|
).enter().append("rect").attr("class", "rect").attr(
|
|
56408
56705
|
"y",
|
|
56409
56706
|
(d) => (d.legendText ? yScaleLeft(d.legendText) : yScaleLeft(chartTypes.TornadoDefaultEntry)) - columnWidth / 2
|
|
56410
|
-
).attr("height", columnWidth).attr("x",
|
|
56707
|
+
).attr("height", columnWidth).attr("x", xScale(0)).attr("width", 0).style("shape-rendering", "crispEdges").attr(
|
|
56411
56708
|
"stroke-dasharray",
|
|
56412
56709
|
(d) => d.properties.stackBorderStyle == 2 ? "5,3" : "0"
|
|
56413
56710
|
).attr("stroke-width", (d) => `${d.properties.stackBorderWidth}px`).attr(
|
|
@@ -56443,6 +56740,8 @@ const TornadoChart = ({
|
|
|
56443
56740
|
!data.IsCalCSensitivity ? d.properties : d.properties.legend === "Calculated Low(-ve)" ? { markerColor: formatOptions.plotArea.plotAreaCalculatedLow } : { markerColor: formatOptions.plotArea.plotAreaCalculatedHigh }
|
|
56444
56741
|
);
|
|
56445
56742
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
56743
|
+
const finalBars = shouldAnimate ? bars.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]) : bars;
|
|
56744
|
+
finalBars.attr("x", (d) => d.value >= 0 ? xScale(0) : xScale(d.value)).attr("width", (d) => Math.abs(xScale(d.value) - xScale(0)));
|
|
56446
56745
|
};
|
|
56447
56746
|
const setSVGContainer = (margin2) => {
|
|
56448
56747
|
innerWidth2 = width - margin2.left - margin2.right;
|
|
@@ -56987,14 +57286,16 @@ const DotPlot = ({
|
|
|
56987
57286
|
).merge(column);
|
|
56988
57287
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.dimension);
|
|
56989
57288
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group");
|
|
56990
|
-
|
|
57289
|
+
const shouldAnimate = formatOptions.animation.animationEnabled;
|
|
57290
|
+
const enteringDots = columnGroupsEnter.append("path").attr("class", "cleveland-dot").attr("opacity", shouldAnimate ? 0 : 0.9);
|
|
57291
|
+
enteringDots.merge(columnGroups.select("path")).attr(
|
|
56991
57292
|
"d",
|
|
56992
57293
|
(d) => Symbol$1().type(Markershapes(d.markerShape)).size((d.markerSize || 6) * 70)()
|
|
56993
57294
|
).attr("transform", (d) => {
|
|
56994
57295
|
const x2 = xScaleBottom(d.value);
|
|
56995
57296
|
const y2 = yScale(d.dimension);
|
|
56996
57297
|
return `translate(${x2},${y2})`;
|
|
56997
|
-
}).attr("fill", (d) => data2.properties.color).attr(
|
|
57298
|
+
}).attr("fill", (d) => data2.properties.color).attr(
|
|
56998
57299
|
"visibility",
|
|
56999
57300
|
() => formatOptions.marker?.markerVisibility ? "visible" : "hidden"
|
|
57000
57301
|
).on("mousemove", (event2, d) => {
|
|
@@ -57027,6 +57328,9 @@ const DotPlot = ({
|
|
|
57027
57328
|
selectAll(".halo").remove();
|
|
57028
57329
|
hideTooltipOnMouseOut();
|
|
57029
57330
|
});
|
|
57331
|
+
if (shouldAnimate) {
|
|
57332
|
+
enteringDots.transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("opacity", 0.9);
|
|
57333
|
+
}
|
|
57030
57334
|
columnGroups.exit().remove();
|
|
57031
57335
|
});
|
|
57032
57336
|
gTag.selectAll(".parentGroup").raise();
|
|
@@ -57567,17 +57871,8 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57567
57871
|
maintainAspectRatio: false,
|
|
57568
57872
|
plugins: {
|
|
57569
57873
|
// ---- Title ----
|
|
57570
|
-
|
|
57571
|
-
|
|
57572
|
-
text: formatOptions.chartTitle?.dynamicTitleText || formatOptions.chartTitle?.chartTitleText || "",
|
|
57573
|
-
color: formatOptions.chartTitle?.chartTitleColor ?? "#000000",
|
|
57574
|
-
font: {
|
|
57575
|
-
size: parseInt(formatOptions.chartTitle?.chartTitleFontSize ?? "15", 10),
|
|
57576
|
-
family: formatOptions.chartTitle?.chartTitleFontFamily ?? "Helvetica",
|
|
57577
|
-
style: getFontStyle(formatOptions.chartTitle?.chartTitleFontStyle),
|
|
57578
|
-
weight: getFontWeight(formatOptions.chartTitle?.chartTitleFontStyle)
|
|
57579
|
-
}
|
|
57580
|
-
},
|
|
57874
|
+
// Title is rendered as a separate DOM element in ChartJSWrapper
|
|
57875
|
+
title: { display: false },
|
|
57581
57876
|
// ---- Legend ----
|
|
57582
57877
|
legend: {
|
|
57583
57878
|
display: formatOptions.legends?.legendVisibility !== false && formatOptions.legends?.legendPosition !== "None",
|
|
@@ -57607,9 +57902,10 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57607
57902
|
callbacks: {
|
|
57608
57903
|
label(ctx) {
|
|
57609
57904
|
const value2 = typeof ctx.raw === "number" ? ctx.raw : ctx.raw?.y ?? 0;
|
|
57610
|
-
const formatted =
|
|
57905
|
+
const formatted = getNumberWithFormat(
|
|
57611
57906
|
value2,
|
|
57612
57907
|
formatOptions.toolTip?.toolTipDisplayUnits ?? "None",
|
|
57908
|
+
formatOptions.toolTip?.toolTipNumberFormat ?? ",",
|
|
57613
57909
|
formatOptions.toolTip?.toolTipDecimalPrecision ?? "2"
|
|
57614
57910
|
);
|
|
57615
57911
|
return ` ${ctx.dataset.label}: ${formatted}`;
|
|
@@ -57620,13 +57916,13 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57620
57916
|
// This block is only active when chartjs-plugin-datalabels is registered in ChartJSWrapper.
|
|
57621
57917
|
datalabels: buildDataLabelsConfig(formatOptions, chartType)
|
|
57622
57918
|
},
|
|
57623
|
-
animation: formatOptions.
|
|
57624
|
-
duration: formatOptions.
|
|
57919
|
+
animation: formatOptions.animation?.animationEnabled === true ? {
|
|
57920
|
+
duration: formatOptions.animation?.animationDuration ?? 1e3
|
|
57625
57921
|
} : false
|
|
57626
57922
|
};
|
|
57627
57923
|
if (!isCircular) {
|
|
57628
57924
|
const xScaleOptions = {
|
|
57629
|
-
display:
|
|
57925
|
+
display: true,
|
|
57630
57926
|
title: {
|
|
57631
57927
|
display: formatOptions.xAxisTitle?.xAxisTitleVisibility !== false,
|
|
57632
57928
|
text: formatOptions.xAxisTitle?.xAxisTitleText ?? "Dimension",
|
|
@@ -57638,14 +57934,16 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57638
57934
|
}
|
|
57639
57935
|
},
|
|
57640
57936
|
ticks: {
|
|
57937
|
+
display: formatOptions.xAxisLabel?.xAxisLabelVisibility !== false,
|
|
57641
57938
|
color: formatOptions.xAxisLabel?.xAxisLabelColor ?? "#000000",
|
|
57642
57939
|
font: {
|
|
57643
57940
|
size: parseInt(formatOptions.xAxisLabel?.xAxisLabelFontSize ?? "11", 10),
|
|
57644
57941
|
family: formatOptions.xAxisLabel?.xAxisLabelFontFamily ?? "Helvetica",
|
|
57645
|
-
style: getFontStyle(formatOptions.xAxisLabel?.xAxisLabelFontStyle)
|
|
57942
|
+
style: getFontStyle(formatOptions.xAxisLabel?.xAxisLabelFontStyle),
|
|
57943
|
+
weight: getFontWeight(formatOptions.xAxisLabel?.xAxisLabelFontStyle)
|
|
57646
57944
|
},
|
|
57647
57945
|
maxRotation: isHorizontal ? 0 : formatOptions.xAxisLabel?.xAxisLabelRotation ?? 0,
|
|
57648
|
-
minRotation: 0
|
|
57946
|
+
minRotation: isHorizontal ? 0 : formatOptions.xAxisLabel?.xAxisLabelRotation ?? 0
|
|
57649
57947
|
},
|
|
57650
57948
|
grid: {
|
|
57651
57949
|
display: formatOptions.plotArea?.gridLinesVisibility !== false && formatOptions.plotArea?.gridLinesVertical !== false,
|
|
@@ -57657,7 +57955,7 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57657
57955
|
}
|
|
57658
57956
|
};
|
|
57659
57957
|
const yScaleOptions = {
|
|
57660
|
-
display:
|
|
57958
|
+
display: true,
|
|
57661
57959
|
position: "left",
|
|
57662
57960
|
title: {
|
|
57663
57961
|
display: formatOptions.yAxisTitle?.yAxisTitleVisibility !== false,
|
|
@@ -57670,11 +57968,13 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57670
57968
|
}
|
|
57671
57969
|
},
|
|
57672
57970
|
ticks: {
|
|
57971
|
+
display: formatOptions.yAxisLabel?.yAxisLabelVisibility !== false,
|
|
57673
57972
|
color: formatOptions.yAxisLabel?.yAxisLabelColor ?? "#000000",
|
|
57674
57973
|
font: {
|
|
57675
57974
|
size: parseInt(formatOptions.yAxisLabel?.yAxisLabelFontSize ?? "11", 10),
|
|
57676
57975
|
family: formatOptions.yAxisLabel?.yAxisLabelFontFamily ?? "Helvetica",
|
|
57677
|
-
style: getFontStyle(formatOptions.yAxisLabel?.yAxisLabelFontStyle)
|
|
57976
|
+
style: getFontStyle(formatOptions.yAxisLabel?.yAxisLabelFontStyle),
|
|
57977
|
+
weight: getFontWeight(formatOptions.yAxisLabel?.yAxisLabelFontStyle)
|
|
57678
57978
|
},
|
|
57679
57979
|
callback(value2) {
|
|
57680
57980
|
return formatValueForAxis(
|
|
@@ -57689,7 +57989,7 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57689
57989
|
color: gridColor
|
|
57690
57990
|
},
|
|
57691
57991
|
border: {
|
|
57692
|
-
color: formatOptions.yAxisLabel?.
|
|
57992
|
+
color: formatOptions.yAxisLabel?.yAxisColor ?? "#cccccc",
|
|
57693
57993
|
width: parseFloat(formatOptions.yAxisLabel?.yAxisWidth ?? "0.5")
|
|
57694
57994
|
}
|
|
57695
57995
|
};
|
|
@@ -57704,12 +58004,17 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57704
58004
|
if (opts.scales.y.title) {
|
|
57705
58005
|
opts.scales.y.title.text = formatOptions.xAxisTitle?.xAxisTitleText ?? "Dimension";
|
|
57706
58006
|
}
|
|
58007
|
+
const hRot = formatOptions.xAxisLabel?.xAxisLabelRotation ?? 0;
|
|
58008
|
+
if (opts.scales.x.ticks) {
|
|
58009
|
+
opts.scales.x.ticks.maxRotation = hRot;
|
|
58010
|
+
opts.scales.x.ticks.minRotation = hRot;
|
|
58011
|
+
}
|
|
57707
58012
|
} else {
|
|
57708
58013
|
opts.scales = { x: xScaleOptions, y: yScaleOptions };
|
|
57709
58014
|
}
|
|
57710
58015
|
if (hasSecondaryAxis) {
|
|
57711
58016
|
opts.scales.y1 = {
|
|
57712
|
-
display:
|
|
58017
|
+
display: true,
|
|
57713
58018
|
position: "right",
|
|
57714
58019
|
title: {
|
|
57715
58020
|
display: formatOptions.secondaryYAxisTitle?.secondaryYAxisTitleVisibility !== false,
|
|
@@ -57721,9 +58026,13 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57721
58026
|
}
|
|
57722
58027
|
},
|
|
57723
58028
|
ticks: {
|
|
58029
|
+
display: formatOptions.secondaryYAxisLabel?.secondaryYAxisLabelVisibility !== false,
|
|
57724
58030
|
color: formatOptions.secondaryYAxisLabel?.secondaryYAxisLabelColor ?? "#000000",
|
|
57725
58031
|
font: {
|
|
57726
|
-
size: parseInt(formatOptions.secondaryYAxisLabel?.secondaryYAxisLabelFontSize ?? "11", 10)
|
|
58032
|
+
size: parseInt(formatOptions.secondaryYAxisLabel?.secondaryYAxisLabelFontSize ?? "11", 10),
|
|
58033
|
+
family: formatOptions.secondaryYAxisLabel?.secondaryYAxisLabelFontFamily ?? "Helvetica",
|
|
58034
|
+
style: getFontStyle(formatOptions.secondaryYAxisLabel?.secondaryYAxisLabelFontStyle),
|
|
58035
|
+
weight: getFontWeight(formatOptions.secondaryYAxisLabel?.secondaryYAxisLabelFontStyle)
|
|
57727
58036
|
},
|
|
57728
58037
|
callback(value2) {
|
|
57729
58038
|
return formatValueForAxis(
|
|
@@ -57733,7 +58042,11 @@ function mapFormatOptionsToChartJS(formatOptions, chartType, hasSecondaryAxis =
|
|
|
57733
58042
|
);
|
|
57734
58043
|
}
|
|
57735
58044
|
},
|
|
57736
|
-
grid: { drawOnChartArea: false }
|
|
58045
|
+
grid: { drawOnChartArea: false },
|
|
58046
|
+
border: {
|
|
58047
|
+
color: formatOptions.secondaryYAxisLabel?.secondaryYAxisColor ?? "#000000",
|
|
58048
|
+
width: parseFloat(formatOptions.secondaryYAxisLabel?.secondaryYAxisWidth ?? "0.5")
|
|
58049
|
+
}
|
|
57737
58050
|
};
|
|
57738
58051
|
}
|
|
57739
58052
|
const isStacked2 = chartType.toLowerCase().includes("stack");
|
|
@@ -57755,6 +58068,7 @@ function getRawValue(raw) {
|
|
|
57755
58068
|
function buildDataLabelsConfig(formatOptions, chartType = "bar") {
|
|
57756
58069
|
const annotation2 = formatOptions.annotation;
|
|
57757
58070
|
const isCircular = chartType === "pie" || chartType === "doughnut" || chartType === "polarArea";
|
|
58071
|
+
const isHorizontal = chartType === "horizontalBar";
|
|
57758
58072
|
const visibilityStr = annotation2?.annotationVisibility ?? "5";
|
|
57759
58073
|
if (visibilityStr === "5" || !visibilityStr) {
|
|
57760
58074
|
return { display: false };
|
|
@@ -57766,7 +58080,8 @@ function buildDataLabelsConfig(formatOptions, chartType = "bar") {
|
|
|
57766
58080
|
const fontStyle = getFontStyle(annotation2?.annotationFontStyle);
|
|
57767
58081
|
const fontWeight = getFontWeight(annotation2?.annotationFontStyle);
|
|
57768
58082
|
const labelColor = annotation2?.annotationColor ?? "#000000";
|
|
57769
|
-
const
|
|
58083
|
+
const useSeriesColor = annotation2?.annotationSetLabelColor === "2";
|
|
58084
|
+
const decimalPrecision = annotation2?.annotationDecimalPrecision ?? "2";
|
|
57770
58085
|
const numberFormat = annotation2?.annotationNumberFormat ?? ",";
|
|
57771
58086
|
const displayUnits = annotation2?.annotationDisplayUnits ?? "None";
|
|
57772
58087
|
function display(ctx) {
|
|
@@ -57816,14 +58131,25 @@ function buildDataLabelsConfig(formatOptions, chartType = "bar") {
|
|
|
57816
58131
|
return positionStr === "2" ? "center" : "end";
|
|
57817
58132
|
}
|
|
57818
58133
|
const v = getCtxValue(ctx);
|
|
58134
|
+
if (isHorizontal) {
|
|
58135
|
+
switch (positionStr) {
|
|
58136
|
+
case "2":
|
|
58137
|
+
return "center";
|
|
58138
|
+
case "3":
|
|
58139
|
+
return "right";
|
|
58140
|
+
// baseline side → point into bar (rightward from zero for pos, rightward toward zero for neg)
|
|
58141
|
+
case "1":
|
|
58142
|
+
case "4":
|
|
58143
|
+
default:
|
|
58144
|
+
return v < 0 ? "left" : "right";
|
|
58145
|
+
}
|
|
58146
|
+
}
|
|
57819
58147
|
switch (positionStr) {
|
|
57820
58148
|
case "2":
|
|
57821
58149
|
return "center";
|
|
57822
58150
|
case "3":
|
|
57823
58151
|
return v > 0 ? "top" : "bottom";
|
|
57824
|
-
//
|
|
57825
|
-
// positive: above zero = inside bar base
|
|
57826
|
-
// negative: above extreme = toward zero = inside bar
|
|
58152
|
+
// inside bar near baseline
|
|
57827
58153
|
case "1":
|
|
57828
58154
|
case "4":
|
|
57829
58155
|
default:
|
|
@@ -57833,23 +58159,7 @@ function buildDataLabelsConfig(formatOptions, chartType = "bar") {
|
|
|
57833
58159
|
function formatter2(raw, ctx) {
|
|
57834
58160
|
const v = getRawValue(raw);
|
|
57835
58161
|
if (hideZero && v === 0) return null;
|
|
57836
|
-
|
|
57837
|
-
if (displayUnits === "Thousands") scaled = v / 1e3;
|
|
57838
|
-
else if (displayUnits === "Millions") scaled = v / 1e6;
|
|
57839
|
-
else if (displayUnits === "Billions") scaled = v / 1e9;
|
|
57840
|
-
let formattedValue;
|
|
57841
|
-
if (numberFormat === ",.0%") {
|
|
57842
|
-
formattedValue = (scaled / 100).toLocaleString(void 0, {
|
|
57843
|
-
style: "percent",
|
|
57844
|
-
minimumFractionDigits: decimalPrecision,
|
|
57845
|
-
maximumFractionDigits: decimalPrecision
|
|
57846
|
-
});
|
|
57847
|
-
} else {
|
|
57848
|
-
formattedValue = scaled.toLocaleString(void 0, {
|
|
57849
|
-
minimumFractionDigits: decimalPrecision,
|
|
57850
|
-
maximumFractionDigits: decimalPrecision
|
|
57851
|
-
});
|
|
57852
|
-
}
|
|
58162
|
+
const formattedValue = getNumberWithFormat(v, displayUnits, numberFormat, decimalPrecision);
|
|
57853
58163
|
if (isCircular) {
|
|
57854
58164
|
const label = ctx?.chart?.data?.labels?.[ctx.dataIndex] ?? "";
|
|
57855
58165
|
return label ? `${label}
|
|
@@ -57862,7 +58172,12 @@ ${formattedValue}` : formattedValue;
|
|
|
57862
58172
|
anchor,
|
|
57863
58173
|
align,
|
|
57864
58174
|
offset: isCircular ? positionStr === "2" ? 0 : 8 : positionStr === "2" ? 0 : 4,
|
|
57865
|
-
color:
|
|
58175
|
+
color: useSeriesColor ? (ctx) => {
|
|
58176
|
+
const bg = ctx.dataset?.backgroundColor;
|
|
58177
|
+
const border = ctx.dataset?.borderColor;
|
|
58178
|
+
const c2 = Array.isArray(bg) ? bg[ctx.dataIndex] : bg;
|
|
58179
|
+
return typeof c2 === "string" && c2 ? c2 : typeof border === "string" && border ? border : labelColor;
|
|
58180
|
+
} : labelColor,
|
|
57866
58181
|
font: {
|
|
57867
58182
|
size: fontSize,
|
|
57868
58183
|
family: fontFamily,
|
|
@@ -62104,8 +62419,8 @@ function parseArrayOrPrimitive(meta, data, start2, count2) {
|
|
|
62104
62419
|
}
|
|
62105
62420
|
return parsed;
|
|
62106
62421
|
}
|
|
62107
|
-
function isFloatBar(
|
|
62108
|
-
return
|
|
62422
|
+
function isFloatBar(custom16) {
|
|
62423
|
+
return custom16 && custom16.barStart !== void 0 && custom16.barEnd !== void 0;
|
|
62109
62424
|
}
|
|
62110
62425
|
function barSign(size, vScale, actualBase) {
|
|
62111
62426
|
if (size !== 0) {
|
|
@@ -62247,10 +62562,10 @@ class BarController extends DatasetController {
|
|
|
62247
62562
|
}
|
|
62248
62563
|
updateRangeFromParsed(range2, scale2, parsed, stack2) {
|
|
62249
62564
|
super.updateRangeFromParsed(range2, scale2, parsed, stack2);
|
|
62250
|
-
const
|
|
62251
|
-
if (
|
|
62252
|
-
range2.min = Math.min(range2.min,
|
|
62253
|
-
range2.max = Math.max(range2.max,
|
|
62565
|
+
const custom16 = parsed._custom;
|
|
62566
|
+
if (custom16 && scale2 === this._cachedMeta.vScale) {
|
|
62567
|
+
range2.min = Math.min(range2.min, custom16.min);
|
|
62568
|
+
range2.max = Math.max(range2.max, custom16.max);
|
|
62254
62569
|
}
|
|
62255
62570
|
}
|
|
62256
62571
|
getMaxOverflow() {
|
|
@@ -62260,8 +62575,8 @@ class BarController extends DatasetController {
|
|
|
62260
62575
|
const meta = this._cachedMeta;
|
|
62261
62576
|
const { iScale, vScale } = meta;
|
|
62262
62577
|
const parsed = this.getParsed(index2);
|
|
62263
|
-
const
|
|
62264
|
-
const value2 = isFloatBar(
|
|
62578
|
+
const custom16 = parsed._custom;
|
|
62579
|
+
const value2 = isFloatBar(custom16) ? "[" + custom16.start + ", " + custom16.end + "]" : "" + vScale.getLabelForValue(parsed[vScale.axis]);
|
|
62265
62580
|
return {
|
|
62266
62581
|
label: "" + iScale.getLabelForValue(parsed[iScale.axis]),
|
|
62267
62582
|
value: value2
|
|
@@ -62390,8 +62705,8 @@ class BarController extends DatasetController {
|
|
|
62390
62705
|
const { _cachedMeta: { vScale, _stacked, index: datasetIndex }, options: { base: baseValue, minBarLength } } = this;
|
|
62391
62706
|
const actualBase = baseValue || 0;
|
|
62392
62707
|
const parsed = this.getParsed(index2);
|
|
62393
|
-
const
|
|
62394
|
-
const floating = isFloatBar(
|
|
62708
|
+
const custom16 = parsed._custom;
|
|
62709
|
+
const floating = isFloatBar(custom16);
|
|
62395
62710
|
let value2 = parsed[vScale.axis];
|
|
62396
62711
|
let start2 = 0;
|
|
62397
62712
|
let length = _stacked ? this.applyStack(vScale, parsed, _stacked) : value2;
|
|
@@ -62401,9 +62716,9 @@ class BarController extends DatasetController {
|
|
|
62401
62716
|
length = value2;
|
|
62402
62717
|
}
|
|
62403
62718
|
if (floating) {
|
|
62404
|
-
value2 =
|
|
62405
|
-
length =
|
|
62406
|
-
if (value2 !== 0 && sign(value2) !== sign(
|
|
62719
|
+
value2 = custom16.barStart;
|
|
62720
|
+
length = custom16.barEnd - custom16.barStart;
|
|
62721
|
+
if (value2 !== 0 && sign(value2) !== sign(custom16.barEnd)) {
|
|
62407
62722
|
start2 = 0;
|
|
62408
62723
|
}
|
|
62409
62724
|
start2 += value2;
|
|
@@ -72925,7 +73240,13 @@ const ChartJSWrapper = ({
|
|
|
72925
73240
|
};
|
|
72926
73241
|
}, [chartType, data, options, isChartStacked]);
|
|
72927
73242
|
const bgColor = formatOptions.chartArea?.chartAreaColor ?? "#ffffff";
|
|
72928
|
-
|
|
73243
|
+
const titleFontStyle = Array.isArray(formatOptions.chartTitle?.chartTitleFontStyle) ? formatOptions.chartTitle.chartTitleFontStyle : [];
|
|
73244
|
+
const titleColor = formatOptions.chartTitle?.chartTitleColor && formatOptions.chartTitle.chartTitleColor !== "#ffffff" && formatOptions.chartTitle.chartTitleColor !== "#FFFFFF00" ? formatOptions.chartTitle.chartTitleColor : "rgba(119,119,119)";
|
|
73245
|
+
const titleFontSize = formatOptions.chartTitle?.chartTitleFontSize ? `${formatOptions.chartTitle.chartTitleFontSize}px` : "16px";
|
|
73246
|
+
const titleText = formatOptions.chartTitle?.dynamicTitleText || formatOptions.chartTitle?.chartTitleText || "";
|
|
73247
|
+
const titleHTML = formatOptions.chartTitle?.chartTitleHTML || titleText;
|
|
73248
|
+
const titleVisible = formatOptions.chartTitle?.chartTitleVisibility !== false;
|
|
73249
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
72929
73250
|
"div",
|
|
72930
73251
|
{
|
|
72931
73252
|
className,
|
|
@@ -72933,9 +73254,37 @@ const ChartJSWrapper = ({
|
|
|
72933
73254
|
width: "100%",
|
|
72934
73255
|
height: "100%",
|
|
72935
73256
|
backgroundColor: bgColor,
|
|
72936
|
-
position: "relative"
|
|
73257
|
+
position: "relative",
|
|
73258
|
+
display: "flex",
|
|
73259
|
+
flexDirection: "column"
|
|
72937
73260
|
},
|
|
72938
|
-
children:
|
|
73261
|
+
children: [
|
|
73262
|
+
titleVisible && titleText && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
73263
|
+
"div",
|
|
73264
|
+
{
|
|
73265
|
+
id: "chartTitleId",
|
|
73266
|
+
className: "chartTiltle",
|
|
73267
|
+
title: formatOptions.chartTitle?.chartTitleText,
|
|
73268
|
+
style: {
|
|
73269
|
+
color: titleColor,
|
|
73270
|
+
fontSize: titleFontSize,
|
|
73271
|
+
fontFamily: formatOptions.chartTitle?.chartTitleFontFamily,
|
|
73272
|
+
fontStyle: titleFontStyle.includes("Italic") ? "italic" : "normal",
|
|
73273
|
+
fontWeight: titleFontStyle.includes("Bold") ? "bold" : "normal",
|
|
73274
|
+
textDecoration: titleFontStyle.includes("Underline") ? "underline" : "none",
|
|
73275
|
+
whiteSpace: "pre",
|
|
73276
|
+
textOverflow: "ellipsis",
|
|
73277
|
+
overflow: "hidden",
|
|
73278
|
+
lineHeight: "1.3em",
|
|
73279
|
+
userSelect: "none",
|
|
73280
|
+
padding: "2px 4px",
|
|
73281
|
+
flexShrink: 0
|
|
73282
|
+
},
|
|
73283
|
+
dangerouslySetInnerHTML: { __html: titleHTML }
|
|
73284
|
+
}
|
|
73285
|
+
),
|
|
73286
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("canvas", { ref: canvasRef, style: { width: "100%", height: "100%" } }) })
|
|
73287
|
+
]
|
|
72939
73288
|
}
|
|
72940
73289
|
);
|
|
72941
73290
|
};
|