pace-chart-lib 1.0.49 → 1.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisFunctions.d.ts +1 -1
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisTypes.types.d.ts +1 -1
- package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/{ClevelandDotPlot.d.ts → DotPlot.d.ts} +2 -2
- package/dist/Components/Charts/Core/Common.types.d.ts +5 -0
- package/dist/Components/Charts/Core/CommonFunctions.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/pace-chart-lib.es.js +509 -300
- package/dist/pace-chart-lib.umd.js +509 -300
- package/package.json +1 -1
|
@@ -562,6 +562,27 @@
|
|
|
562
562
|
function identity$8(x2) {
|
|
563
563
|
return x2;
|
|
564
564
|
}
|
|
565
|
+
function group(values, ...keys) {
|
|
566
|
+
return nest(values, identity$8, identity$8, keys);
|
|
567
|
+
}
|
|
568
|
+
function nest(values, map2, reduce, keys) {
|
|
569
|
+
return (function regroup(values2, i) {
|
|
570
|
+
if (i >= keys.length) return reduce(values2);
|
|
571
|
+
const groups = new InternMap();
|
|
572
|
+
const keyof2 = keys[i++];
|
|
573
|
+
let index2 = -1;
|
|
574
|
+
for (const value2 of values2) {
|
|
575
|
+
const key = keyof2(value2, ++index2, values2);
|
|
576
|
+
const group2 = groups.get(key);
|
|
577
|
+
if (group2) group2.push(value2);
|
|
578
|
+
else groups.set(key, [value2]);
|
|
579
|
+
}
|
|
580
|
+
for (const [key, values3] of groups) {
|
|
581
|
+
groups.set(key, regroup(values3, i));
|
|
582
|
+
}
|
|
583
|
+
return map2(groups);
|
|
584
|
+
})(values, 0);
|
|
585
|
+
}
|
|
565
586
|
function compareDefined(compare = ascending$3) {
|
|
566
587
|
if (compare === ascending$3) return ascendingDefined;
|
|
567
588
|
if (typeof compare !== "function") throw new TypeError("compare is not a function");
|
|
@@ -1060,8 +1081,8 @@
|
|
|
1060
1081
|
function selection_select$2(select2) {
|
|
1061
1082
|
if (typeof select2 !== "function") select2 = selector$2(select2);
|
|
1062
1083
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
1063
|
-
for (var
|
|
1064
|
-
if ((node =
|
|
1084
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
1085
|
+
if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
|
|
1065
1086
|
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
1066
1087
|
subgroup[i] = subnode;
|
|
1067
1088
|
}
|
|
@@ -1089,9 +1110,9 @@
|
|
|
1089
1110
|
if (typeof select2 === "function") select2 = arrayAll(select2);
|
|
1090
1111
|
else select2 = selectorAll$2(select2);
|
|
1091
1112
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
1092
|
-
for (var
|
|
1093
|
-
if (node =
|
|
1094
|
-
subgroups.push(select2.call(node, node.__data__, i,
|
|
1113
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
1114
|
+
if (node = group2[i]) {
|
|
1115
|
+
subgroups.push(select2.call(node, node.__data__, i, group2));
|
|
1095
1116
|
parents.push(node);
|
|
1096
1117
|
}
|
|
1097
1118
|
}
|
|
@@ -1135,8 +1156,8 @@
|
|
|
1135
1156
|
function selection_filter$2(match) {
|
|
1136
1157
|
if (typeof match !== "function") match = matcher$2(match);
|
|
1137
1158
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
1138
|
-
for (var
|
|
1139
|
-
if ((node =
|
|
1159
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
1160
|
+
if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
|
|
1140
1161
|
subgroup.push(node);
|
|
1141
1162
|
}
|
|
1142
1163
|
}
|
|
@@ -1176,10 +1197,10 @@
|
|
|
1176
1197
|
return x2;
|
|
1177
1198
|
};
|
|
1178
1199
|
}
|
|
1179
|
-
function bindIndex$2(parent,
|
|
1180
|
-
var i = 0, node, groupLength =
|
|
1200
|
+
function bindIndex$2(parent, group2, enter, update, exit, data) {
|
|
1201
|
+
var i = 0, node, groupLength = group2.length, dataLength = data.length;
|
|
1181
1202
|
for (; i < dataLength; ++i) {
|
|
1182
|
-
if (node =
|
|
1203
|
+
if (node = group2[i]) {
|
|
1183
1204
|
node.__data__ = data[i];
|
|
1184
1205
|
update[i] = node;
|
|
1185
1206
|
} else {
|
|
@@ -1187,16 +1208,16 @@
|
|
|
1187
1208
|
}
|
|
1188
1209
|
}
|
|
1189
1210
|
for (; i < groupLength; ++i) {
|
|
1190
|
-
if (node =
|
|
1211
|
+
if (node = group2[i]) {
|
|
1191
1212
|
exit[i] = node;
|
|
1192
1213
|
}
|
|
1193
1214
|
}
|
|
1194
1215
|
}
|
|
1195
|
-
function bindKey$2(parent,
|
|
1196
|
-
var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength =
|
|
1216
|
+
function bindKey$2(parent, group2, enter, update, exit, data, key) {
|
|
1217
|
+
var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
|
|
1197
1218
|
for (i = 0; i < groupLength; ++i) {
|
|
1198
|
-
if (node =
|
|
1199
|
-
keyValues[i] = keyValue = key.call(node, node.__data__, i,
|
|
1219
|
+
if (node = group2[i]) {
|
|
1220
|
+
keyValues[i] = keyValue = key.call(node, node.__data__, i, group2) + "";
|
|
1200
1221
|
if (nodeByKeyValue.has(keyValue)) {
|
|
1201
1222
|
exit[i] = node;
|
|
1202
1223
|
} else {
|
|
@@ -1215,7 +1236,7 @@
|
|
|
1215
1236
|
}
|
|
1216
1237
|
}
|
|
1217
1238
|
for (i = 0; i < groupLength; ++i) {
|
|
1218
|
-
if ((node =
|
|
1239
|
+
if ((node = group2[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
|
|
1219
1240
|
exit[i] = node;
|
|
1220
1241
|
}
|
|
1221
1242
|
}
|
|
@@ -1228,8 +1249,8 @@
|
|
|
1228
1249
|
var bind = key ? bindKey$2 : bindIndex$2, parents = this._parents, groups = this._groups;
|
|
1229
1250
|
if (typeof value2 !== "function") value2 = constant$b(value2);
|
|
1230
1251
|
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
1231
|
-
var parent = parents[j],
|
|
1232
|
-
bind(parent,
|
|
1252
|
+
var parent = parents[j], group2 = groups[j], groupLength = group2.length, data = arraylike(value2.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
|
|
1253
|
+
bind(parent, group2, enterGroup, updateGroup, exitGroup, data, key);
|
|
1233
1254
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
1234
1255
|
if (previous = enterGroup[i0]) {
|
|
1235
1256
|
if (i0 >= i1) i1 = i0 + 1;
|
|
@@ -1281,8 +1302,8 @@
|
|
|
1281
1302
|
}
|
|
1282
1303
|
function selection_order$2() {
|
|
1283
1304
|
for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
|
|
1284
|
-
for (var
|
|
1285
|
-
if (node =
|
|
1305
|
+
for (var group2 = groups[j], i = group2.length - 1, next = group2[i], node; --i >= 0; ) {
|
|
1306
|
+
if (node = group2[i]) {
|
|
1286
1307
|
if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
|
|
1287
1308
|
next = node;
|
|
1288
1309
|
}
|
|
@@ -1296,8 +1317,8 @@
|
|
|
1296
1317
|
return a2 && b ? compare(a2.__data__, b.__data__) : !a2 - !b;
|
|
1297
1318
|
}
|
|
1298
1319
|
for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
|
|
1299
|
-
for (var
|
|
1300
|
-
if (node =
|
|
1320
|
+
for (var group2 = groups[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
1321
|
+
if (node = group2[i]) {
|
|
1301
1322
|
sortgroup[i] = node;
|
|
1302
1323
|
}
|
|
1303
1324
|
}
|
|
@@ -1319,8 +1340,8 @@
|
|
|
1319
1340
|
}
|
|
1320
1341
|
function selection_node$2() {
|
|
1321
1342
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
1322
|
-
for (var
|
|
1323
|
-
var node =
|
|
1343
|
+
for (var group2 = groups[j], i = 0, n = group2.length; i < n; ++i) {
|
|
1344
|
+
var node = group2[i];
|
|
1324
1345
|
if (node) return node;
|
|
1325
1346
|
}
|
|
1326
1347
|
}
|
|
@@ -1336,8 +1357,8 @@
|
|
|
1336
1357
|
}
|
|
1337
1358
|
function selection_each$2(callback) {
|
|
1338
1359
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
1339
|
-
for (var
|
|
1340
|
-
if (node =
|
|
1360
|
+
for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
|
|
1361
|
+
if (node = group2[i]) callback.call(node, node.__data__, i, group2);
|
|
1341
1362
|
}
|
|
1342
1363
|
}
|
|
1343
1364
|
return this;
|
|
@@ -1660,8 +1681,8 @@
|
|
|
1660
1681
|
}
|
|
1661
1682
|
function* selection_iterator() {
|
|
1662
1683
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
1663
|
-
for (var
|
|
1664
|
-
if (node =
|
|
1684
|
+
for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
|
|
1685
|
+
if (node = group2[i]) yield node;
|
|
1665
1686
|
}
|
|
1666
1687
|
}
|
|
1667
1688
|
}
|
|
@@ -2754,7 +2775,7 @@
|
|
|
2754
2775
|
var RUNNING$1 = 4;
|
|
2755
2776
|
var ENDING$1 = 5;
|
|
2756
2777
|
var ENDED$1 = 6;
|
|
2757
|
-
function schedule$1(node, name, id2, index2,
|
|
2778
|
+
function schedule$1(node, name, id2, index2, group2, timing) {
|
|
2758
2779
|
var schedules = node.__transition;
|
|
2759
2780
|
if (!schedules) node.__transition = {};
|
|
2760
2781
|
else if (id2 in schedules) return;
|
|
@@ -2762,7 +2783,7 @@
|
|
|
2762
2783
|
name,
|
|
2763
2784
|
index: index2,
|
|
2764
2785
|
// For context during callback.
|
|
2765
|
-
group,
|
|
2786
|
+
group: group2,
|
|
2766
2787
|
// For context during callback.
|
|
2767
2788
|
on: emptyOn$1,
|
|
2768
2789
|
tween: emptyTween$1,
|
|
@@ -3077,8 +3098,8 @@
|
|
|
3077
3098
|
function transition_filter$1(match) {
|
|
3078
3099
|
if (typeof match !== "function") match = matcher$2(match);
|
|
3079
3100
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
3080
|
-
for (var
|
|
3081
|
-
if ((node =
|
|
3101
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
3102
|
+
if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
|
|
3082
3103
|
subgroup.push(node);
|
|
3083
3104
|
}
|
|
3084
3105
|
}
|
|
@@ -3132,8 +3153,8 @@
|
|
|
3132
3153
|
var name = this._name, id2 = this._id;
|
|
3133
3154
|
if (typeof select2 !== "function") select2 = selector$2(select2);
|
|
3134
3155
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
3135
|
-
for (var
|
|
3136
|
-
if ((node =
|
|
3156
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
3157
|
+
if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
|
|
3137
3158
|
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
3138
3159
|
subgroup[i] = subnode;
|
|
3139
3160
|
schedule$1(subgroup[i], name, id2, i, subgroup, get$5(node, id2));
|
|
@@ -3146,9 +3167,9 @@
|
|
|
3146
3167
|
var name = this._name, id2 = this._id;
|
|
3147
3168
|
if (typeof select2 !== "function") select2 = selectorAll$2(select2);
|
|
3148
3169
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
3149
|
-
for (var
|
|
3150
|
-
if (node =
|
|
3151
|
-
for (var children2 = select2.call(node, node.__data__, i,
|
|
3170
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
3171
|
+
if (node = group2[i]) {
|
|
3172
|
+
for (var children2 = select2.call(node, node.__data__, i, group2), child, inherit2 = get$5(node, id2), k2 = 0, l = children2.length; k2 < l; ++k2) {
|
|
3152
3173
|
if (child = children2[k2]) {
|
|
3153
3174
|
schedule$1(child, name, id2, k2, children2, inherit2);
|
|
3154
3175
|
}
|
|
@@ -3264,10 +3285,10 @@
|
|
|
3264
3285
|
function transition_transition$1() {
|
|
3265
3286
|
var name = this._name, id0 = this._id, id1 = newId$1();
|
|
3266
3287
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3267
|
-
for (var
|
|
3268
|
-
if (node =
|
|
3288
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
3289
|
+
if (node = group2[i]) {
|
|
3269
3290
|
var inherit2 = get$5(node, id0);
|
|
3270
|
-
schedule$1(node, name, id1, i,
|
|
3291
|
+
schedule$1(node, name, id1, i, group2, {
|
|
3271
3292
|
time: inherit2.time + inherit2.delay + inherit2.duration,
|
|
3272
3293
|
delay: 0,
|
|
3273
3294
|
duration: inherit2.duration,
|
|
@@ -3410,9 +3431,9 @@
|
|
|
3410
3431
|
id2 = newId$1(), (timing = defaultTiming$1).time = now$1(), name = name == null ? null : name + "";
|
|
3411
3432
|
}
|
|
3412
3433
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3413
|
-
for (var
|
|
3414
|
-
if (node =
|
|
3415
|
-
schedule$1(node, name, id2, i,
|
|
3434
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
3435
|
+
if (node = group2[i]) {
|
|
3436
|
+
schedule$1(node, name, id2, i, group2, timing || inherit$1(node, id2));
|
|
3416
3437
|
}
|
|
3417
3438
|
}
|
|
3418
3439
|
}
|
|
@@ -3622,7 +3643,7 @@
|
|
|
3622
3643
|
}
|
|
3623
3644
|
var map = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
3624
3645
|
function formatLocale(locale2) {
|
|
3625
|
-
var
|
|
3646
|
+
var group2 = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity$5 : formatGroup(map.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal === void 0 ? "." : locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity$5 : formatNumerals(map.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus === void 0 ? "−" : locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + "";
|
|
3626
3647
|
function newFormat(specifier) {
|
|
3627
3648
|
specifier = formatSpecifier(specifier);
|
|
3628
3649
|
var fill = specifier.fill, align = specifier.align, sign2 = specifier.sign, symbol = specifier.symbol, zero2 = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type;
|
|
@@ -3656,9 +3677,9 @@
|
|
|
3656
3677
|
}
|
|
3657
3678
|
}
|
|
3658
3679
|
}
|
|
3659
|
-
if (comma && !zero2) value2 =
|
|
3680
|
+
if (comma && !zero2) value2 = group2(value2, Infinity);
|
|
3660
3681
|
var length = valuePrefix.length + value2.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : "";
|
|
3661
|
-
if (comma && zero2) value2 =
|
|
3682
|
+
if (comma && zero2) value2 = group2(padding + value2, padding.length ? width - valueSuffix.length : Infinity), padding = "";
|
|
3662
3683
|
switch (align) {
|
|
3663
3684
|
case "<":
|
|
3664
3685
|
value2 = valuePrefix + value2 + valueSuffix + padding;
|
|
@@ -7334,8 +7355,8 @@
|
|
|
7334
7355
|
function selection_select$1(select2) {
|
|
7335
7356
|
if (typeof select2 !== "function") select2 = selector$1(select2);
|
|
7336
7357
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
7337
|
-
for (var
|
|
7338
|
-
if ((node =
|
|
7358
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
7359
|
+
if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
|
|
7339
7360
|
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
7340
7361
|
subgroup[i] = subnode;
|
|
7341
7362
|
}
|
|
@@ -7354,9 +7375,9 @@
|
|
|
7354
7375
|
function selection_selectAll$1(select2) {
|
|
7355
7376
|
if (typeof select2 !== "function") select2 = selectorAll$1(select2);
|
|
7356
7377
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
7357
|
-
for (var
|
|
7358
|
-
if (node =
|
|
7359
|
-
subgroups.push(select2.call(node, node.__data__, i,
|
|
7378
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
7379
|
+
if (node = group2[i]) {
|
|
7380
|
+
subgroups.push(select2.call(node, node.__data__, i, group2));
|
|
7360
7381
|
parents.push(node);
|
|
7361
7382
|
}
|
|
7362
7383
|
}
|
|
@@ -7371,8 +7392,8 @@
|
|
|
7371
7392
|
function selection_filter$1(match) {
|
|
7372
7393
|
if (typeof match !== "function") match = matcher$1(match);
|
|
7373
7394
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
7374
|
-
for (var
|
|
7375
|
-
if ((node =
|
|
7395
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
7396
|
+
if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
|
|
7376
7397
|
subgroup.push(node);
|
|
7377
7398
|
}
|
|
7378
7399
|
}
|
|
@@ -7413,10 +7434,10 @@
|
|
|
7413
7434
|
};
|
|
7414
7435
|
}
|
|
7415
7436
|
var keyPrefix$1 = "$";
|
|
7416
|
-
function bindIndex$1(parent,
|
|
7417
|
-
var i = 0, node, groupLength =
|
|
7437
|
+
function bindIndex$1(parent, group2, enter, update, exit, data) {
|
|
7438
|
+
var i = 0, node, groupLength = group2.length, dataLength = data.length;
|
|
7418
7439
|
for (; i < dataLength; ++i) {
|
|
7419
|
-
if (node =
|
|
7440
|
+
if (node = group2[i]) {
|
|
7420
7441
|
node.__data__ = data[i];
|
|
7421
7442
|
update[i] = node;
|
|
7422
7443
|
} else {
|
|
@@ -7424,16 +7445,16 @@
|
|
|
7424
7445
|
}
|
|
7425
7446
|
}
|
|
7426
7447
|
for (; i < groupLength; ++i) {
|
|
7427
|
-
if (node =
|
|
7448
|
+
if (node = group2[i]) {
|
|
7428
7449
|
exit[i] = node;
|
|
7429
7450
|
}
|
|
7430
7451
|
}
|
|
7431
7452
|
}
|
|
7432
|
-
function bindKey$1(parent,
|
|
7433
|
-
var i, node, nodeByKeyValue = {}, groupLength =
|
|
7453
|
+
function bindKey$1(parent, group2, enter, update, exit, data, key) {
|
|
7454
|
+
var i, node, nodeByKeyValue = {}, groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
|
|
7434
7455
|
for (i = 0; i < groupLength; ++i) {
|
|
7435
|
-
if (node =
|
|
7436
|
-
keyValues[i] = keyValue = keyPrefix$1 + key.call(node, node.__data__, i,
|
|
7456
|
+
if (node = group2[i]) {
|
|
7457
|
+
keyValues[i] = keyValue = keyPrefix$1 + key.call(node, node.__data__, i, group2);
|
|
7437
7458
|
if (keyValue in nodeByKeyValue) {
|
|
7438
7459
|
exit[i] = node;
|
|
7439
7460
|
} else {
|
|
@@ -7452,7 +7473,7 @@
|
|
|
7452
7473
|
}
|
|
7453
7474
|
}
|
|
7454
7475
|
for (i = 0; i < groupLength; ++i) {
|
|
7455
|
-
if ((node =
|
|
7476
|
+
if ((node = group2[i]) && nodeByKeyValue[keyValues[i]] === node) {
|
|
7456
7477
|
exit[i] = node;
|
|
7457
7478
|
}
|
|
7458
7479
|
}
|
|
@@ -7468,8 +7489,8 @@
|
|
|
7468
7489
|
var bind = key ? bindKey$1 : bindIndex$1, parents = this._parents, groups = this._groups;
|
|
7469
7490
|
if (typeof value2 !== "function") value2 = constant$5(value2);
|
|
7470
7491
|
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
7471
|
-
var parent = parents[j],
|
|
7472
|
-
bind(parent,
|
|
7492
|
+
var parent = parents[j], group2 = groups[j], groupLength = group2.length, data = value2.call(parent, parent && parent.__data__, j, parents), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
|
|
7493
|
+
bind(parent, group2, enterGroup, updateGroup, exitGroup, data, key);
|
|
7473
7494
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
7474
7495
|
if (previous = enterGroup[i0]) {
|
|
7475
7496
|
if (i0 >= i1) i1 = i0 + 1;
|
|
@@ -7509,8 +7530,8 @@
|
|
|
7509
7530
|
}
|
|
7510
7531
|
function selection_order$1() {
|
|
7511
7532
|
for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
|
|
7512
|
-
for (var
|
|
7513
|
-
if (node =
|
|
7533
|
+
for (var group2 = groups[j], i = group2.length - 1, next = group2[i], node; --i >= 0; ) {
|
|
7534
|
+
if (node = group2[i]) {
|
|
7514
7535
|
if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
|
|
7515
7536
|
next = node;
|
|
7516
7537
|
}
|
|
@@ -7524,8 +7545,8 @@
|
|
|
7524
7545
|
return a2 && b ? compare(a2.__data__, b.__data__) : !a2 - !b;
|
|
7525
7546
|
}
|
|
7526
7547
|
for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
|
|
7527
|
-
for (var
|
|
7528
|
-
if (node =
|
|
7548
|
+
for (var group2 = groups[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
7549
|
+
if (node = group2[i]) {
|
|
7529
7550
|
sortgroup[i] = node;
|
|
7530
7551
|
}
|
|
7531
7552
|
}
|
|
@@ -7551,8 +7572,8 @@
|
|
|
7551
7572
|
}
|
|
7552
7573
|
function selection_node$1() {
|
|
7553
7574
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
7554
|
-
for (var
|
|
7555
|
-
var node =
|
|
7575
|
+
for (var group2 = groups[j], i = 0, n = group2.length; i < n; ++i) {
|
|
7576
|
+
var node = group2[i];
|
|
7556
7577
|
if (node) return node;
|
|
7557
7578
|
}
|
|
7558
7579
|
}
|
|
@@ -7570,8 +7591,8 @@
|
|
|
7570
7591
|
}
|
|
7571
7592
|
function selection_each$1(callback) {
|
|
7572
7593
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
7573
|
-
for (var
|
|
7574
|
-
if (node =
|
|
7594
|
+
for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
|
|
7595
|
+
if (node = group2[i]) callback.call(node, node.__data__, i, group2);
|
|
7575
7596
|
}
|
|
7576
7597
|
}
|
|
7577
7598
|
return this;
|
|
@@ -7813,8 +7834,8 @@
|
|
|
7813
7834
|
filterEvents$1 = { mouseenter: "mouseover", mouseleave: "mouseout" };
|
|
7814
7835
|
}
|
|
7815
7836
|
}
|
|
7816
|
-
function filterContextListener$1(listener, index2,
|
|
7817
|
-
listener = contextListener$1(listener, index2,
|
|
7837
|
+
function filterContextListener$1(listener, index2, group2) {
|
|
7838
|
+
listener = contextListener$1(listener, index2, group2);
|
|
7818
7839
|
return function(event2) {
|
|
7819
7840
|
var related = event2.relatedTarget;
|
|
7820
7841
|
if (!related || related !== this && !(related.compareDocumentPosition(this) & 8)) {
|
|
@@ -7822,12 +7843,12 @@
|
|
|
7822
7843
|
}
|
|
7823
7844
|
};
|
|
7824
7845
|
}
|
|
7825
|
-
function contextListener$1(listener, index2,
|
|
7846
|
+
function contextListener$1(listener, index2, group2) {
|
|
7826
7847
|
return function(event1) {
|
|
7827
7848
|
var event0 = event;
|
|
7828
7849
|
event = event1;
|
|
7829
7850
|
try {
|
|
7830
|
-
listener.call(this, this.__data__, index2,
|
|
7851
|
+
listener.call(this, this.__data__, index2, group2);
|
|
7831
7852
|
} finally {
|
|
7832
7853
|
event = event0;
|
|
7833
7854
|
}
|
|
@@ -7857,8 +7878,8 @@
|
|
|
7857
7878
|
}
|
|
7858
7879
|
function onAdd$1(typename, value2, capture) {
|
|
7859
7880
|
var wrap2 = filterEvents$1.hasOwnProperty(typename.type) ? filterContextListener$1 : contextListener$1;
|
|
7860
|
-
return function(d, i,
|
|
7861
|
-
var on = this.__on, o, listener = wrap2(value2, i,
|
|
7881
|
+
return function(d, i, group2) {
|
|
7882
|
+
var on = this.__on, o, listener = wrap2(value2, i, group2);
|
|
7862
7883
|
if (on) for (var j = 0, m = on.length; j < m; ++j) {
|
|
7863
7884
|
if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
7864
7885
|
this.removeEventListener(o.type, o.listener, o.capture);
|
|
@@ -9474,8 +9495,8 @@
|
|
|
9474
9495
|
return h;
|
|
9475
9496
|
};
|
|
9476
9497
|
var addHandles = function addHandles2(_ref5) {
|
|
9477
|
-
var
|
|
9478
|
-
var h =
|
|
9498
|
+
var group2 = _ref5.group, handles = _ref5.handles, _ref5$r = _ref5.r, r = _ref5$r === void 0 ? 10 : _ref5$r;
|
|
9499
|
+
var h = group2.selectAll("circle.handle").data(handles);
|
|
9479
9500
|
h.enter().append("circle").attr("class", "handle").attr("fill", "grey").attr("fill-opacity", 0.1).attr("cursor", "move").attr("stroke-dasharray", 5).attr("stroke", "grey").call(drag().container(select$1("g.annotations").node()).on("start", function(d) {
|
|
9480
9501
|
return d.start && d.start(d);
|
|
9481
9502
|
}).on("drag", function(d) {
|
|
@@ -9483,7 +9504,7 @@
|
|
|
9483
9504
|
}).on("end", function(d) {
|
|
9484
9505
|
return d.end && d.end(d);
|
|
9485
9506
|
}));
|
|
9486
|
-
|
|
9507
|
+
group2.selectAll("circle.handle").attr("cx", function(d) {
|
|
9487
9508
|
return d.x;
|
|
9488
9509
|
}).attr("cy", function(d) {
|
|
9489
9510
|
return d.y;
|
|
@@ -10499,9 +10520,9 @@
|
|
|
10499
10520
|
subject: { type: "threshold" }
|
|
10500
10521
|
});
|
|
10501
10522
|
var newWithClass = function newWithClass2(a2, d, type, className, classID) {
|
|
10502
|
-
var
|
|
10503
|
-
|
|
10504
|
-
|
|
10523
|
+
var group2 = a2.selectAll(type + "." + (classID || className)).data(d);
|
|
10524
|
+
group2.enter().append(type).merge(group2).attr("class", className);
|
|
10525
|
+
group2.exit().remove();
|
|
10505
10526
|
return a2;
|
|
10506
10527
|
};
|
|
10507
10528
|
var addHandlers = function addHandlers2(dispatcher, annotation2, _ref3) {
|
|
@@ -10574,9 +10595,9 @@
|
|
|
10574
10595
|
});
|
|
10575
10596
|
var annotationG = selection2.selectAll("g").data([collection]);
|
|
10576
10597
|
annotationG.enter().append("g").attr("class", "annotations");
|
|
10577
|
-
var
|
|
10578
|
-
newWithClass(
|
|
10579
|
-
var annotation4 =
|
|
10598
|
+
var group2 = selection2.select("g.annotations");
|
|
10599
|
+
newWithClass(group2, collection.annotations, "g", "annotation");
|
|
10600
|
+
var annotation4 = group2.selectAll("g.annotation");
|
|
10580
10601
|
annotation4.each(function(d) {
|
|
10581
10602
|
var a2 = select$1(this);
|
|
10582
10603
|
a2.attr("class", "annotation");
|
|
@@ -11580,7 +11601,7 @@
|
|
|
11580
11601
|
chartTypes2["CombinationArea"] = "CombinationArea";
|
|
11581
11602
|
chartTypes2["CombinationStackArea"] = "CombinationStackArea";
|
|
11582
11603
|
chartTypes2["TornadoDefaultEntry"] = "defaultEntry";
|
|
11583
|
-
chartTypes2["
|
|
11604
|
+
chartTypes2["DotPlot"] = "DotPlot";
|
|
11584
11605
|
return chartTypes2;
|
|
11585
11606
|
})(chartTypes || {});
|
|
11586
11607
|
const connecterCurve = {
|
|
@@ -12377,10 +12398,10 @@
|
|
|
12377
12398
|
throw error;
|
|
12378
12399
|
}
|
|
12379
12400
|
}
|
|
12380
|
-
function initPlotArea(g, formatOptions, dataTableHeight, innerWidth2, innerHeight2, chartType) {
|
|
12401
|
+
function initPlotArea(g, formatOptions, dataTableHeight, innerWidth2, innerHeight2, chartType, chartId) {
|
|
12381
12402
|
try {
|
|
12382
|
-
let uniqueID = crypto.randomUUID().toUpperCase();
|
|
12383
|
-
g.append("defs").append("clipPath").attr("id", uniqueID).append("rect").attr("width", innerWidth2).attr(
|
|
12403
|
+
let uniqueID = chartId ?? crypto.randomUUID().toUpperCase();
|
|
12404
|
+
g.append("defs").append("clipPath").attr("id", uniqueID + "-clip").append("rect").attr("width", innerWidth2).attr(
|
|
12384
12405
|
"height",
|
|
12385
12406
|
dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2
|
|
12386
12407
|
);
|
|
@@ -13377,7 +13398,8 @@
|
|
|
13377
13398
|
} else {
|
|
13378
13399
|
if (barChart) {
|
|
13379
13400
|
const legendUniqueId = d.legendUniqueId.includes("~$~") ? d.legendUniqueId.split("~$~")[0] : d.legendUniqueId;
|
|
13380
|
-
|
|
13401
|
+
const xScaleLegend = chartType !== chartTypes.DotPlot ? xScaleForLegends(legendUniqueId) : 0;
|
|
13402
|
+
return isTornadoChart ? xScaleForLegends(d.y) + xScaleForLegends.bandwidth() / 2 : xScaleForLegends ? xScale(d.y) + xScaleLegend - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
|
|
13381
13403
|
} else
|
|
13382
13404
|
return dataLabelsPosition(
|
|
13383
13405
|
d.y.measure,
|
|
@@ -15465,10 +15487,10 @@
|
|
|
15465
15487
|
const isRotationZero = formatOptions.xAxisLabel.xAxisLabelRotation == 0;
|
|
15466
15488
|
let yRect = gTag.append("rect").attr("id", "yAxisRect").attr(
|
|
15467
15489
|
"transform",
|
|
15468
|
-
chartType === chartTypes.TornadoChart ? `translate(${-xLabelMargin
|
|
15490
|
+
chartType === chartTypes.TornadoChart ? `translate(${-xLabelMargin - 1},0)` : `translate(${xaxisLabelPosition === 0 ? -xLabelMargin - 5 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0) + (-xLabelMargin - 5)},0)`
|
|
15469
15491
|
).attr("height", innerHeight2).attr(
|
|
15470
15492
|
"width",
|
|
15471
|
-
chartType === chartTypes.TornadoChart ? xLabelMargin
|
|
15493
|
+
chartType === chartTypes.TornadoChart ? xLabelMargin : xLabelMargin + 5
|
|
15472
15494
|
).attr(
|
|
15473
15495
|
"fill",
|
|
15474
15496
|
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !== commonColors.white ? formatOptions.xAxisLabel.xAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
@@ -15733,7 +15755,7 @@
|
|
|
15733
15755
|
);
|
|
15734
15756
|
svg.on("wheel", (event2) => {
|
|
15735
15757
|
event2.preventDefault();
|
|
15736
|
-
const scrollDelta =
|
|
15758
|
+
const scrollDelta = isBarChart ? event2.deltaY : event2.deltaX;
|
|
15737
15759
|
const step2 = scrollDelta > 0 ? 1 : -1;
|
|
15738
15760
|
updateFromScrollPosition(step2, scrollMax, handleWidth, handle, true);
|
|
15739
15761
|
if (isBarChart) {
|
|
@@ -16074,9 +16096,6 @@
|
|
|
16074
16096
|
}
|
|
16075
16097
|
function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, tooltipHandle, formatOptions, chartJSON, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue, isNormalizedChart) {
|
|
16076
16098
|
try {
|
|
16077
|
-
let Markershapes = function(Shape) {
|
|
16078
|
-
return Shape == "Square" ? square : Shape == "Circle" ? circle : Shape == "Cross" ? cross : Shape == "Triangle" ? triangle : Shape == "Star" ? star : Shape == "Diamond" ? diamond : Shape == "Wye" ? wye : circle;
|
|
16079
|
-
};
|
|
16080
16099
|
let hideZeroValues = formatOptions.plotArea.hideZeroValues;
|
|
16081
16100
|
formatOptions.plotArea.plotAreaHideLineAndMarkers === void 0 ? formatOptions.plotArea.plotAreaHideLineAndMarkers = true : null;
|
|
16082
16101
|
chartData.forEach(
|
|
@@ -16094,8 +16113,8 @@
|
|
|
16094
16113
|
let markerGroupsEnter = markerGroups.enter().append("g").attr("class", "parentGroup").attr("hoverId", (d) => (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-"));
|
|
16095
16114
|
let mergedMarkerGroups = markerGroupsEnter.merge(markerGroups);
|
|
16096
16115
|
mergedMarkerGroups.each(function(groupData) {
|
|
16097
|
-
const
|
|
16098
|
-
let markers =
|
|
16116
|
+
const group2 = select$2(this);
|
|
16117
|
+
let markers = group2.selectAll("path").data(groupData.data);
|
|
16099
16118
|
let markersEnter = markers.enter().append("path").attr("fill", (d) => d.markerColor);
|
|
16100
16119
|
markersEnter.merge(markers).attr("d", (d) => {
|
|
16101
16120
|
return Symbol$1().type(Markershapes(d.markerShape)).size(d.markerSize * 50)();
|
|
@@ -16170,6 +16189,9 @@
|
|
|
16170
16189
|
logError$2(fileName$b, "lineMarkers", error);
|
|
16171
16190
|
}
|
|
16172
16191
|
}
|
|
16192
|
+
function Markershapes(Shape) {
|
|
16193
|
+
return Shape == "Square" ? square : Shape == "Circle" ? circle : Shape == "Cross" ? cross : Shape == "Triangle" ? triangle : Shape == "Star" ? star : Shape == "Diamond" ? diamond : Shape == "Wye" ? wye : circle;
|
|
16194
|
+
}
|
|
16173
16195
|
const checkVisibleConditions = (chartData, d, type, hideZeroValues, yScaleRight, customYaxisMinValue, customYaxisMaxValue) => {
|
|
16174
16196
|
try {
|
|
16175
16197
|
if (chartData[0].properties.axis && chartData[0].properties.axis === "Secondary") {
|
|
@@ -16388,8 +16410,8 @@
|
|
|
16388
16410
|
}
|
|
16389
16411
|
function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
|
|
16390
16412
|
try {
|
|
16391
|
-
const markerColor = prop
|
|
16392
|
-
const markerShape = prop?.markerShape
|
|
16413
|
+
const markerColor = prop?.color ?? prop?.markerColor ?? "blue";
|
|
16414
|
+
const markerShape = prop?.markerShape?.toLowerCase() ?? "circle";
|
|
16393
16415
|
const isLightTheme = chartFormatOptions.toolTip.toolTipTheme === "Light";
|
|
16394
16416
|
const bgColor = isLightTheme ? "rgba(255, 255, 255)" : "#272729ff";
|
|
16395
16417
|
const textColor = isLightTheme ? "black" : commonColors.white;
|
|
@@ -17105,12 +17127,12 @@
|
|
|
17105
17127
|
};
|
|
17106
17128
|
const measureMap = /* @__PURE__ */ new Map();
|
|
17107
17129
|
data?.LegendList?.forEach((legend) => {
|
|
17108
|
-
measureMap.set(splitLengend(legend?.name), legend);
|
|
17130
|
+
measureMap.set(isAdvanceAnalyticsChart ? splitLengend(legend?.name) : legend.measureUniqueId, legend);
|
|
17109
17131
|
});
|
|
17110
17132
|
return seriesData.map((series) => {
|
|
17111
17133
|
return {
|
|
17112
17134
|
...series,
|
|
17113
|
-
properties: measureMap.get(isAdvanceAnalyticsChart ? splitLengend(series.legend) : series.properties.
|
|
17135
|
+
properties: measureMap.get(isAdvanceAnalyticsChart ? splitLengend(series.legend) : series.properties.measureUniqueId) ?? series.properties
|
|
17114
17136
|
};
|
|
17115
17137
|
}).filter((series) => series.data[0].value !== 0);
|
|
17116
17138
|
} catch (_) {
|
|
@@ -17589,9 +17611,7 @@
|
|
|
17589
17611
|
(data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
|
|
17590
17612
|
hideTooltipOnMouseOut();
|
|
17591
17613
|
});
|
|
17592
|
-
columnGroups.exit().remove()
|
|
17593
|
-
console.log("Exiting:", d.dimension, d.legend);
|
|
17594
|
-
});
|
|
17614
|
+
columnGroups.exit().remove();
|
|
17595
17615
|
});
|
|
17596
17616
|
gTag.selectAll(".parentGroup").raise();
|
|
17597
17617
|
};
|
|
@@ -18319,7 +18339,7 @@
|
|
|
18319
18339
|
(d) => xScale(d.dimension) ? xScale(d.dimension) : null
|
|
18320
18340
|
).y(
|
|
18321
18341
|
(d) => d.axis == axisTypes.primary ? yScaleLeft(d.value) : yScaleRight(d.value)
|
|
18322
|
-
).defined((d) =>
|
|
18342
|
+
).defined((d) => formatOptions?.plotArea?.hideZeroValues ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
|
|
18323
18343
|
let lines = gTag.selectAll(".lines.parentGroup").data([1]);
|
|
18324
18344
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
18325
18345
|
let lineGroups = lines.selectAll(".line-group").data(lineData, (d) => d.properties.legendUniqueId);
|
|
@@ -22186,7 +22206,7 @@
|
|
|
22186
22206
|
(d2) => d2.properties.lineStyle !== "None" ? d2.properties.lineWidth : 0
|
|
22187
22207
|
).attr(
|
|
22188
22208
|
"hoverId",
|
|
22189
|
-
(d.properties.alias ||
|
|
22209
|
+
(d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-")
|
|
22190
22210
|
).attr("d", (d2) => lineGenerator(d2.data));
|
|
22191
22211
|
});
|
|
22192
22212
|
lineGroups.exit().remove();
|
|
@@ -22224,7 +22244,7 @@
|
|
|
22224
22244
|
xAxis,
|
|
22225
22245
|
dimensionHeightWidthArray,
|
|
22226
22246
|
height,
|
|
22227
|
-
innerWidth2 /
|
|
22247
|
+
innerWidth2 / filteredDimension.length,
|
|
22228
22248
|
isDateType,
|
|
22229
22249
|
innerWidth2,
|
|
22230
22250
|
innerHeight2,
|
|
@@ -29140,8 +29160,16 @@
|
|
|
29140
29160
|
}
|
|
29141
29161
|
chartData = chartData.map((d) => {
|
|
29142
29162
|
let value2 = d.data.data[valueIndex].value;
|
|
29143
|
-
|
|
29144
|
-
|
|
29163
|
+
return {
|
|
29164
|
+
...d,
|
|
29165
|
+
data: {
|
|
29166
|
+
...d.data,
|
|
29167
|
+
properties: {
|
|
29168
|
+
...d.data.properties,
|
|
29169
|
+
themeColor: colorScale(value2.toString())
|
|
29170
|
+
}
|
|
29171
|
+
}
|
|
29172
|
+
};
|
|
29145
29173
|
});
|
|
29146
29174
|
appendColorScale(
|
|
29147
29175
|
startColor,
|
|
@@ -29975,6 +30003,11 @@
|
|
|
29975
30003
|
annotationsList = [];
|
|
29976
30004
|
seriesData.forEach((d, i) => {
|
|
29977
30005
|
try {
|
|
30006
|
+
const type = chartFormatOptions.annotation.annotationVisibility;
|
|
30007
|
+
const lastIndex = seriesData.length - 1;
|
|
30008
|
+
if (type === dataLabelPositionType.none || type === dataLabelPositionType.startOnly && i !== 0 || type === dataLabelPositionType.endOnly && i !== lastIndex || type === dataLabelPositionType.startAndEndBoth && i !== 0 && i !== lastIndex) {
|
|
30009
|
+
return;
|
|
30010
|
+
}
|
|
29978
30011
|
let singleAnnotation = {
|
|
29979
30012
|
note: {
|
|
29980
30013
|
title: chartFormatOptions.plotArea.dataLabelName ? d.properties.alias : "",
|
|
@@ -30751,7 +30784,8 @@
|
|
|
30751
30784
|
}
|
|
30752
30785
|
}
|
|
30753
30786
|
let valuefontStyle = chartFormatOptions.pointerValue.pointerValueFontStyle;
|
|
30754
|
-
|
|
30787
|
+
chartAreaTagG.selectAll(".pointerValueText").remove();
|
|
30788
|
+
let comparedValue = chartAreaTagG.append("g").attr("class", "pointerValueText").attr("transform", positionTransformString2);
|
|
30755
30789
|
comparedValue.selectAll("text").data(["chartData.dataArray[1].maximumMeasure"]).enter().append("text").attr("dy", "24").attr("text-anchor", "middle").attr("font-size", chartFormatOptions.pointerValue.pointerValueFontSize).attr(
|
|
30756
30790
|
"fill",
|
|
30757
30791
|
chartFormatOptions.pointerValue.pointerValueColor !== commonColors.white ? chartFormatOptions.pointerValue.pointerValueColor : "none"
|
|
@@ -30768,11 +30802,7 @@
|
|
|
30768
30802
|
"font-family",
|
|
30769
30803
|
chartFormatOptions.pointerValue.pointerValueFontFamily
|
|
30770
30804
|
).text(
|
|
30771
|
-
(d) => `${KPIName}: ${!chartFormatOptions.pointerValue.pointerValueAlias && d != 0 ?
|
|
30772
|
-
"None",
|
|
30773
|
-
chartFormatOptions.pointerValue.pointerValueNumberFormat,
|
|
30774
|
-
chartFormatOptions.pointerValue.pointerValueDecimalPrecision
|
|
30775
|
-
)(ChartData[1].data[0].value) : chartFormatOptions.pointerValue.pointerValueAliasText}`
|
|
30805
|
+
(d) => `${KPIName}: ${!chartFormatOptions.pointerValue.pointerValueAlias && d != 0 ? connectorNumberFormat2(ChartData[0].data[0].value, ChartData[1].data[0].value) : chartFormatOptions.pointerValue.pointerValueAliasText}`
|
|
30776
30806
|
).attr(
|
|
30777
30807
|
"visibility",
|
|
30778
30808
|
chartFormatOptions.plotArea.dataLabels ? "visible" : "hidden"
|
|
@@ -30781,6 +30811,45 @@
|
|
|
30781
30811
|
logError$2(fileName2, "setPointerValueText", error);
|
|
30782
30812
|
}
|
|
30783
30813
|
}
|
|
30814
|
+
function connectorNumberFormat2(numerator, denominator) {
|
|
30815
|
+
try {
|
|
30816
|
+
let Measure = numerator - denominator;
|
|
30817
|
+
let noOfYears = 1;
|
|
30818
|
+
let KPI = parseInt(
|
|
30819
|
+
chartFormatOptions.pointerValue.connectorKPIforSpeedometer
|
|
30820
|
+
);
|
|
30821
|
+
let formatter;
|
|
30822
|
+
let value2;
|
|
30823
|
+
const decimalValues = chartFormatOptions.pointerValue.pointerValueDecimalPrecision;
|
|
30824
|
+
switch (KPI) {
|
|
30825
|
+
case 1:
|
|
30826
|
+
Measure = denominator;
|
|
30827
|
+
break;
|
|
30828
|
+
case 2:
|
|
30829
|
+
Measure = Math.abs(Measure);
|
|
30830
|
+
break;
|
|
30831
|
+
case 3:
|
|
30832
|
+
formatter = `.${decimalValues}%`;
|
|
30833
|
+
Measure = Math.pow(denominator / numerator, 1 / noOfYears) - 1;
|
|
30834
|
+
value2 = format(formatter)(Measure);
|
|
30835
|
+
return value2;
|
|
30836
|
+
case 4:
|
|
30837
|
+
formatter = `.${decimalValues}%`;
|
|
30838
|
+
Measure = Math.round(denominator / numerator * 100 - 100) / 100;
|
|
30839
|
+
value2 = format(formatter)(Measure);
|
|
30840
|
+
return value2;
|
|
30841
|
+
}
|
|
30842
|
+
isNaN(Measure) ? Measure = 0 : Measure;
|
|
30843
|
+
return getNumberWithFormatFunction(
|
|
30844
|
+
chartFormatOptions.pointerValue.pointerValueDisplayUnits,
|
|
30845
|
+
chartFormatOptions.pointerValue.pointerValueNumberFormat,
|
|
30846
|
+
decimalValues
|
|
30847
|
+
)(Measure);
|
|
30848
|
+
} catch (error) {
|
|
30849
|
+
logError$2(fileName2, "connectorNumberFormat", error);
|
|
30850
|
+
return "";
|
|
30851
|
+
}
|
|
30852
|
+
}
|
|
30784
30853
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30785
30854
|
"svg",
|
|
30786
30855
|
{
|
|
@@ -30860,6 +30929,31 @@
|
|
|
30860
30929
|
logError("RadialBarChart.tsx", "loopOverChartData", error);
|
|
30861
30930
|
}
|
|
30862
30931
|
};
|
|
30932
|
+
const getModifiedDataForLabels = (data) => {
|
|
30933
|
+
try {
|
|
30934
|
+
const dataLabelType = chartFormatOptions.plotArea.dataLabelsOptions;
|
|
30935
|
+
switch (dataLabelType) {
|
|
30936
|
+
case dataLabelPositionType.automatic:
|
|
30937
|
+
return data.map((item, index2) => {
|
|
30938
|
+
return {
|
|
30939
|
+
...item,
|
|
30940
|
+
index: index2
|
|
30941
|
+
};
|
|
30942
|
+
});
|
|
30943
|
+
case dataLabelPositionType.startOnly:
|
|
30944
|
+
return [{ ...data[0], index: 0 }];
|
|
30945
|
+
case dataLabelPositionType.endOnly:
|
|
30946
|
+
return [{ ...data[data.length - 1], index: data.length - 1 }];
|
|
30947
|
+
case dataLabelPositionType.startAndEndBoth:
|
|
30948
|
+
return [{ ...data[0], index: 0 }, { ...data[data.length - 1], index: data.length - 1 }];
|
|
30949
|
+
case dataLabelPositionType.none:
|
|
30950
|
+
return [];
|
|
30951
|
+
}
|
|
30952
|
+
} catch (error) {
|
|
30953
|
+
logError("RadialBarChart.tsx", "getModifiedDataForLabels", error);
|
|
30954
|
+
return data;
|
|
30955
|
+
}
|
|
30956
|
+
};
|
|
30863
30957
|
const initRadialBarChart = () => {
|
|
30864
30958
|
try {
|
|
30865
30959
|
let arcTween = function(d, i) {
|
|
@@ -30987,7 +31081,7 @@
|
|
|
30987
31081
|
"visibility",
|
|
30988
31082
|
chartFormatOptions.plotArea.axialAxis ? "visible" : "hidden"
|
|
30989
31083
|
);
|
|
30990
|
-
let arcs = svg2.attr("class", "data").selectAll("path").data(ChartData).enter().append("path").attr("class", "parentGroup").attr("hoverId", (d) => d.data[0].legend).style("fill", (d, i) => d.properties.color).on("mousemove", (event2, d) => {
|
|
31084
|
+
let arcs = svg2.attr("class", "data").selectAll("path").data(ChartData).enter().append("path").attr("class", "parentGroup").attr("hoverId", (d) => d.data[0].legend.replaceAll(" ", "-")).style("fill", (d, i) => d.properties.color).on("mousemove", (event2, d) => {
|
|
30991
31085
|
showTooltipOnMouseMove(
|
|
30992
31086
|
[
|
|
30993
31087
|
{
|
|
@@ -31015,7 +31109,8 @@
|
|
|
31015
31109
|
(d, i) => chartFormatOptions.plotArea.arcTransition ? i * 200 : 0
|
|
31016
31110
|
).duration(chartFormatOptions.plotArea.arcTransition ? 500 : 0).attrTween("d", arcTween);
|
|
31017
31111
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
31018
|
-
|
|
31112
|
+
const labelsData = getModifiedDataForLabels(ChartData);
|
|
31113
|
+
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(
|
|
31019
31114
|
(d) => ` ${d.properties.alias}
|
|
31020
31115
|
${chartFormatOptions.plotArea.dataLabelValue ? getNumberWithFormatFunction(
|
|
31021
31116
|
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
@@ -31492,28 +31587,27 @@
|
|
|
31492
31587
|
initSvg(svgRef, width, height, chartFormatOptions);
|
|
31493
31588
|
chartAreaTagG = initChartArea(svg, margins);
|
|
31494
31589
|
drawChartTitle(svgRef, chartTitleHeight, width, chartFormatOptions);
|
|
31495
|
-
calculateWordCloudData(
|
|
31590
|
+
calculateWordCloudData();
|
|
31496
31591
|
drawWordCloudChart();
|
|
31497
31592
|
};
|
|
31498
|
-
const calculateWordCloudData = (
|
|
31593
|
+
const calculateWordCloudData = () => {
|
|
31499
31594
|
try {
|
|
31500
31595
|
totalMeasureValue = 0;
|
|
31501
|
-
|
|
31596
|
+
seriesData = seriesData.map((item) => {
|
|
31502
31597
|
let value2 = item.data[0].value;
|
|
31503
31598
|
totalMeasureValue += value2;
|
|
31599
|
+
if (chartFormatOptions.plotArea.hideZeroValues && value2 == 0) {
|
|
31600
|
+
return null;
|
|
31601
|
+
}
|
|
31504
31602
|
if (value2 < min2) {
|
|
31505
31603
|
min2 = value2;
|
|
31506
31604
|
}
|
|
31507
31605
|
if (value2 > max2) {
|
|
31508
31606
|
max2 = value2;
|
|
31509
31607
|
}
|
|
31510
|
-
|
|
31511
|
-
return null;
|
|
31512
|
-
} else {
|
|
31513
|
-
return item;
|
|
31514
|
-
}
|
|
31608
|
+
return item;
|
|
31515
31609
|
});
|
|
31516
|
-
|
|
31610
|
+
seriesData = seriesData.filter((item) => item !== null);
|
|
31517
31611
|
scale2 = linear$1().domain([min2, max2]).range([12, 70]);
|
|
31518
31612
|
} catch (error) {
|
|
31519
31613
|
logError$2(fileName$2, "calculateWordCloudData", error);
|
|
@@ -32568,8 +32662,8 @@
|
|
|
32568
32662
|
function selection_select(select2) {
|
|
32569
32663
|
if (typeof select2 !== "function") select2 = selector(select2);
|
|
32570
32664
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
32571
|
-
for (var
|
|
32572
|
-
if ((node =
|
|
32665
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
32666
|
+
if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
|
|
32573
32667
|
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
32574
32668
|
subgroup[i] = subnode;
|
|
32575
32669
|
}
|
|
@@ -32588,9 +32682,9 @@
|
|
|
32588
32682
|
function selection_selectAll(select2) {
|
|
32589
32683
|
if (typeof select2 !== "function") select2 = selectorAll(select2);
|
|
32590
32684
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
32591
|
-
for (var
|
|
32592
|
-
if (node =
|
|
32593
|
-
subgroups.push(select2.call(node, node.__data__, i,
|
|
32685
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
32686
|
+
if (node = group2[i]) {
|
|
32687
|
+
subgroups.push(select2.call(node, node.__data__, i, group2));
|
|
32594
32688
|
parents.push(node);
|
|
32595
32689
|
}
|
|
32596
32690
|
}
|
|
@@ -32605,8 +32699,8 @@
|
|
|
32605
32699
|
function selection_filter(match) {
|
|
32606
32700
|
if (typeof match !== "function") match = matcher(match);
|
|
32607
32701
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
32608
|
-
for (var
|
|
32609
|
-
if ((node =
|
|
32702
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
32703
|
+
if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
|
|
32610
32704
|
subgroup.push(node);
|
|
32611
32705
|
}
|
|
32612
32706
|
}
|
|
@@ -32647,10 +32741,10 @@
|
|
|
32647
32741
|
};
|
|
32648
32742
|
}
|
|
32649
32743
|
var keyPrefix = "$";
|
|
32650
|
-
function bindIndex(parent,
|
|
32651
|
-
var i = 0, node, groupLength =
|
|
32744
|
+
function bindIndex(parent, group2, enter, update, exit, data) {
|
|
32745
|
+
var i = 0, node, groupLength = group2.length, dataLength = data.length;
|
|
32652
32746
|
for (; i < dataLength; ++i) {
|
|
32653
|
-
if (node =
|
|
32747
|
+
if (node = group2[i]) {
|
|
32654
32748
|
node.__data__ = data[i];
|
|
32655
32749
|
update[i] = node;
|
|
32656
32750
|
} else {
|
|
@@ -32658,16 +32752,16 @@
|
|
|
32658
32752
|
}
|
|
32659
32753
|
}
|
|
32660
32754
|
for (; i < groupLength; ++i) {
|
|
32661
|
-
if (node =
|
|
32755
|
+
if (node = group2[i]) {
|
|
32662
32756
|
exit[i] = node;
|
|
32663
32757
|
}
|
|
32664
32758
|
}
|
|
32665
32759
|
}
|
|
32666
|
-
function bindKey(parent,
|
|
32667
|
-
var i, node, nodeByKeyValue = {}, groupLength =
|
|
32760
|
+
function bindKey(parent, group2, enter, update, exit, data, key) {
|
|
32761
|
+
var i, node, nodeByKeyValue = {}, groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
|
|
32668
32762
|
for (i = 0; i < groupLength; ++i) {
|
|
32669
|
-
if (node =
|
|
32670
|
-
keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i,
|
|
32763
|
+
if (node = group2[i]) {
|
|
32764
|
+
keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group2);
|
|
32671
32765
|
if (keyValue in nodeByKeyValue) {
|
|
32672
32766
|
exit[i] = node;
|
|
32673
32767
|
} else {
|
|
@@ -32686,7 +32780,7 @@
|
|
|
32686
32780
|
}
|
|
32687
32781
|
}
|
|
32688
32782
|
for (i = 0; i < groupLength; ++i) {
|
|
32689
|
-
if ((node =
|
|
32783
|
+
if ((node = group2[i]) && nodeByKeyValue[keyValues[i]] === node) {
|
|
32690
32784
|
exit[i] = node;
|
|
32691
32785
|
}
|
|
32692
32786
|
}
|
|
@@ -32702,8 +32796,8 @@
|
|
|
32702
32796
|
var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups;
|
|
32703
32797
|
if (typeof value2 !== "function") value2 = constant$2(value2);
|
|
32704
32798
|
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
32705
|
-
var parent = parents[j],
|
|
32706
|
-
bind(parent,
|
|
32799
|
+
var parent = parents[j], group2 = groups[j], groupLength = group2.length, data = value2.call(parent, parent && parent.__data__, j, parents), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
|
|
32800
|
+
bind(parent, group2, enterGroup, updateGroup, exitGroup, data, key);
|
|
32707
32801
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
32708
32802
|
if (previous = enterGroup[i0]) {
|
|
32709
32803
|
if (i0 >= i1) i1 = i0 + 1;
|
|
@@ -32743,8 +32837,8 @@
|
|
|
32743
32837
|
}
|
|
32744
32838
|
function selection_order() {
|
|
32745
32839
|
for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
|
|
32746
|
-
for (var
|
|
32747
|
-
if (node =
|
|
32840
|
+
for (var group2 = groups[j], i = group2.length - 1, next = group2[i], node; --i >= 0; ) {
|
|
32841
|
+
if (node = group2[i]) {
|
|
32748
32842
|
if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
|
|
32749
32843
|
next = node;
|
|
32750
32844
|
}
|
|
@@ -32758,8 +32852,8 @@
|
|
|
32758
32852
|
return a2 && b ? compare(a2.__data__, b.__data__) : !a2 - !b;
|
|
32759
32853
|
}
|
|
32760
32854
|
for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
|
|
32761
|
-
for (var
|
|
32762
|
-
if (node =
|
|
32855
|
+
for (var group2 = groups[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
32856
|
+
if (node = group2[i]) {
|
|
32763
32857
|
sortgroup[i] = node;
|
|
32764
32858
|
}
|
|
32765
32859
|
}
|
|
@@ -32785,8 +32879,8 @@
|
|
|
32785
32879
|
}
|
|
32786
32880
|
function selection_node() {
|
|
32787
32881
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
32788
|
-
for (var
|
|
32789
|
-
var node =
|
|
32882
|
+
for (var group2 = groups[j], i = 0, n = group2.length; i < n; ++i) {
|
|
32883
|
+
var node = group2[i];
|
|
32790
32884
|
if (node) return node;
|
|
32791
32885
|
}
|
|
32792
32886
|
}
|
|
@@ -32804,8 +32898,8 @@
|
|
|
32804
32898
|
}
|
|
32805
32899
|
function selection_each(callback) {
|
|
32806
32900
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
32807
|
-
for (var
|
|
32808
|
-
if (node =
|
|
32901
|
+
for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
|
|
32902
|
+
if (node = group2[i]) callback.call(node, node.__data__, i, group2);
|
|
32809
32903
|
}
|
|
32810
32904
|
}
|
|
32811
32905
|
return this;
|
|
@@ -33048,8 +33142,8 @@
|
|
|
33048
33142
|
filterEvents = { mouseenter: "mouseover", mouseleave: "mouseout" };
|
|
33049
33143
|
}
|
|
33050
33144
|
}
|
|
33051
|
-
function filterContextListener(listener, index2,
|
|
33052
|
-
listener = contextListener(listener, index2,
|
|
33145
|
+
function filterContextListener(listener, index2, group2) {
|
|
33146
|
+
listener = contextListener(listener, index2, group2);
|
|
33053
33147
|
return function(event2) {
|
|
33054
33148
|
var related = event2.relatedTarget;
|
|
33055
33149
|
if (!related || related !== this && !(related.compareDocumentPosition(this) & 8)) {
|
|
@@ -33057,10 +33151,10 @@
|
|
|
33057
33151
|
}
|
|
33058
33152
|
};
|
|
33059
33153
|
}
|
|
33060
|
-
function contextListener(listener, index2,
|
|
33154
|
+
function contextListener(listener, index2, group2) {
|
|
33061
33155
|
return function(event1) {
|
|
33062
33156
|
try {
|
|
33063
|
-
listener.call(this, this.__data__, index2,
|
|
33157
|
+
listener.call(this, this.__data__, index2, group2);
|
|
33064
33158
|
} finally {
|
|
33065
33159
|
}
|
|
33066
33160
|
};
|
|
@@ -33089,8 +33183,8 @@
|
|
|
33089
33183
|
}
|
|
33090
33184
|
function onAdd(typename, value2, capture) {
|
|
33091
33185
|
var wrap2 = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;
|
|
33092
|
-
return function(d, i,
|
|
33093
|
-
var on = this.__on, o, listener = wrap2(value2, i,
|
|
33186
|
+
return function(d, i, group2) {
|
|
33187
|
+
var on = this.__on, o, listener = wrap2(value2, i, group2);
|
|
33094
33188
|
if (on) for (var j = 0, m = on.length; j < m; ++j) {
|
|
33095
33189
|
if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
33096
33190
|
this.removeEventListener(o.type, o.listener, o.capture);
|
|
@@ -33367,7 +33461,7 @@
|
|
|
33367
33461
|
var RUNNING = 4;
|
|
33368
33462
|
var ENDING = 5;
|
|
33369
33463
|
var ENDED = 6;
|
|
33370
|
-
function schedule(node, name, id2, index2,
|
|
33464
|
+
function schedule(node, name, id2, index2, group2, timing) {
|
|
33371
33465
|
var schedules = node.__transition;
|
|
33372
33466
|
if (!schedules) node.__transition = {};
|
|
33373
33467
|
else if (id2 in schedules) return;
|
|
@@ -33375,7 +33469,7 @@
|
|
|
33375
33469
|
name,
|
|
33376
33470
|
index: index2,
|
|
33377
33471
|
// For context during callback.
|
|
33378
|
-
group,
|
|
33472
|
+
group: group2,
|
|
33379
33473
|
// For context during callback.
|
|
33380
33474
|
on: emptyOn,
|
|
33381
33475
|
tween: emptyTween,
|
|
@@ -34167,8 +34261,8 @@
|
|
|
34167
34261
|
function transition_filter(match) {
|
|
34168
34262
|
if (typeof match !== "function") match = matcher(match);
|
|
34169
34263
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
34170
|
-
for (var
|
|
34171
|
-
if ((node =
|
|
34264
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
34265
|
+
if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
|
|
34172
34266
|
subgroup.push(node);
|
|
34173
34267
|
}
|
|
34174
34268
|
}
|
|
@@ -34222,8 +34316,8 @@
|
|
|
34222
34316
|
var name = this._name, id2 = this._id;
|
|
34223
34317
|
if (typeof select2 !== "function") select2 = selector(select2);
|
|
34224
34318
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
34225
|
-
for (var
|
|
34226
|
-
if ((node =
|
|
34319
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
34320
|
+
if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
|
|
34227
34321
|
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
34228
34322
|
subgroup[i] = subnode;
|
|
34229
34323
|
schedule(subgroup[i], name, id2, i, subgroup, get(node, id2));
|
|
@@ -34236,9 +34330,9 @@
|
|
|
34236
34330
|
var name = this._name, id2 = this._id;
|
|
34237
34331
|
if (typeof select2 !== "function") select2 = selectorAll(select2);
|
|
34238
34332
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
34239
|
-
for (var
|
|
34240
|
-
if (node =
|
|
34241
|
-
for (var children2 = select2.call(node, node.__data__, i,
|
|
34333
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
34334
|
+
if (node = group2[i]) {
|
|
34335
|
+
for (var children2 = select2.call(node, node.__data__, i, group2), child, inherit2 = get(node, id2), k2 = 0, l = children2.length; k2 < l; ++k2) {
|
|
34242
34336
|
if (child = children2[k2]) {
|
|
34243
34337
|
schedule(child, name, id2, k2, children2, inherit2);
|
|
34244
34338
|
}
|
|
@@ -34354,10 +34448,10 @@
|
|
|
34354
34448
|
function transition_transition() {
|
|
34355
34449
|
var name = this._name, id0 = this._id, id1 = newId();
|
|
34356
34450
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
34357
|
-
for (var
|
|
34358
|
-
if (node =
|
|
34451
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
34452
|
+
if (node = group2[i]) {
|
|
34359
34453
|
var inherit2 = get(node, id0);
|
|
34360
|
-
schedule(node, name, id1, i,
|
|
34454
|
+
schedule(node, name, id1, i, group2, {
|
|
34361
34455
|
time: inherit2.time + inherit2.delay + inherit2.duration,
|
|
34362
34456
|
delay: 0,
|
|
34363
34457
|
duration: inherit2.duration,
|
|
@@ -34452,9 +34546,9 @@
|
|
|
34452
34546
|
id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
|
|
34453
34547
|
}
|
|
34454
34548
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
34455
|
-
for (var
|
|
34456
|
-
if (node =
|
|
34457
|
-
schedule(node, name, id2, i,
|
|
34549
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
34550
|
+
if (node = group2[i]) {
|
|
34551
|
+
schedule(node, name, id2, i, group2, timing || inherit(node, id2));
|
|
34458
34552
|
}
|
|
34459
34553
|
}
|
|
34460
34554
|
}
|
|
@@ -35674,7 +35768,7 @@
|
|
|
35674
35768
|
break;
|
|
35675
35769
|
case TSankeyDataLabelPostion.right:
|
|
35676
35770
|
xAndYCoordinate = [1, 5];
|
|
35677
|
-
widthAndHeight = [maxNodeLabelWidth, innerHeight2];
|
|
35771
|
+
widthAndHeight = [innerWidth2 - maxNodeLabelWidth, innerHeight2];
|
|
35678
35772
|
break;
|
|
35679
35773
|
case TSankeyDataLabelPostion.left:
|
|
35680
35774
|
xAndYCoordinate = [maxNodeLabelWidth, 5];
|
|
@@ -55181,7 +55275,8 @@
|
|
|
55181
55275
|
dataTableHeight,
|
|
55182
55276
|
innerWidth2,
|
|
55183
55277
|
innerHeight2,
|
|
55184
|
-
chartType
|
|
55278
|
+
chartType,
|
|
55279
|
+
chartId
|
|
55185
55280
|
);
|
|
55186
55281
|
initScale();
|
|
55187
55282
|
initAxis();
|
|
@@ -55482,7 +55577,7 @@
|
|
|
55482
55577
|
(d) => xScale(
|
|
55483
55578
|
!isAdvancedWaterfall ? d.data.dimension || d.data.legend : d.data.xKey
|
|
55484
55579
|
)
|
|
55485
|
-
).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr(
|
|
55580
|
+
).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr("clip-path", `url(#${chartId}-clip)`).attr(
|
|
55486
55581
|
"height",
|
|
55487
55582
|
(d) => d[1] ? yScaleLeft(d[0]) - yScaleLeft(d[1]) : 0
|
|
55488
55583
|
).attr("width", xScale.bandwidth()).attr(
|
|
@@ -55883,26 +55978,8 @@
|
|
|
55883
55978
|
chartType
|
|
55884
55979
|
);
|
|
55885
55980
|
initScale();
|
|
55886
|
-
|
|
55887
|
-
|
|
55888
|
-
formatOptions,
|
|
55889
|
-
gTag,
|
|
55890
|
-
xLabel,
|
|
55891
|
-
innerHeight2,
|
|
55892
|
-
innerWidth2,
|
|
55893
|
-
yAxisLeft,
|
|
55894
|
-
yAxisRight,
|
|
55895
|
-
xScale,
|
|
55896
|
-
chartJSON.yMaxLeft,
|
|
55897
|
-
chartJSON.dimensionList,
|
|
55898
|
-
chartType,
|
|
55899
|
-
isDateType,
|
|
55900
|
-
width,
|
|
55901
|
-
dimensionHeightWidthArray,
|
|
55902
|
-
columnWidth,
|
|
55903
|
-
yScaleLeft
|
|
55904
|
-
);
|
|
55905
|
-
horizontalScrollBar2(seriesData, height, svg, margin, innerWidth2);
|
|
55981
|
+
getXAxis();
|
|
55982
|
+
initXaxisBar(formatOptions, gTag, xLabel, innerHeight2, innerWidth2, xAxis);
|
|
55906
55983
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
55907
55984
|
if (formatOptions.xAxisLabel.xAxisPosition != "1")
|
|
55908
55985
|
formatOptions.xAxisLabel.xAxisLabelVisibility = false;
|
|
@@ -55984,6 +56061,21 @@
|
|
|
55984
56061
|
chartId,
|
|
55985
56062
|
staticLegendShape.rectangle
|
|
55986
56063
|
);
|
|
56064
|
+
horizontalScrollBar2(
|
|
56065
|
+
seriesData,
|
|
56066
|
+
height,
|
|
56067
|
+
width,
|
|
56068
|
+
svg,
|
|
56069
|
+
margin,
|
|
56070
|
+
innerWidth2,
|
|
56071
|
+
scrollbarVisible,
|
|
56072
|
+
visibleBars,
|
|
56073
|
+
chartJSON,
|
|
56074
|
+
scrollPosition,
|
|
56075
|
+
false,
|
|
56076
|
+
setAndUpdateChartData,
|
|
56077
|
+
barChart
|
|
56078
|
+
);
|
|
55987
56079
|
};
|
|
55988
56080
|
const mapSeriesDataWithLegendList = (seriesData2, legendList, isAdvanceAnalyticsChart2, formatOptions2) => {
|
|
55989
56081
|
return seriesData2.map((series, index2) => {
|
|
@@ -56016,11 +56108,11 @@
|
|
|
56016
56108
|
const preProcessChartData = () => {
|
|
56017
56109
|
let processedSeriesData;
|
|
56018
56110
|
if (!isAdvanceAnalyticsChart) {
|
|
56019
|
-
const firstMeasure =
|
|
56111
|
+
const firstMeasure = seriesData[0]?.properties?.measureUniqueId;
|
|
56020
56112
|
let yMaxLeft = 0;
|
|
56021
56113
|
let yMaxRight = -Infinity;
|
|
56022
56114
|
processedSeriesData = seriesData.map((series, index2) => {
|
|
56023
|
-
const isFirstMeasure =
|
|
56115
|
+
const isFirstMeasure = series.properties.measureUniqueId === firstMeasure;
|
|
56024
56116
|
const newData = series.data.map((point2) => {
|
|
56025
56117
|
const newValue = isFirstMeasure ? -Math.abs(point2.value) : Math.abs(point2.value);
|
|
56026
56118
|
return {
|
|
@@ -56056,10 +56148,8 @@
|
|
|
56056
56148
|
!isAdvanceAnalyticsChart ? processedSeriesData : seriesData
|
|
56057
56149
|
)
|
|
56058
56150
|
);
|
|
56059
|
-
|
|
56060
|
-
|
|
56061
|
-
scrollPosition + visibleBars
|
|
56062
|
-
) : chartJSON.dimensionList;
|
|
56151
|
+
seriesData = filteredData;
|
|
56152
|
+
filteredDimension = chartJSON.dimensionList;
|
|
56063
56153
|
if (formatOptions.plotArea.hideZeroValues) {
|
|
56064
56154
|
chartJSON.hideZeroValues = true;
|
|
56065
56155
|
}
|
|
@@ -56087,16 +56177,23 @@
|
|
|
56087
56177
|
getXScale();
|
|
56088
56178
|
};
|
|
56089
56179
|
const getXScale = () => {
|
|
56090
|
-
yScaleLeft = point$7().domain(
|
|
56180
|
+
yScaleLeft = point$7().domain(filteredDimension).range([innerHeight2, 0]).padding(0.5);
|
|
56091
56181
|
};
|
|
56092
56182
|
const initAxis = () => {
|
|
56093
|
-
getXAxis();
|
|
56094
56183
|
yAxisLeft = axisLeft(yScaleLeft).tickSize(
|
|
56095
|
-
|
|
56096
|
-
|
|
56184
|
+
getHorizontalGridLinesTickSize(
|
|
56185
|
+
formatOptions,
|
|
56186
|
+
innerWidth2 - xScaleForLegends(0),
|
|
56187
|
+
0
|
|
56188
|
+
)
|
|
56189
|
+
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerHeight2));
|
|
56097
56190
|
yAxisRight = axisRight(yScaleLeft).tickSize(
|
|
56098
|
-
|
|
56099
|
-
|
|
56191
|
+
getHorizontalGridLinesTickSize(
|
|
56192
|
+
formatOptions,
|
|
56193
|
+
xScaleForLegends(0),
|
|
56194
|
+
0
|
|
56195
|
+
)
|
|
56196
|
+
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
56100
56197
|
};
|
|
56101
56198
|
const getXAxis = () => {
|
|
56102
56199
|
xAxis = axisBottom(xScaleForLegends).tickFormat(
|
|
@@ -56192,74 +56289,152 @@
|
|
|
56192
56289
|
innerWidth2 = width - margin2.left - margin2.right;
|
|
56193
56290
|
innerHeight2 = height - margin2.bottom - margin2.top;
|
|
56194
56291
|
};
|
|
56195
|
-
const
|
|
56196
|
-
|
|
56197
|
-
|
|
56198
|
-
|
|
56199
|
-
|
|
56200
|
-
|
|
56201
|
-
|
|
56202
|
-
|
|
56203
|
-
|
|
56204
|
-
|
|
56205
|
-
|
|
56206
|
-
|
|
56207
|
-
|
|
56208
|
-
)
|
|
56209
|
-
|
|
56210
|
-
|
|
56211
|
-
|
|
56212
|
-
|
|
56213
|
-
|
|
56292
|
+
const setAndUpdateChartData = (fDimension, fData, fVisibleBars) => {
|
|
56293
|
+
filteredData = fData;
|
|
56294
|
+
filteredDimension = fDimension;
|
|
56295
|
+
visibleBars = fVisibleBars;
|
|
56296
|
+
drawColumnChart();
|
|
56297
|
+
};
|
|
56298
|
+
function createDataForAnnotation(chartData) {
|
|
56299
|
+
const legendUniqueIdToLegendMap = /* @__PURE__ */ new Map();
|
|
56300
|
+
chartData.forEach((d) => {
|
|
56301
|
+
let obj = legendUniqueIdToLegendMap.get(d.properties.legendUniqueId);
|
|
56302
|
+
if (obj) {
|
|
56303
|
+
let array2 = obj.data ?? [];
|
|
56304
|
+
array2.push(d.data[0]);
|
|
56305
|
+
legendUniqueIdToLegendMap.set(d.properties.legendUniqueId, { ...obj, data: array2 });
|
|
56306
|
+
} else {
|
|
56307
|
+
obj = {
|
|
56308
|
+
...d,
|
|
56309
|
+
data: [d.data[0]]
|
|
56310
|
+
};
|
|
56311
|
+
legendUniqueIdToLegendMap.set(d.properties.legendUniqueId, obj);
|
|
56312
|
+
}
|
|
56313
|
+
});
|
|
56314
|
+
return legendUniqueIdToLegendMap.size > 0 ? Array.from(legendUniqueIdToLegendMap.keys()).map((d) => legendUniqueIdToLegendMap.get(d)) : chartData;
|
|
56315
|
+
}
|
|
56316
|
+
function horizontalScrollBar2(seriesData2, height2, width2, svg2, margin2, innerWidth22, scrollbarVisible2, visibleBars2, chartJSON2, scrollPosition2, isStackedChart, setAndUpdateChartData2, isBarChart = false) {
|
|
56317
|
+
const updateFromScrollPosition = (pos, scrollMax, handleWidth, handle, mouseEvent) => {
|
|
56318
|
+
try {
|
|
56319
|
+
mouseEvent && (pos = scrollPosition2 + pos);
|
|
56320
|
+
if (!chartJSON2 || !Array.isArray(chartJSON2.dimensionList) || !Array.isArray(seriesData2))
|
|
56321
|
+
return;
|
|
56322
|
+
pos = pos == null ? 0 : Number(pos);
|
|
56323
|
+
scrollMax = scrollMax == null ? 0 : Number(scrollMax);
|
|
56324
|
+
handleWidth = handleWidth == null ? 0 : Number(handleWidth);
|
|
56325
|
+
scrollPosition2 = clamp(Math.round(pos), 0, Math.max(0, scrollMax));
|
|
56326
|
+
visibleBars2 = typeof visibleBars2 === "number" ? visibleBars2 : 0;
|
|
56327
|
+
const start2 = scrollPosition2;
|
|
56328
|
+
const end = start2 + visibleBars2;
|
|
56329
|
+
let filteredDimension2 = chartJSON2.dimensionList.slice(start2, end);
|
|
56330
|
+
const isDefaultEntry = filteredDimension2[0] == chartTypes.TornadoDefaultEntry;
|
|
56331
|
+
let filteredData2 = JSON.parse(JSON.stringify(seriesData2 || []));
|
|
56332
|
+
filteredData2 = filteredData2.filter((d) => isDefaultEntry ? true : filteredDimension2.includes(d.legend.split(" - ")[1]));
|
|
56333
|
+
const safeMarginLeft = margin2?.left ?? 0;
|
|
56334
|
+
const safeMarginTop = margin2?.top ?? 0;
|
|
56335
|
+
const safeInnerWidth = Number(innerWidth22) || 0;
|
|
56336
|
+
const safeInnerHeight = Number(innerHeight2) || 0;
|
|
56337
|
+
const safeHandleSize = Number(handleWidth) || 0;
|
|
56338
|
+
const denom = scrollMax === 0 ? 1 : scrollMax;
|
|
56339
|
+
if (isBarChart) {
|
|
56340
|
+
const y2 = safeMarginTop + (safeInnerHeight - safeHandleSize) * (scrollMax === 0 ? 0 : scrollPosition2) / denom;
|
|
56341
|
+
if (handle && typeof handle.attr === "function") {
|
|
56342
|
+
handle.attr("y", y2);
|
|
56343
|
+
}
|
|
56344
|
+
} else {
|
|
56345
|
+
const x2 = safeMarginLeft + (safeInnerWidth - safeHandleSize) * (scrollMax === 0 ? 0 : scrollPosition2) / denom;
|
|
56346
|
+
if (handle && typeof handle.attr === "function") {
|
|
56347
|
+
handle.attr("x", x2);
|
|
56348
|
+
}
|
|
56349
|
+
}
|
|
56350
|
+
setAndUpdateChartData2(filteredDimension2, filteredData2, visibleBars2);
|
|
56351
|
+
} catch (error) {
|
|
56352
|
+
if (typeof logError$2 === "function")
|
|
56353
|
+
logError$2("ColumnChart", "updateFromScrollPosition", error);
|
|
56354
|
+
}
|
|
56355
|
+
};
|
|
56356
|
+
if (scrollbarVisible2) {
|
|
56357
|
+
const innerHeight22 = height2 - margin2.top - margin2.bottom;
|
|
56358
|
+
const scrollMax = Math.max(0, dimensionList.length - visibleBars2);
|
|
56359
|
+
const scrollbarY = height2 - 8;
|
|
56360
|
+
svg2.append("rect").attr("id", "scrollbarTrack").attr("x", isBarChart ? width2 - 8 : margin2.left).attr("y", isBarChart ? margin2.top : scrollbarY).attr("width", isBarChart ? 8 : innerWidth22).attr("height", isBarChart ? innerHeight22 : 8).attr("fill", "#ccc");
|
|
56361
|
+
const handleWidth = (isBarChart ? innerHeight22 : innerWidth22) * visibleBars2 / chartJSON2.dimensionList.length;
|
|
56362
|
+
const handle = svg2.append("rect").attr(
|
|
56363
|
+
"x",
|
|
56364
|
+
isBarChart ? width2 - 8 : margin2.left
|
|
56365
|
+
).attr("y", isBarChart ? margin2.top : scrollbarY).attr("width", isBarChart ? 8 : handleWidth).attr("height", isBarChart ? handleWidth : 8).attr("fill", "#999").style("cursor", isBarChart ? "ns-resize" : "ew-resize");
|
|
56366
|
+
handle.call(
|
|
56214
56367
|
drag$1().on("drag", (event2) => {
|
|
56215
|
-
|
|
56216
|
-
|
|
56217
|
-
|
|
56218
|
-
|
|
56219
|
-
|
|
56220
|
-
|
|
56221
|
-
(
|
|
56222
|
-
|
|
56223
|
-
|
|
56224
|
-
|
|
56225
|
-
|
|
56226
|
-
|
|
56227
|
-
|
|
56228
|
-
|
|
56229
|
-
|
|
56230
|
-
(
|
|
56231
|
-
|
|
56232
|
-
)
|
|
56233
|
-
|
|
56234
|
-
getXAxis();
|
|
56235
|
-
drawColumnChart();
|
|
56368
|
+
if (isBarChart) {
|
|
56369
|
+
const y2 = clamp(
|
|
56370
|
+
event2.y,
|
|
56371
|
+
margin2.top,
|
|
56372
|
+
margin2.top + innerHeight22 - handleWidth
|
|
56373
|
+
);
|
|
56374
|
+
const pos = (y2 - margin2.top) / (innerHeight22 - handleWidth) * (scrollMax || 1);
|
|
56375
|
+
updateFromScrollPosition(pos, scrollMax, handleWidth, handle, false);
|
|
56376
|
+
handle.attr("y", margin2.top + (innerHeight22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax));
|
|
56377
|
+
} else {
|
|
56378
|
+
const x2 = clamp(
|
|
56379
|
+
event2.x,
|
|
56380
|
+
margin2.left,
|
|
56381
|
+
margin2.left + innerWidth22 - handleWidth
|
|
56382
|
+
);
|
|
56383
|
+
const pos = (x2 - margin2.left) / (innerWidth22 - handleWidth) * (scrollMax || 1);
|
|
56384
|
+
updateFromScrollPosition(pos, scrollMax, handleWidth, handle, false);
|
|
56385
|
+
handle.attr("x", margin2.left + (innerWidth22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax));
|
|
56386
|
+
}
|
|
56236
56387
|
})
|
|
56237
56388
|
);
|
|
56238
56389
|
svg2.on("wheel", (event2) => {
|
|
56239
56390
|
event2.preventDefault();
|
|
56240
56391
|
const scrollDelta = Math.abs(event2.deltaX) > Math.abs(event2.deltaY) ? event2.deltaX : event2.deltaY;
|
|
56241
|
-
|
|
56242
|
-
|
|
56243
|
-
|
|
56244
|
-
|
|
56245
|
-
|
|
56246
|
-
|
|
56247
|
-
|
|
56248
|
-
(
|
|
56249
|
-
|
|
56250
|
-
)
|
|
56251
|
-
);
|
|
56252
|
-
getXAxis();
|
|
56253
|
-
drawColumnChart();
|
|
56392
|
+
const step2 = scrollDelta > 0 ? 1 : -1;
|
|
56393
|
+
updateFromScrollPosition(step2, scrollMax, handleWidth, handle, true);
|
|
56394
|
+
if (isBarChart) {
|
|
56395
|
+
const y2 = margin2.top + (innerHeight22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax);
|
|
56396
|
+
handle.attr("y", y2);
|
|
56397
|
+
} else {
|
|
56398
|
+
const x2 = margin2.left + (innerWidth22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax);
|
|
56399
|
+
handle.attr("x", x2);
|
|
56400
|
+
}
|
|
56254
56401
|
});
|
|
56402
|
+
} else {
|
|
56403
|
+
svg2.on("wheel", null);
|
|
56255
56404
|
}
|
|
56256
|
-
|
|
56257
|
-
|
|
56405
|
+
updateFromScrollPosition(
|
|
56406
|
+
0,
|
|
56407
|
+
0,
|
|
56408
|
+
0,
|
|
56409
|
+
null,
|
|
56410
|
+
true
|
|
56411
|
+
);
|
|
56412
|
+
}
|
|
56258
56413
|
const drawColumnChart = () => {
|
|
56259
|
-
|
|
56414
|
+
getXScale();
|
|
56415
|
+
initAxis();
|
|
56416
|
+
initYaxisBar(
|
|
56417
|
+
formatOptions,
|
|
56418
|
+
gTag,
|
|
56419
|
+
xLabel,
|
|
56420
|
+
innerHeight2,
|
|
56421
|
+
innerWidth2,
|
|
56422
|
+
yAxisLeft,
|
|
56423
|
+
yAxisRight,
|
|
56424
|
+
xScale,
|
|
56425
|
+
chartJSON.yMaxLeft,
|
|
56426
|
+
filteredDimension,
|
|
56427
|
+
chartType,
|
|
56428
|
+
isDateType,
|
|
56429
|
+
width,
|
|
56430
|
+
dimensionHeightWidthArray,
|
|
56431
|
+
columnWidth,
|
|
56432
|
+
yScaleLeft
|
|
56433
|
+
);
|
|
56260
56434
|
getChartType();
|
|
56435
|
+
const dataForAnnotation = createDataForAnnotation(filteredData);
|
|
56261
56436
|
commonAnnotations(
|
|
56262
|
-
|
|
56437
|
+
dataForAnnotation ?? [],
|
|
56263
56438
|
yScaleLeft,
|
|
56264
56439
|
xScale,
|
|
56265
56440
|
null,
|
|
@@ -56299,7 +56474,7 @@
|
|
|
56299
56474
|
}
|
|
56300
56475
|
) });
|
|
56301
56476
|
};
|
|
56302
|
-
const
|
|
56477
|
+
const DotPlot = ({
|
|
56303
56478
|
isDateType,
|
|
56304
56479
|
formatOptions,
|
|
56305
56480
|
data,
|
|
@@ -56308,7 +56483,7 @@
|
|
|
56308
56483
|
}) => {
|
|
56309
56484
|
const chartId = crypto.randomUUID();
|
|
56310
56485
|
let columnWidth = 0;
|
|
56311
|
-
const chartType = chartTypes.
|
|
56486
|
+
const chartType = chartTypes.DotPlot;
|
|
56312
56487
|
const svgRef = require$$0$1.useRef();
|
|
56313
56488
|
const seriesData = generalizedChartData(
|
|
56314
56489
|
data.ChartData,
|
|
@@ -56365,16 +56540,16 @@
|
|
|
56365
56540
|
};
|
|
56366
56541
|
require$$0$1.useEffect(() => {
|
|
56367
56542
|
try {
|
|
56368
|
-
|
|
56543
|
+
createDotPlot();
|
|
56369
56544
|
} catch (error) {
|
|
56370
56545
|
logError$2(
|
|
56371
56546
|
"StackStackHorizontalBarchart",
|
|
56372
|
-
"
|
|
56547
|
+
"createDotPlot",
|
|
56373
56548
|
error
|
|
56374
56549
|
);
|
|
56375
56550
|
}
|
|
56376
56551
|
}, [formatOptions]);
|
|
56377
|
-
const
|
|
56552
|
+
const createDotPlot = () => {
|
|
56378
56553
|
({ formatOptions, svg, width, height } = firstFunctionBeforeRender$1(
|
|
56379
56554
|
svgRef,
|
|
56380
56555
|
formatOptions
|
|
@@ -56602,32 +56777,64 @@
|
|
|
56602
56777
|
};
|
|
56603
56778
|
const getChartType = (lineData) => {
|
|
56604
56779
|
lineData.forEach((lData) => {
|
|
56605
|
-
lData.data.forEach((
|
|
56606
|
-
|
|
56607
|
-
|
|
56608
|
-
|
|
56780
|
+
lData.data.forEach((d) => {
|
|
56781
|
+
d.markerShape = lData.properties.markerShape || "Circle";
|
|
56782
|
+
d.markerSize = lData.properties.markerSize || 6;
|
|
56783
|
+
d.markerColor = lData.properties.markerColor || lData.properties.color;
|
|
56784
|
+
d.alias = lData.properties.alias;
|
|
56785
|
+
d.lineStyle = lData.properties.lineStyle;
|
|
56609
56786
|
});
|
|
56610
56787
|
});
|
|
56611
|
-
|
|
56788
|
+
const groupedData = group(
|
|
56789
|
+
lineData.flatMap(
|
|
56790
|
+
(l) => l.data.map((d) => ({
|
|
56791
|
+
...d,
|
|
56792
|
+
color: l.properties.color
|
|
56793
|
+
}))
|
|
56794
|
+
),
|
|
56795
|
+
(d) => d.dimension
|
|
56796
|
+
);
|
|
56797
|
+
const lineGroups = gTag.selectAll(".cleveland-line-group").data(Array.from(groupedData), ([d]) => d);
|
|
56798
|
+
const lineEnter = lineGroups.enter().append("g").attr("class", "cleveland-line-group");
|
|
56799
|
+
lineEnter.append("line").merge(lineGroups.select("line")).attr("y1", ([dim]) => yScale(dim)).attr("y2", ([dim]) => yScale(dim)).attr(
|
|
56800
|
+
"x1",
|
|
56801
|
+
([, v]) => xScaleBottom(Math.min(v[0]?.value ?? 0, v[1]?.value ?? 0))
|
|
56802
|
+
).attr(
|
|
56803
|
+
"x2",
|
|
56804
|
+
([, v]) => xScaleBottom(Math.max(v[0]?.value ?? 0, v[1]?.value ?? 0))
|
|
56805
|
+
).attr("stroke", "#c7c7c7").attr("stroke-width", 2).attr("stroke-dasharray", (d) => {
|
|
56806
|
+
switch (d[1][0].lineStyle) {
|
|
56807
|
+
case staticLineStyle.dotted:
|
|
56808
|
+
return `0,${d[1][0].lineStyle + 2}`;
|
|
56809
|
+
case staticLineStyle.dashed:
|
|
56810
|
+
return strokeDashValues;
|
|
56811
|
+
default:
|
|
56812
|
+
return "";
|
|
56813
|
+
}
|
|
56814
|
+
}).attr(
|
|
56815
|
+
"stroke-linecap",
|
|
56816
|
+
(d) => d[1][0].lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
56817
|
+
);
|
|
56818
|
+
lineGroups.exit().remove();
|
|
56819
|
+
lineData.forEach((data2) => {
|
|
56612
56820
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.properties.legendUniqueId);
|
|
56613
|
-
column = column.enter().append("g").attr("class",
|
|
56614
|
-
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.dimension);
|
|
56615
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
56821
|
+
column = column.enter().append("g").attr("class", "parentGroup").attr(
|
|
56616
56822
|
"hoverId",
|
|
56617
|
-
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
56618
|
-
|
|
56619
|
-
|
|
56620
|
-
|
|
56621
|
-
).attr(
|
|
56622
|
-
"
|
|
56623
|
-
(d) =>
|
|
56624
|
-
)
|
|
56625
|
-
|
|
56626
|
-
|
|
56627
|
-
|
|
56628
|
-
)
|
|
56629
|
-
|
|
56630
|
-
|
|
56823
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")
|
|
56824
|
+
).merge(column);
|
|
56825
|
+
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.dimension);
|
|
56826
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group");
|
|
56827
|
+
columnGroupsEnter.append("path").attr("class", "cleveland-dot").merge(columnGroups.select("path")).attr(
|
|
56828
|
+
"d",
|
|
56829
|
+
(d) => Symbol$1().type(Markershapes(d.markerShape)).size((d.markerSize || 6) * 70)()
|
|
56830
|
+
).attr("transform", (d) => {
|
|
56831
|
+
const x2 = xScaleBottom(d.value);
|
|
56832
|
+
const y2 = yScale(d.dimension);
|
|
56833
|
+
return `translate(${x2},${y2})`;
|
|
56834
|
+
}).attr("fill", (d) => data2.properties.color).attr("opacity", 0.9).attr(
|
|
56835
|
+
"visibility",
|
|
56836
|
+
() => formatOptions.marker?.markerVisibility ? "visible" : "hidden"
|
|
56837
|
+
).on("mousemove", (event2, d) => {
|
|
56631
56838
|
showTooltipOnMouseMove(
|
|
56632
56839
|
[
|
|
56633
56840
|
{
|
|
@@ -56645,7 +56852,7 @@
|
|
|
56645
56852
|
},
|
|
56646
56853
|
{
|
|
56647
56854
|
key: "Legend",
|
|
56648
|
-
value: d.
|
|
56855
|
+
value: d.alias
|
|
56649
56856
|
}
|
|
56650
56857
|
],
|
|
56651
56858
|
formatOptions,
|
|
@@ -56655,8 +56862,10 @@
|
|
|
56655
56862
|
let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
|
|
56656
56863
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
56657
56864
|
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
56865
|
+
select$2(event2.currentTarget.parentNode).selectAll(".halo").data([d]).join("circle").attr("class", "halo").attr("cx", xScaleBottom(d.value)).attr("cy", yScale(d.dimension)).attr("r", (d.markerSize || 6) * 3).attr("fill", d.markerColor).attr("opacity", 0.4);
|
|
56658
56866
|
}).on("mouseout", () => {
|
|
56659
56867
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
56868
|
+
selectAll(".halo").remove();
|
|
56660
56869
|
hideTooltipOnMouseOut();
|
|
56661
56870
|
});
|
|
56662
56871
|
columnGroups.exit().remove();
|
|
@@ -56671,9 +56880,9 @@
|
|
|
56671
56880
|
filteredData = fData;
|
|
56672
56881
|
filteredDimension = fDimension;
|
|
56673
56882
|
visibleBars = fVisibleBars;
|
|
56674
|
-
|
|
56883
|
+
drawDotPlot();
|
|
56675
56884
|
};
|
|
56676
|
-
const
|
|
56885
|
+
const drawDotPlot = () => {
|
|
56677
56886
|
getYScale();
|
|
56678
56887
|
getYAxis();
|
|
56679
56888
|
initYaxisBar(
|
|
@@ -56721,8 +56930,8 @@
|
|
|
56721
56930
|
onDataLabelCoordinatesChange,
|
|
56722
56931
|
yScale,
|
|
56723
56932
|
columnWidth,
|
|
56724
|
-
false,
|
|
56725
56933
|
isReportEditable,
|
|
56934
|
+
false,
|
|
56726
56935
|
barChart
|
|
56727
56936
|
);
|
|
56728
56937
|
getConnectors();
|
|
@@ -56959,11 +57168,11 @@
|
|
|
56959
57168
|
};
|
|
56960
57169
|
exports2.AreaChart = AreaChart;
|
|
56961
57170
|
exports2.BubbleChart = BubbleChart;
|
|
56962
|
-
exports2.ClevelandDotPlot = ClevelandDotPlot;
|
|
56963
57171
|
exports2.ColumnChart = ColumnChart;
|
|
56964
57172
|
exports2.ColumnHistogramChart = ColumnHistogramChart;
|
|
56965
57173
|
exports2.CustomColumnChart = CustomColumnChart;
|
|
56966
57174
|
exports2.DonutChart = DonutChart;
|
|
57175
|
+
exports2.DotPlot = DotPlot;
|
|
56967
57176
|
exports2.HorizontalBarChart = HorizontalBarChart;
|
|
56968
57177
|
exports2.HorizontalHistogramChart = HorizontalHistogramChart;
|
|
56969
57178
|
exports2.LayeredColumnChart = LayeredColumnChart;
|