pace-chart-lib 1.0.50 → 1.0.52
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/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 +8 -0
- package/dist/Components/Charts/Core/CommonFunctions.d.ts +1 -0
- package/dist/Components/Charts/Core/DefaultProperties.types.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/pace-chart-lib.es.js +560 -347
- package/dist/pace-chart-lib.umd.js +560 -347
- 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");
|
|
@@ -11160,6 +11181,7 @@
|
|
|
11160
11181
|
totalColor: "#41a5b4",
|
|
11161
11182
|
positiveColor: "#9fb700",
|
|
11162
11183
|
negativeColor: "#e25a42",
|
|
11184
|
+
dotPlotLineColor: "#c7c7c7",
|
|
11163
11185
|
dataLabelValue: true,
|
|
11164
11186
|
plotAreaAbsoluteValue: false,
|
|
11165
11187
|
dataLabelName: true,
|
|
@@ -11580,7 +11602,7 @@
|
|
|
11580
11602
|
chartTypes2["CombinationArea"] = "CombinationArea";
|
|
11581
11603
|
chartTypes2["CombinationStackArea"] = "CombinationStackArea";
|
|
11582
11604
|
chartTypes2["TornadoDefaultEntry"] = "defaultEntry";
|
|
11583
|
-
chartTypes2["
|
|
11605
|
+
chartTypes2["DotPlot"] = "DotPlot";
|
|
11584
11606
|
return chartTypes2;
|
|
11585
11607
|
})(chartTypes || {});
|
|
11586
11608
|
const connecterCurve = {
|
|
@@ -13377,7 +13399,8 @@
|
|
|
13377
13399
|
} else {
|
|
13378
13400
|
if (barChart) {
|
|
13379
13401
|
const legendUniqueId = d.legendUniqueId.includes("~$~") ? d.legendUniqueId.split("~$~")[0] : d.legendUniqueId;
|
|
13380
|
-
|
|
13402
|
+
const xScaleLegend = chartType !== chartTypes.DotPlot ? xScaleForLegends(legendUniqueId) : 0;
|
|
13403
|
+
return isTornadoChart ? xScaleForLegends(d.y) + xScaleForLegends.bandwidth() / 2 : xScaleForLegends ? xScale(d.y) + xScaleLegend - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
|
|
13381
13404
|
} else
|
|
13382
13405
|
return dataLabelsPosition(
|
|
13383
13406
|
d.y.measure,
|
|
@@ -16060,11 +16083,13 @@
|
|
|
16060
16083
|
let maxLength = 0;
|
|
16061
16084
|
let maxLegend = list[0];
|
|
16062
16085
|
list.forEach((legend) => {
|
|
16063
|
-
|
|
16064
|
-
|
|
16065
|
-
|
|
16066
|
-
maxLength
|
|
16067
|
-
|
|
16086
|
+
if (legend !== void 0) {
|
|
16087
|
+
let splitedLegend = legend.includes("~$~") ? legend.split("~$~")[1] : legend.includes("-") ? legend.slice(legend.indexOf("-") + 1) : legend;
|
|
16088
|
+
let splitedLegendLength = splitedLegend.length;
|
|
16089
|
+
if (maxLength < splitedLegendLength) {
|
|
16090
|
+
maxLength = splitedLegendLength;
|
|
16091
|
+
maxLegend = splitedLegend;
|
|
16092
|
+
}
|
|
16068
16093
|
}
|
|
16069
16094
|
});
|
|
16070
16095
|
return calculateWidthHeightDynamically(maxLegend, formatOptions.legends.legendFontSize, formatOptions.legends.legendFontFamily);
|
|
@@ -16074,9 +16099,6 @@
|
|
|
16074
16099
|
}
|
|
16075
16100
|
function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, tooltipHandle, formatOptions, chartJSON, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue, isNormalizedChart) {
|
|
16076
16101
|
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
16102
|
let hideZeroValues = formatOptions.plotArea.hideZeroValues;
|
|
16081
16103
|
formatOptions.plotArea.plotAreaHideLineAndMarkers === void 0 ? formatOptions.plotArea.plotAreaHideLineAndMarkers = true : null;
|
|
16082
16104
|
chartData.forEach(
|
|
@@ -16094,8 +16116,8 @@
|
|
|
16094
16116
|
let markerGroupsEnter = markerGroups.enter().append("g").attr("class", "parentGroup").attr("hoverId", (d) => (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-"));
|
|
16095
16117
|
let mergedMarkerGroups = markerGroupsEnter.merge(markerGroups);
|
|
16096
16118
|
mergedMarkerGroups.each(function(groupData) {
|
|
16097
|
-
const
|
|
16098
|
-
let markers =
|
|
16119
|
+
const group2 = select$2(this);
|
|
16120
|
+
let markers = group2.selectAll("path").data(groupData.data);
|
|
16099
16121
|
let markersEnter = markers.enter().append("path").attr("fill", (d) => d.markerColor);
|
|
16100
16122
|
markersEnter.merge(markers).attr("d", (d) => {
|
|
16101
16123
|
return Symbol$1().type(Markershapes(d.markerShape)).size(d.markerSize * 50)();
|
|
@@ -16170,6 +16192,9 @@
|
|
|
16170
16192
|
logError$2(fileName$b, "lineMarkers", error);
|
|
16171
16193
|
}
|
|
16172
16194
|
}
|
|
16195
|
+
function Markershapes(Shape) {
|
|
16196
|
+
return Shape == "Square" ? square : Shape == "Circle" ? circle : Shape == "Cross" ? cross : Shape == "Triangle" ? triangle : Shape == "Star" ? star : Shape == "Diamond" ? diamond : Shape == "Wye" ? wye : circle;
|
|
16197
|
+
}
|
|
16173
16198
|
const checkVisibleConditions = (chartData, d, type, hideZeroValues, yScaleRight, customYaxisMinValue, customYaxisMaxValue) => {
|
|
16174
16199
|
try {
|
|
16175
16200
|
if (chartData[0].properties.axis && chartData[0].properties.axis === "Secondary") {
|
|
@@ -16388,12 +16413,21 @@
|
|
|
16388
16413
|
}
|
|
16389
16414
|
function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
|
|
16390
16415
|
try {
|
|
16391
|
-
const markerColor = prop
|
|
16392
|
-
const markerShape = prop?.markerShape
|
|
16416
|
+
const markerColor = prop?.color ?? prop?.markerColor ?? "blue";
|
|
16417
|
+
const markerShape = prop?.markerShape?.toLowerCase() ?? "circle";
|
|
16393
16418
|
const isLightTheme = chartFormatOptions.toolTip.toolTipTheme === "Light";
|
|
16394
16419
|
const bgColor = isLightTheme ? "rgba(255, 255, 255)" : "#272729ff";
|
|
16395
16420
|
const textColor = isLightTheme ? "black" : commonColors.white;
|
|
16396
16421
|
const subTextColor = isLightTheme ? "gray" : "#d1d5db";
|
|
16422
|
+
const formatValueWithWordLimit = (text, wordsPerLine = 6) => {
|
|
16423
|
+
if (!text) return "";
|
|
16424
|
+
const words = text.split(" ");
|
|
16425
|
+
let result = "";
|
|
16426
|
+
for (let i = 0; i < words.length; i += wordsPerLine) {
|
|
16427
|
+
result += words.slice(i, i + wordsPerLine).join(" ") + "<br/>";
|
|
16428
|
+
}
|
|
16429
|
+
return result;
|
|
16430
|
+
};
|
|
16397
16431
|
selectAll(".chartTooltip").style("visibility", visibilityCondition.hidden);
|
|
16398
16432
|
const tooltip = select$2("#chartTooltipDiv").html("").append("div").attr(
|
|
16399
16433
|
"class",
|
|
@@ -16428,29 +16462,53 @@
|
|
|
16428
16462
|
}
|
|
16429
16463
|
})();
|
|
16430
16464
|
p += `
|
|
16431
|
-
<div style="
|
|
16465
|
+
<div style="
|
|
16466
|
+
display:flex;
|
|
16467
|
+
align-items:flex-start;
|
|
16468
|
+
justify-content:space-between;
|
|
16469
|
+
margin-bottom:6px;
|
|
16470
|
+
gap:10px;
|
|
16471
|
+
">
|
|
16472
|
+
|
|
16473
|
+
<!-- LEFT SIDE (Dot + Key) -->
|
|
16474
|
+
<div style="
|
|
16475
|
+
display:flex;
|
|
16476
|
+
align-items:flex-start;
|
|
16477
|
+
gap:6px;
|
|
16478
|
+
flex-shrink:0;
|
|
16479
|
+
">
|
|
16432
16480
|
<span style="
|
|
16433
|
-
display:inline-block;
|
|
16434
16481
|
width:6px;
|
|
16435
16482
|
height:6px;
|
|
16436
|
-
background
|
|
16437
|
-
margin-
|
|
16438
|
-
|
|
16483
|
+
background:${markerColor};
|
|
16484
|
+
margin-top:5px;
|
|
16485
|
+
border-radius:50%;
|
|
16439
16486
|
"></span>
|
|
16487
|
+
|
|
16440
16488
|
<span style="
|
|
16441
|
-
font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
|
|
16442
16489
|
font-size:11px;
|
|
16443
16490
|
color:${subTextColor};
|
|
16444
|
-
|
|
16445
|
-
"
|
|
16446
|
-
|
|
16447
|
-
|
|
16448
|
-
|
|
16449
|
-
|
|
16450
|
-
|
|
16451
|
-
|
|
16452
|
-
|
|
16453
|
-
|
|
16491
|
+
white-space:nowrap;
|
|
16492
|
+
">
|
|
16493
|
+
${c2.key || ""}
|
|
16494
|
+
</span>
|
|
16495
|
+
</div>
|
|
16496
|
+
|
|
16497
|
+
<!-- RIGHT SIDE (Value) -->
|
|
16498
|
+
<div style="
|
|
16499
|
+
font-size:11px;
|
|
16500
|
+
font-weight:bold;
|
|
16501
|
+
color:${textColor};
|
|
16502
|
+
text-align:right;
|
|
16503
|
+
max-width:200px;
|
|
16504
|
+
word-break:break-word;
|
|
16505
|
+
line-height:1.4;
|
|
16506
|
+
">
|
|
16507
|
+
${formatValueWithWordLimit(String(c2.value), 6)}
|
|
16508
|
+
</div>
|
|
16509
|
+
|
|
16510
|
+
</div>
|
|
16511
|
+
`;
|
|
16454
16512
|
return p;
|
|
16455
16513
|
}, ``);
|
|
16456
16514
|
tooltip.html(`
|
|
@@ -16462,35 +16520,20 @@
|
|
|
16462
16520
|
const tooltipNode = tooltip.node();
|
|
16463
16521
|
const tooltipWidth = tooltipNode.offsetWidth;
|
|
16464
16522
|
const tooltipHeight = tooltipNode.offsetHeight;
|
|
16465
|
-
|
|
16466
|
-
|
|
16467
|
-
|
|
16468
|
-
let top2 = 0;
|
|
16469
|
-
let arrow = "";
|
|
16470
|
-
if (mouseX > halfWidth && mouseY < halfHeight) {
|
|
16523
|
+
let left2 = mouseX + 15;
|
|
16524
|
+
let top2 = mouseY + 15;
|
|
16525
|
+
if (left2 + tooltipWidth > window.innerWidth) {
|
|
16471
16526
|
left2 = mouseX - tooltipWidth - 10;
|
|
16472
|
-
|
|
16473
|
-
|
|
16474
|
-
|
|
16475
|
-
left2 = mouseX + 20;
|
|
16476
|
-
top2 = mouseY - 10;
|
|
16477
|
-
arrow = "left-top";
|
|
16478
|
-
} else if (mouseX < halfWidth && mouseY >= halfHeight) {
|
|
16479
|
-
left2 = mouseX + 20;
|
|
16480
|
-
top2 = mouseY - tooltipHeight + 10;
|
|
16481
|
-
arrow = "left-bottom";
|
|
16482
|
-
} else {
|
|
16483
|
-
left2 = mouseX - tooltipWidth - 10;
|
|
16484
|
-
top2 = mouseY - tooltipHeight + 10;
|
|
16485
|
-
arrow = "right-bottom";
|
|
16527
|
+
}
|
|
16528
|
+
if (top2 + tooltipHeight > window.innerHeight) {
|
|
16529
|
+
top2 = mouseY - tooltipHeight - 10;
|
|
16486
16530
|
}
|
|
16487
16531
|
tooltip.style("left", `${left2}px`).style("top", `${top2}px`).style(
|
|
16488
16532
|
"visibility",
|
|
16489
|
-
chartFormatOptions.toolTip.toolTipVisibility ?
|
|
16490
|
-
)
|
|
16491
|
-
tooltip.select(".arrow-placeholder").attr("class", `arrow-${arrow}`);
|
|
16533
|
+
chartFormatOptions.toolTip.toolTipVisibility ? "visible" : "hidden"
|
|
16534
|
+
);
|
|
16492
16535
|
} catch (error) {
|
|
16493
|
-
|
|
16536
|
+
console.error("Tooltip Error:", error);
|
|
16494
16537
|
}
|
|
16495
16538
|
}
|
|
16496
16539
|
function hideTooltipOnMouseOut() {
|
|
@@ -16559,12 +16602,14 @@
|
|
|
16559
16602
|
const hoverId = this.textContent.replace(/\s+/g, "-");
|
|
16560
16603
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
16561
16604
|
svg.selectAll(`[hoverId="${hoverId}"]`).classed("highlight", true).classed("unhighlight", false);
|
|
16605
|
+
svg.selectAll(".cleveland-line-group").classed("highlight", false).classed("unhighlight", true);
|
|
16562
16606
|
}
|
|
16563
16607
|
}).on("mouseout", function() {
|
|
16564
16608
|
if (chartFormatOptions.legends.onHoverEffect) {
|
|
16565
16609
|
const hoverId = this.textContent.replace(/\s+/g, "-");
|
|
16566
16610
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
16567
16611
|
svg.selectAll(`[hoverId="${hoverId}"]`).classed("highlight", false).classed("unhighlight", false);
|
|
16612
|
+
svg.selectAll(".cleveland-line-group").classed("highlight", false).classed("unhighlight", false);
|
|
16568
16613
|
}
|
|
16569
16614
|
});
|
|
16570
16615
|
if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom) {
|
|
@@ -17105,12 +17150,12 @@
|
|
|
17105
17150
|
};
|
|
17106
17151
|
const measureMap = /* @__PURE__ */ new Map();
|
|
17107
17152
|
data?.LegendList?.forEach((legend) => {
|
|
17108
|
-
measureMap.set(splitLengend(legend?.name), legend);
|
|
17153
|
+
measureMap.set(isAdvanceAnalyticsChart ? splitLengend(legend?.name) : legend.measureUniqueId, legend);
|
|
17109
17154
|
});
|
|
17110
17155
|
return seriesData.map((series) => {
|
|
17111
17156
|
return {
|
|
17112
17157
|
...series,
|
|
17113
|
-
properties: measureMap.get(isAdvanceAnalyticsChart ? splitLengend(series.legend) : series.properties.
|
|
17158
|
+
properties: measureMap.get(isAdvanceAnalyticsChart ? splitLengend(series.legend) : series.properties.measureUniqueId) ?? series.properties
|
|
17114
17159
|
};
|
|
17115
17160
|
}).filter((series) => series.data[0].value !== 0);
|
|
17116
17161
|
} catch (_) {
|
|
@@ -22184,7 +22229,7 @@
|
|
|
22184
22229
|
(d2) => d2.properties.lineStyle !== "None" ? d2.properties.lineWidth : 0
|
|
22185
22230
|
).attr(
|
|
22186
22231
|
"hoverId",
|
|
22187
|
-
(d.properties.alias ||
|
|
22232
|
+
(d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-")
|
|
22188
22233
|
).attr("d", (d2) => lineGenerator(d2.data));
|
|
22189
22234
|
});
|
|
22190
22235
|
lineGroups.exit().remove();
|
|
@@ -22222,7 +22267,7 @@
|
|
|
22222
22267
|
xAxis,
|
|
22223
22268
|
dimensionHeightWidthArray,
|
|
22224
22269
|
height,
|
|
22225
|
-
innerWidth2 /
|
|
22270
|
+
innerWidth2 / filteredDimension.length,
|
|
22226
22271
|
isDateType,
|
|
22227
22272
|
innerWidth2,
|
|
22228
22273
|
innerHeight2,
|
|
@@ -29138,8 +29183,16 @@
|
|
|
29138
29183
|
}
|
|
29139
29184
|
chartData = chartData.map((d) => {
|
|
29140
29185
|
let value2 = d.data.data[valueIndex].value;
|
|
29141
|
-
|
|
29142
|
-
|
|
29186
|
+
return {
|
|
29187
|
+
...d,
|
|
29188
|
+
data: {
|
|
29189
|
+
...d.data,
|
|
29190
|
+
properties: {
|
|
29191
|
+
...d.data.properties,
|
|
29192
|
+
themeColor: colorScale(value2.toString())
|
|
29193
|
+
}
|
|
29194
|
+
}
|
|
29195
|
+
};
|
|
29143
29196
|
});
|
|
29144
29197
|
appendColorScale(
|
|
29145
29198
|
startColor,
|
|
@@ -29973,6 +30026,11 @@
|
|
|
29973
30026
|
annotationsList = [];
|
|
29974
30027
|
seriesData.forEach((d, i) => {
|
|
29975
30028
|
try {
|
|
30029
|
+
const type = chartFormatOptions.annotation.annotationVisibility;
|
|
30030
|
+
const lastIndex = seriesData.length - 1;
|
|
30031
|
+
if (type === dataLabelPositionType.none || type === dataLabelPositionType.startOnly && i !== 0 || type === dataLabelPositionType.endOnly && i !== lastIndex || type === dataLabelPositionType.startAndEndBoth && i !== 0 && i !== lastIndex) {
|
|
30032
|
+
return;
|
|
30033
|
+
}
|
|
29976
30034
|
let singleAnnotation = {
|
|
29977
30035
|
note: {
|
|
29978
30036
|
title: chartFormatOptions.plotArea.dataLabelName ? d.properties.alias : "",
|
|
@@ -30749,7 +30807,8 @@
|
|
|
30749
30807
|
}
|
|
30750
30808
|
}
|
|
30751
30809
|
let valuefontStyle = chartFormatOptions.pointerValue.pointerValueFontStyle;
|
|
30752
|
-
|
|
30810
|
+
chartAreaTagG.selectAll(".pointerValueText").remove();
|
|
30811
|
+
let comparedValue = chartAreaTagG.append("g").attr("class", "pointerValueText").attr("transform", positionTransformString2);
|
|
30753
30812
|
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(
|
|
30754
30813
|
"fill",
|
|
30755
30814
|
chartFormatOptions.pointerValue.pointerValueColor !== commonColors.white ? chartFormatOptions.pointerValue.pointerValueColor : "none"
|
|
@@ -30893,6 +30952,31 @@
|
|
|
30893
30952
|
logError("RadialBarChart.tsx", "loopOverChartData", error);
|
|
30894
30953
|
}
|
|
30895
30954
|
};
|
|
30955
|
+
const getModifiedDataForLabels = (data) => {
|
|
30956
|
+
try {
|
|
30957
|
+
const dataLabelType = chartFormatOptions.plotArea.dataLabelsOptions;
|
|
30958
|
+
switch (dataLabelType) {
|
|
30959
|
+
case dataLabelPositionType.automatic:
|
|
30960
|
+
return data.map((item, index2) => {
|
|
30961
|
+
return {
|
|
30962
|
+
...item,
|
|
30963
|
+
index: index2
|
|
30964
|
+
};
|
|
30965
|
+
});
|
|
30966
|
+
case dataLabelPositionType.startOnly:
|
|
30967
|
+
return [{ ...data[0], index: 0 }];
|
|
30968
|
+
case dataLabelPositionType.endOnly:
|
|
30969
|
+
return [{ ...data[data.length - 1], index: data.length - 1 }];
|
|
30970
|
+
case dataLabelPositionType.startAndEndBoth:
|
|
30971
|
+
return [{ ...data[0], index: 0 }, { ...data[data.length - 1], index: data.length - 1 }];
|
|
30972
|
+
case dataLabelPositionType.none:
|
|
30973
|
+
return [];
|
|
30974
|
+
}
|
|
30975
|
+
} catch (error) {
|
|
30976
|
+
logError("RadialBarChart.tsx", "getModifiedDataForLabels", error);
|
|
30977
|
+
return data;
|
|
30978
|
+
}
|
|
30979
|
+
};
|
|
30896
30980
|
const initRadialBarChart = () => {
|
|
30897
30981
|
try {
|
|
30898
30982
|
let arcTween = function(d, i) {
|
|
@@ -31048,7 +31132,8 @@
|
|
|
31048
31132
|
(d, i) => chartFormatOptions.plotArea.arcTransition ? i * 200 : 0
|
|
31049
31133
|
).duration(chartFormatOptions.plotArea.arcTransition ? 500 : 0).attrTween("d", arcTween);
|
|
31050
31134
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
31051
|
-
|
|
31135
|
+
const labelsData = getModifiedDataForLabels(ChartData);
|
|
31136
|
+
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(
|
|
31052
31137
|
(d) => ` ${d.properties.alias}
|
|
31053
31138
|
${chartFormatOptions.plotArea.dataLabelValue ? getNumberWithFormatFunction(
|
|
31054
31139
|
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
@@ -31525,28 +31610,27 @@
|
|
|
31525
31610
|
initSvg(svgRef, width, height, chartFormatOptions);
|
|
31526
31611
|
chartAreaTagG = initChartArea(svg, margins);
|
|
31527
31612
|
drawChartTitle(svgRef, chartTitleHeight, width, chartFormatOptions);
|
|
31528
|
-
calculateWordCloudData(
|
|
31613
|
+
calculateWordCloudData();
|
|
31529
31614
|
drawWordCloudChart();
|
|
31530
31615
|
};
|
|
31531
|
-
const calculateWordCloudData = (
|
|
31616
|
+
const calculateWordCloudData = () => {
|
|
31532
31617
|
try {
|
|
31533
31618
|
totalMeasureValue = 0;
|
|
31534
|
-
|
|
31619
|
+
seriesData = seriesData.map((item) => {
|
|
31535
31620
|
let value2 = item.data[0].value;
|
|
31536
31621
|
totalMeasureValue += value2;
|
|
31622
|
+
if (chartFormatOptions.plotArea.hideZeroValues && value2 == 0) {
|
|
31623
|
+
return null;
|
|
31624
|
+
}
|
|
31537
31625
|
if (value2 < min2) {
|
|
31538
31626
|
min2 = value2;
|
|
31539
31627
|
}
|
|
31540
31628
|
if (value2 > max2) {
|
|
31541
31629
|
max2 = value2;
|
|
31542
31630
|
}
|
|
31543
|
-
|
|
31544
|
-
return null;
|
|
31545
|
-
} else {
|
|
31546
|
-
return item;
|
|
31547
|
-
}
|
|
31631
|
+
return item;
|
|
31548
31632
|
});
|
|
31549
|
-
|
|
31633
|
+
seriesData = seriesData.filter((item) => item !== null);
|
|
31550
31634
|
scale2 = linear$1().domain([min2, max2]).range([12, 70]);
|
|
31551
31635
|
} catch (error) {
|
|
31552
31636
|
logError$2(fileName$2, "calculateWordCloudData", error);
|
|
@@ -32601,8 +32685,8 @@
|
|
|
32601
32685
|
function selection_select(select2) {
|
|
32602
32686
|
if (typeof select2 !== "function") select2 = selector(select2);
|
|
32603
32687
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
32604
|
-
for (var
|
|
32605
|
-
if ((node =
|
|
32688
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
32689
|
+
if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
|
|
32606
32690
|
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
32607
32691
|
subgroup[i] = subnode;
|
|
32608
32692
|
}
|
|
@@ -32621,9 +32705,9 @@
|
|
|
32621
32705
|
function selection_selectAll(select2) {
|
|
32622
32706
|
if (typeof select2 !== "function") select2 = selectorAll(select2);
|
|
32623
32707
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
32624
|
-
for (var
|
|
32625
|
-
if (node =
|
|
32626
|
-
subgroups.push(select2.call(node, node.__data__, i,
|
|
32708
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
32709
|
+
if (node = group2[i]) {
|
|
32710
|
+
subgroups.push(select2.call(node, node.__data__, i, group2));
|
|
32627
32711
|
parents.push(node);
|
|
32628
32712
|
}
|
|
32629
32713
|
}
|
|
@@ -32638,8 +32722,8 @@
|
|
|
32638
32722
|
function selection_filter(match) {
|
|
32639
32723
|
if (typeof match !== "function") match = matcher(match);
|
|
32640
32724
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
32641
|
-
for (var
|
|
32642
|
-
if ((node =
|
|
32725
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
32726
|
+
if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
|
|
32643
32727
|
subgroup.push(node);
|
|
32644
32728
|
}
|
|
32645
32729
|
}
|
|
@@ -32680,10 +32764,10 @@
|
|
|
32680
32764
|
};
|
|
32681
32765
|
}
|
|
32682
32766
|
var keyPrefix = "$";
|
|
32683
|
-
function bindIndex(parent,
|
|
32684
|
-
var i = 0, node, groupLength =
|
|
32767
|
+
function bindIndex(parent, group2, enter, update, exit, data) {
|
|
32768
|
+
var i = 0, node, groupLength = group2.length, dataLength = data.length;
|
|
32685
32769
|
for (; i < dataLength; ++i) {
|
|
32686
|
-
if (node =
|
|
32770
|
+
if (node = group2[i]) {
|
|
32687
32771
|
node.__data__ = data[i];
|
|
32688
32772
|
update[i] = node;
|
|
32689
32773
|
} else {
|
|
@@ -32691,16 +32775,16 @@
|
|
|
32691
32775
|
}
|
|
32692
32776
|
}
|
|
32693
32777
|
for (; i < groupLength; ++i) {
|
|
32694
|
-
if (node =
|
|
32778
|
+
if (node = group2[i]) {
|
|
32695
32779
|
exit[i] = node;
|
|
32696
32780
|
}
|
|
32697
32781
|
}
|
|
32698
32782
|
}
|
|
32699
|
-
function bindKey(parent,
|
|
32700
|
-
var i, node, nodeByKeyValue = {}, groupLength =
|
|
32783
|
+
function bindKey(parent, group2, enter, update, exit, data, key) {
|
|
32784
|
+
var i, node, nodeByKeyValue = {}, groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
|
|
32701
32785
|
for (i = 0; i < groupLength; ++i) {
|
|
32702
|
-
if (node =
|
|
32703
|
-
keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i,
|
|
32786
|
+
if (node = group2[i]) {
|
|
32787
|
+
keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group2);
|
|
32704
32788
|
if (keyValue in nodeByKeyValue) {
|
|
32705
32789
|
exit[i] = node;
|
|
32706
32790
|
} else {
|
|
@@ -32719,7 +32803,7 @@
|
|
|
32719
32803
|
}
|
|
32720
32804
|
}
|
|
32721
32805
|
for (i = 0; i < groupLength; ++i) {
|
|
32722
|
-
if ((node =
|
|
32806
|
+
if ((node = group2[i]) && nodeByKeyValue[keyValues[i]] === node) {
|
|
32723
32807
|
exit[i] = node;
|
|
32724
32808
|
}
|
|
32725
32809
|
}
|
|
@@ -32735,8 +32819,8 @@
|
|
|
32735
32819
|
var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups;
|
|
32736
32820
|
if (typeof value2 !== "function") value2 = constant$2(value2);
|
|
32737
32821
|
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
32738
|
-
var parent = parents[j],
|
|
32739
|
-
bind(parent,
|
|
32822
|
+
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);
|
|
32823
|
+
bind(parent, group2, enterGroup, updateGroup, exitGroup, data, key);
|
|
32740
32824
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
32741
32825
|
if (previous = enterGroup[i0]) {
|
|
32742
32826
|
if (i0 >= i1) i1 = i0 + 1;
|
|
@@ -32776,8 +32860,8 @@
|
|
|
32776
32860
|
}
|
|
32777
32861
|
function selection_order() {
|
|
32778
32862
|
for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
|
|
32779
|
-
for (var
|
|
32780
|
-
if (node =
|
|
32863
|
+
for (var group2 = groups[j], i = group2.length - 1, next = group2[i], node; --i >= 0; ) {
|
|
32864
|
+
if (node = group2[i]) {
|
|
32781
32865
|
if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
|
|
32782
32866
|
next = node;
|
|
32783
32867
|
}
|
|
@@ -32791,8 +32875,8 @@
|
|
|
32791
32875
|
return a2 && b ? compare(a2.__data__, b.__data__) : !a2 - !b;
|
|
32792
32876
|
}
|
|
32793
32877
|
for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
|
|
32794
|
-
for (var
|
|
32795
|
-
if (node =
|
|
32878
|
+
for (var group2 = groups[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
32879
|
+
if (node = group2[i]) {
|
|
32796
32880
|
sortgroup[i] = node;
|
|
32797
32881
|
}
|
|
32798
32882
|
}
|
|
@@ -32818,8 +32902,8 @@
|
|
|
32818
32902
|
}
|
|
32819
32903
|
function selection_node() {
|
|
32820
32904
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
32821
|
-
for (var
|
|
32822
|
-
var node =
|
|
32905
|
+
for (var group2 = groups[j], i = 0, n = group2.length; i < n; ++i) {
|
|
32906
|
+
var node = group2[i];
|
|
32823
32907
|
if (node) return node;
|
|
32824
32908
|
}
|
|
32825
32909
|
}
|
|
@@ -32837,8 +32921,8 @@
|
|
|
32837
32921
|
}
|
|
32838
32922
|
function selection_each(callback) {
|
|
32839
32923
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
32840
|
-
for (var
|
|
32841
|
-
if (node =
|
|
32924
|
+
for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
|
|
32925
|
+
if (node = group2[i]) callback.call(node, node.__data__, i, group2);
|
|
32842
32926
|
}
|
|
32843
32927
|
}
|
|
32844
32928
|
return this;
|
|
@@ -33081,8 +33165,8 @@
|
|
|
33081
33165
|
filterEvents = { mouseenter: "mouseover", mouseleave: "mouseout" };
|
|
33082
33166
|
}
|
|
33083
33167
|
}
|
|
33084
|
-
function filterContextListener(listener, index2,
|
|
33085
|
-
listener = contextListener(listener, index2,
|
|
33168
|
+
function filterContextListener(listener, index2, group2) {
|
|
33169
|
+
listener = contextListener(listener, index2, group2);
|
|
33086
33170
|
return function(event2) {
|
|
33087
33171
|
var related = event2.relatedTarget;
|
|
33088
33172
|
if (!related || related !== this && !(related.compareDocumentPosition(this) & 8)) {
|
|
@@ -33090,10 +33174,10 @@
|
|
|
33090
33174
|
}
|
|
33091
33175
|
};
|
|
33092
33176
|
}
|
|
33093
|
-
function contextListener(listener, index2,
|
|
33177
|
+
function contextListener(listener, index2, group2) {
|
|
33094
33178
|
return function(event1) {
|
|
33095
33179
|
try {
|
|
33096
|
-
listener.call(this, this.__data__, index2,
|
|
33180
|
+
listener.call(this, this.__data__, index2, group2);
|
|
33097
33181
|
} finally {
|
|
33098
33182
|
}
|
|
33099
33183
|
};
|
|
@@ -33122,8 +33206,8 @@
|
|
|
33122
33206
|
}
|
|
33123
33207
|
function onAdd(typename, value2, capture) {
|
|
33124
33208
|
var wrap2 = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;
|
|
33125
|
-
return function(d, i,
|
|
33126
|
-
var on = this.__on, o, listener = wrap2(value2, i,
|
|
33209
|
+
return function(d, i, group2) {
|
|
33210
|
+
var on = this.__on, o, listener = wrap2(value2, i, group2);
|
|
33127
33211
|
if (on) for (var j = 0, m = on.length; j < m; ++j) {
|
|
33128
33212
|
if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
33129
33213
|
this.removeEventListener(o.type, o.listener, o.capture);
|
|
@@ -33400,7 +33484,7 @@
|
|
|
33400
33484
|
var RUNNING = 4;
|
|
33401
33485
|
var ENDING = 5;
|
|
33402
33486
|
var ENDED = 6;
|
|
33403
|
-
function schedule(node, name, id2, index2,
|
|
33487
|
+
function schedule(node, name, id2, index2, group2, timing) {
|
|
33404
33488
|
var schedules = node.__transition;
|
|
33405
33489
|
if (!schedules) node.__transition = {};
|
|
33406
33490
|
else if (id2 in schedules) return;
|
|
@@ -33408,7 +33492,7 @@
|
|
|
33408
33492
|
name,
|
|
33409
33493
|
index: index2,
|
|
33410
33494
|
// For context during callback.
|
|
33411
|
-
group,
|
|
33495
|
+
group: group2,
|
|
33412
33496
|
// For context during callback.
|
|
33413
33497
|
on: emptyOn,
|
|
33414
33498
|
tween: emptyTween,
|
|
@@ -34200,8 +34284,8 @@
|
|
|
34200
34284
|
function transition_filter(match) {
|
|
34201
34285
|
if (typeof match !== "function") match = matcher(match);
|
|
34202
34286
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
34203
|
-
for (var
|
|
34204
|
-
if ((node =
|
|
34287
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
34288
|
+
if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
|
|
34205
34289
|
subgroup.push(node);
|
|
34206
34290
|
}
|
|
34207
34291
|
}
|
|
@@ -34255,8 +34339,8 @@
|
|
|
34255
34339
|
var name = this._name, id2 = this._id;
|
|
34256
34340
|
if (typeof select2 !== "function") select2 = selector(select2);
|
|
34257
34341
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
34258
|
-
for (var
|
|
34259
|
-
if ((node =
|
|
34342
|
+
for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
34343
|
+
if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
|
|
34260
34344
|
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
34261
34345
|
subgroup[i] = subnode;
|
|
34262
34346
|
schedule(subgroup[i], name, id2, i, subgroup, get(node, id2));
|
|
@@ -34269,9 +34353,9 @@
|
|
|
34269
34353
|
var name = this._name, id2 = this._id;
|
|
34270
34354
|
if (typeof select2 !== "function") select2 = selectorAll(select2);
|
|
34271
34355
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
34272
|
-
for (var
|
|
34273
|
-
if (node =
|
|
34274
|
-
for (var children2 = select2.call(node, node.__data__, i,
|
|
34356
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
34357
|
+
if (node = group2[i]) {
|
|
34358
|
+
for (var children2 = select2.call(node, node.__data__, i, group2), child, inherit2 = get(node, id2), k2 = 0, l = children2.length; k2 < l; ++k2) {
|
|
34275
34359
|
if (child = children2[k2]) {
|
|
34276
34360
|
schedule(child, name, id2, k2, children2, inherit2);
|
|
34277
34361
|
}
|
|
@@ -34387,10 +34471,10 @@
|
|
|
34387
34471
|
function transition_transition() {
|
|
34388
34472
|
var name = this._name, id0 = this._id, id1 = newId();
|
|
34389
34473
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
34390
|
-
for (var
|
|
34391
|
-
if (node =
|
|
34474
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
34475
|
+
if (node = group2[i]) {
|
|
34392
34476
|
var inherit2 = get(node, id0);
|
|
34393
|
-
schedule(node, name, id1, i,
|
|
34477
|
+
schedule(node, name, id1, i, group2, {
|
|
34394
34478
|
time: inherit2.time + inherit2.delay + inherit2.duration,
|
|
34395
34479
|
delay: 0,
|
|
34396
34480
|
duration: inherit2.duration,
|
|
@@ -34485,9 +34569,9 @@
|
|
|
34485
34569
|
id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
|
|
34486
34570
|
}
|
|
34487
34571
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
34488
|
-
for (var
|
|
34489
|
-
if (node =
|
|
34490
|
-
schedule(node, name, id2, i,
|
|
34572
|
+
for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
|
|
34573
|
+
if (node = group2[i]) {
|
|
34574
|
+
schedule(node, name, id2, i, group2, timing || inherit(node, id2));
|
|
34491
34575
|
}
|
|
34492
34576
|
}
|
|
34493
34577
|
}
|
|
@@ -35707,7 +35791,7 @@
|
|
|
35707
35791
|
break;
|
|
35708
35792
|
case TSankeyDataLabelPostion.right:
|
|
35709
35793
|
xAndYCoordinate = [1, 5];
|
|
35710
|
-
widthAndHeight = [maxNodeLabelWidth, innerHeight2];
|
|
35794
|
+
widthAndHeight = [innerWidth2 - maxNodeLabelWidth, innerHeight2];
|
|
35711
35795
|
break;
|
|
35712
35796
|
case TSankeyDataLabelPostion.left:
|
|
35713
35797
|
xAndYCoordinate = [maxNodeLabelWidth, 5];
|
|
@@ -55214,7 +55298,8 @@
|
|
|
55214
55298
|
dataTableHeight,
|
|
55215
55299
|
innerWidth2,
|
|
55216
55300
|
innerHeight2,
|
|
55217
|
-
chartType
|
|
55301
|
+
chartType,
|
|
55302
|
+
chartId
|
|
55218
55303
|
);
|
|
55219
55304
|
initScale();
|
|
55220
55305
|
initAxis();
|
|
@@ -55515,7 +55600,7 @@
|
|
|
55515
55600
|
(d) => xScale(
|
|
55516
55601
|
!isAdvancedWaterfall ? d.data.dimension || d.data.legend : d.data.xKey
|
|
55517
55602
|
)
|
|
55518
|
-
).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr(
|
|
55603
|
+
).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr("clip-path", `url(#${chartId}-clip)`).attr(
|
|
55519
55604
|
"height",
|
|
55520
55605
|
(d) => d[1] ? yScaleLeft(d[0]) - yScaleLeft(d[1]) : 0
|
|
55521
55606
|
).attr("width", xScale.bandwidth()).attr(
|
|
@@ -55574,6 +55659,7 @@
|
|
|
55574
55659
|
}
|
|
55575
55660
|
}
|
|
55576
55661
|
});
|
|
55662
|
+
gTag.selectAll(".parentGroup").raise();
|
|
55577
55663
|
};
|
|
55578
55664
|
const setSVGContainer = (margin2) => {
|
|
55579
55665
|
innerWidth2 = width - margin2.left - margin2.right;
|
|
@@ -55643,7 +55729,6 @@
|
|
|
55643
55729
|
drawColumnChart();
|
|
55644
55730
|
};
|
|
55645
55731
|
const drawColumnChart = () => {
|
|
55646
|
-
getChartType();
|
|
55647
55732
|
initXaxis$1(
|
|
55648
55733
|
gTag,
|
|
55649
55734
|
chartJSON,
|
|
@@ -55661,6 +55746,7 @@
|
|
|
55661
55746
|
chartJSON.legendList,
|
|
55662
55747
|
xScale
|
|
55663
55748
|
);
|
|
55749
|
+
getChartType();
|
|
55664
55750
|
};
|
|
55665
55751
|
const generateWaterFallData = () => {
|
|
55666
55752
|
try {
|
|
@@ -55776,7 +55862,7 @@
|
|
|
55776
55862
|
const chartId = crypto.randomUUID();
|
|
55777
55863
|
let columnWidth = 0;
|
|
55778
55864
|
const chartType = chartTypes.TornadoChart;
|
|
55779
|
-
const isAdvanceAnalyticsChart = data.IsadvanceanalyticsChart;
|
|
55865
|
+
const isAdvanceAnalyticsChart = data.IsadvanceanalyticsChart ?? data.IsCalCSensitivity;
|
|
55780
55866
|
const svgRef = require$$0$1.useRef();
|
|
55781
55867
|
let seriesData = generalizedChartData(
|
|
55782
55868
|
data.ChartData,
|
|
@@ -55916,26 +56002,8 @@
|
|
|
55916
56002
|
chartType
|
|
55917
56003
|
);
|
|
55918
56004
|
initScale();
|
|
55919
|
-
|
|
55920
|
-
|
|
55921
|
-
formatOptions,
|
|
55922
|
-
gTag,
|
|
55923
|
-
xLabel,
|
|
55924
|
-
innerHeight2,
|
|
55925
|
-
innerWidth2,
|
|
55926
|
-
yAxisLeft,
|
|
55927
|
-
yAxisRight,
|
|
55928
|
-
xScale,
|
|
55929
|
-
chartJSON.yMaxLeft,
|
|
55930
|
-
chartJSON.dimensionList,
|
|
55931
|
-
chartType,
|
|
55932
|
-
isDateType,
|
|
55933
|
-
width,
|
|
55934
|
-
dimensionHeightWidthArray,
|
|
55935
|
-
columnWidth,
|
|
55936
|
-
yScaleLeft
|
|
55937
|
-
);
|
|
55938
|
-
horizontalScrollBar2(seriesData, height, svg, margin, innerWidth2);
|
|
56005
|
+
getXAxis();
|
|
56006
|
+
initXaxisBar(formatOptions, gTag, xLabel, innerHeight2, innerWidth2, xAxis);
|
|
55939
56007
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
55940
56008
|
if (formatOptions.xAxisLabel.xAxisPosition != "1")
|
|
55941
56009
|
formatOptions.xAxisLabel.xAxisLabelVisibility = false;
|
|
@@ -56017,6 +56085,21 @@
|
|
|
56017
56085
|
chartId,
|
|
56018
56086
|
staticLegendShape.rectangle
|
|
56019
56087
|
);
|
|
56088
|
+
horizontalScrollBar2(
|
|
56089
|
+
seriesData,
|
|
56090
|
+
height,
|
|
56091
|
+
width,
|
|
56092
|
+
svg,
|
|
56093
|
+
margin,
|
|
56094
|
+
innerWidth2,
|
|
56095
|
+
scrollbarVisible,
|
|
56096
|
+
visibleBars,
|
|
56097
|
+
chartJSON,
|
|
56098
|
+
scrollPosition,
|
|
56099
|
+
false,
|
|
56100
|
+
setAndUpdateChartData,
|
|
56101
|
+
barChart
|
|
56102
|
+
);
|
|
56020
56103
|
};
|
|
56021
56104
|
const mapSeriesDataWithLegendList = (seriesData2, legendList, isAdvanceAnalyticsChart2, formatOptions2) => {
|
|
56022
56105
|
return seriesData2.map((series, index2) => {
|
|
@@ -56049,11 +56132,11 @@
|
|
|
56049
56132
|
const preProcessChartData = () => {
|
|
56050
56133
|
let processedSeriesData;
|
|
56051
56134
|
if (!isAdvanceAnalyticsChart) {
|
|
56052
|
-
const firstMeasure =
|
|
56135
|
+
const firstMeasure = seriesData[0]?.properties?.measureUniqueId;
|
|
56053
56136
|
let yMaxLeft = 0;
|
|
56054
56137
|
let yMaxRight = -Infinity;
|
|
56055
56138
|
processedSeriesData = seriesData.map((series, index2) => {
|
|
56056
|
-
const isFirstMeasure =
|
|
56139
|
+
const isFirstMeasure = series.properties.measureUniqueId === firstMeasure;
|
|
56057
56140
|
const newData = series.data.map((point2) => {
|
|
56058
56141
|
const newValue = isFirstMeasure ? -Math.abs(point2.value) : Math.abs(point2.value);
|
|
56059
56142
|
return {
|
|
@@ -56089,47 +56172,67 @@
|
|
|
56089
56172
|
!isAdvanceAnalyticsChart ? processedSeriesData : seriesData
|
|
56090
56173
|
)
|
|
56091
56174
|
);
|
|
56092
|
-
|
|
56093
|
-
|
|
56094
|
-
scrollPosition + visibleBars
|
|
56095
|
-
) : chartJSON.dimensionList;
|
|
56175
|
+
seriesData = filteredData;
|
|
56176
|
+
filteredDimension = chartJSON.dimensionList;
|
|
56096
56177
|
if (formatOptions.plotArea.hideZeroValues) {
|
|
56097
56178
|
chartJSON.hideZeroValues = true;
|
|
56098
56179
|
}
|
|
56099
56180
|
};
|
|
56100
56181
|
const initScale = () => {
|
|
56182
|
+
let min2 = chartJSON.yMaxLeft;
|
|
56183
|
+
let max2 = chartJSON.yMaxRight;
|
|
56184
|
+
let adjustedPosition = formatOptions.annotation.annotationVisibility != "5" && formatOptions.annotation.annotationPosition == "1" ? 20 : 0;
|
|
56185
|
+
let maxValue;
|
|
56101
56186
|
let right2 = false;
|
|
56102
56187
|
let left2 = false;
|
|
56103
|
-
|
|
56104
|
-
|
|
56105
|
-
maxValue = chartJSON.yMaxLeft;
|
|
56188
|
+
if (min2 > max2) {
|
|
56189
|
+
maxValue = min2;
|
|
56106
56190
|
right2 = true;
|
|
56107
56191
|
} else {
|
|
56108
|
-
maxValue =
|
|
56192
|
+
maxValue = max2;
|
|
56109
56193
|
left2 = true;
|
|
56110
56194
|
}
|
|
56111
|
-
let
|
|
56112
|
-
let
|
|
56113
|
-
|
|
56114
|
-
|
|
56115
|
-
|
|
56116
|
-
|
|
56117
|
-
|
|
56195
|
+
let scaleFactor = formatOptions.annotation.annotationVisibility != "5" ? min2 / maxValue !== 1 ? Math.abs(min2 / maxValue) * 100 < 10 ? 3 : 0 : Math.abs(max2 / maxValue) * 100 < 10 ? 3 : 0 : 0;
|
|
56196
|
+
let domainMin = 0;
|
|
56197
|
+
let domainMax = 0;
|
|
56198
|
+
if (min2 < 0 && max2 > 0) {
|
|
56199
|
+
domainMin = min2 * (1.2 + (left2 ? scaleFactor : 0));
|
|
56200
|
+
domainMax = max2 * (1.2 + (right2 ? scaleFactor : 0));
|
|
56201
|
+
} else if (min2 >= 0 && max2 >= 0) {
|
|
56202
|
+
domainMin = 0;
|
|
56203
|
+
domainMax = max2 * (1.2 + (right2 ? scaleFactor : 0));
|
|
56204
|
+
} else if (min2 <= 0 && max2 <= 0) {
|
|
56205
|
+
domainMin = min2 * (1.2 + (left2 ? scaleFactor : 0));
|
|
56206
|
+
domainMax = 0;
|
|
56207
|
+
} else {
|
|
56208
|
+
domainMin = min2 * 1.2;
|
|
56209
|
+
domainMax = max2 * 1.2;
|
|
56210
|
+
}
|
|
56211
|
+
domainMin = Math.floor(domainMin);
|
|
56212
|
+
domainMax = Math.ceil(domainMax);
|
|
56213
|
+
xScaleForLegends = linear$1().domain([domainMin, domainMax]).range([adjustedPosition, innerWidth2 - adjustedPosition]);
|
|
56118
56214
|
xScale = xScaleForLegends;
|
|
56119
56215
|
calculatedRange = [0, innerWidth2];
|
|
56120
56216
|
getXScale();
|
|
56121
56217
|
};
|
|
56122
56218
|
const getXScale = () => {
|
|
56123
|
-
yScaleLeft = point$7().domain(
|
|
56219
|
+
yScaleLeft = point$7().domain(filteredDimension).range([innerHeight2, 0]).padding(0.5);
|
|
56124
56220
|
};
|
|
56125
56221
|
const initAxis = () => {
|
|
56126
|
-
getXAxis();
|
|
56127
56222
|
yAxisLeft = axisLeft(yScaleLeft).tickSize(
|
|
56128
|
-
|
|
56129
|
-
|
|
56223
|
+
getHorizontalGridLinesTickSize(
|
|
56224
|
+
formatOptions,
|
|
56225
|
+
innerWidth2 - xScaleForLegends(0),
|
|
56226
|
+
0
|
|
56227
|
+
)
|
|
56228
|
+
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerHeight2));
|
|
56130
56229
|
yAxisRight = axisRight(yScaleLeft).tickSize(
|
|
56131
|
-
|
|
56132
|
-
|
|
56230
|
+
getHorizontalGridLinesTickSize(
|
|
56231
|
+
formatOptions,
|
|
56232
|
+
xScaleForLegends(0),
|
|
56233
|
+
0
|
|
56234
|
+
)
|
|
56235
|
+
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
56133
56236
|
};
|
|
56134
56237
|
const getXAxis = () => {
|
|
56135
56238
|
xAxis = axisBottom(xScaleForLegends).tickFormat(
|
|
@@ -56201,7 +56304,7 @@
|
|
|
56201
56304
|
[
|
|
56202
56305
|
{
|
|
56203
56306
|
key: "Measure",
|
|
56204
|
-
value: formatOptions.yAxisTitle.yAxisTitleHTML !== "" ? new DOMParser().parseFromString(formatOptions.yAxisTitle.yAxisTitleHTML, "text/html").body.textContent?.trim() : d.dimension
|
|
56307
|
+
value: formatOptions.yAxisTitle.yAxisTitleHTML !== "" ? new DOMParser().parseFromString(formatOptions.yAxisTitle.yAxisTitleHTML, "text/html").body.textContent?.trim() : !data.IsCalCSensitivity ? d.dimension : d.properties.currentMeasure.split("~$~")[1]
|
|
56205
56308
|
},
|
|
56206
56309
|
{ key: "Legend", value: d.legendText },
|
|
56207
56310
|
{
|
|
@@ -56217,7 +56320,7 @@
|
|
|
56217
56320
|
],
|
|
56218
56321
|
formatOptions,
|
|
56219
56322
|
event2,
|
|
56220
|
-
d.properties
|
|
56323
|
+
!data.IsCalCSensitivity ? d.properties : d.properties.legend === "Calculated Low(-ve)" ? { markerColor: formatOptions.plotArea.plotAreaCalculatedLow } : { markerColor: formatOptions.plotArea.plotAreaCalculatedHigh }
|
|
56221
56324
|
);
|
|
56222
56325
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
56223
56326
|
};
|
|
@@ -56225,74 +56328,152 @@
|
|
|
56225
56328
|
innerWidth2 = width - margin2.left - margin2.right;
|
|
56226
56329
|
innerHeight2 = height - margin2.bottom - margin2.top;
|
|
56227
56330
|
};
|
|
56228
|
-
const
|
|
56229
|
-
|
|
56230
|
-
|
|
56231
|
-
|
|
56232
|
-
|
|
56233
|
-
|
|
56234
|
-
|
|
56235
|
-
|
|
56236
|
-
|
|
56237
|
-
|
|
56238
|
-
|
|
56239
|
-
|
|
56240
|
-
|
|
56241
|
-
)
|
|
56242
|
-
|
|
56243
|
-
|
|
56244
|
-
|
|
56245
|
-
|
|
56246
|
-
|
|
56331
|
+
const setAndUpdateChartData = (fDimension, fData, fVisibleBars) => {
|
|
56332
|
+
filteredData = fData;
|
|
56333
|
+
filteredDimension = fDimension;
|
|
56334
|
+
visibleBars = fVisibleBars;
|
|
56335
|
+
drawColumnChart();
|
|
56336
|
+
};
|
|
56337
|
+
function createDataForAnnotation(chartData) {
|
|
56338
|
+
const legendUniqueIdToLegendMap = /* @__PURE__ */ new Map();
|
|
56339
|
+
chartData.forEach((d) => {
|
|
56340
|
+
let obj = legendUniqueIdToLegendMap.get(d.properties.legendUniqueId);
|
|
56341
|
+
if (obj) {
|
|
56342
|
+
let array2 = obj.data ?? [];
|
|
56343
|
+
array2.push(d.data[0]);
|
|
56344
|
+
legendUniqueIdToLegendMap.set(d.properties.legendUniqueId, { ...obj, data: array2 });
|
|
56345
|
+
} else {
|
|
56346
|
+
obj = {
|
|
56347
|
+
...d,
|
|
56348
|
+
data: [d.data[0]]
|
|
56349
|
+
};
|
|
56350
|
+
legendUniqueIdToLegendMap.set(d.properties.legendUniqueId, obj);
|
|
56351
|
+
}
|
|
56352
|
+
});
|
|
56353
|
+
return legendUniqueIdToLegendMap.size > 0 ? Array.from(legendUniqueIdToLegendMap.keys()).map((d) => legendUniqueIdToLegendMap.get(d)) : chartData;
|
|
56354
|
+
}
|
|
56355
|
+
function horizontalScrollBar2(seriesData2, height2, width2, svg2, margin2, innerWidth22, scrollbarVisible2, visibleBars2, chartJSON2, scrollPosition2, isStackedChart, setAndUpdateChartData2, isBarChart = false) {
|
|
56356
|
+
const updateFromScrollPosition = (pos, scrollMax, handleWidth, handle, mouseEvent) => {
|
|
56357
|
+
try {
|
|
56358
|
+
mouseEvent && (pos = scrollPosition2 + pos);
|
|
56359
|
+
if (!chartJSON2 || !Array.isArray(chartJSON2.dimensionList) || !Array.isArray(seriesData2))
|
|
56360
|
+
return;
|
|
56361
|
+
pos = pos == null ? 0 : Number(pos);
|
|
56362
|
+
scrollMax = scrollMax == null ? 0 : Number(scrollMax);
|
|
56363
|
+
handleWidth = handleWidth == null ? 0 : Number(handleWidth);
|
|
56364
|
+
scrollPosition2 = clamp(Math.round(pos), 0, Math.max(0, scrollMax));
|
|
56365
|
+
visibleBars2 = typeof visibleBars2 === "number" ? visibleBars2 : 0;
|
|
56366
|
+
const start2 = scrollPosition2;
|
|
56367
|
+
const end = start2 + visibleBars2;
|
|
56368
|
+
let filteredDimension2 = chartJSON2.dimensionList.slice(start2, end);
|
|
56369
|
+
const isDefaultEntry = filteredDimension2[0] == chartTypes.TornadoDefaultEntry;
|
|
56370
|
+
let filteredData2 = JSON.parse(JSON.stringify(seriesData2 || []));
|
|
56371
|
+
filteredData2 = filteredData2.filter((d) => isDefaultEntry ? true : filteredDimension2.includes(d.legend.split(" - ")[1]));
|
|
56372
|
+
const safeMarginLeft = margin2?.left ?? 0;
|
|
56373
|
+
const safeMarginTop = margin2?.top ?? 0;
|
|
56374
|
+
const safeInnerWidth = Number(innerWidth22) || 0;
|
|
56375
|
+
const safeInnerHeight = Number(innerHeight2) || 0;
|
|
56376
|
+
const safeHandleSize = Number(handleWidth) || 0;
|
|
56377
|
+
const denom = scrollMax === 0 ? 1 : scrollMax;
|
|
56378
|
+
if (isBarChart) {
|
|
56379
|
+
const y2 = safeMarginTop + (safeInnerHeight - safeHandleSize) * (scrollMax === 0 ? 0 : scrollPosition2) / denom;
|
|
56380
|
+
if (handle && typeof handle.attr === "function") {
|
|
56381
|
+
handle.attr("y", y2);
|
|
56382
|
+
}
|
|
56383
|
+
} else {
|
|
56384
|
+
const x2 = safeMarginLeft + (safeInnerWidth - safeHandleSize) * (scrollMax === 0 ? 0 : scrollPosition2) / denom;
|
|
56385
|
+
if (handle && typeof handle.attr === "function") {
|
|
56386
|
+
handle.attr("x", x2);
|
|
56387
|
+
}
|
|
56388
|
+
}
|
|
56389
|
+
setAndUpdateChartData2(filteredDimension2, filteredData2, visibleBars2);
|
|
56390
|
+
} catch (error) {
|
|
56391
|
+
if (typeof logError$2 === "function")
|
|
56392
|
+
logError$2("ColumnChart", "updateFromScrollPosition", error);
|
|
56393
|
+
}
|
|
56394
|
+
};
|
|
56395
|
+
if (scrollbarVisible2) {
|
|
56396
|
+
const innerHeight22 = height2 - margin2.top - margin2.bottom;
|
|
56397
|
+
const scrollMax = Math.max(0, dimensionList.length - visibleBars2);
|
|
56398
|
+
const scrollbarY = height2 - 8;
|
|
56399
|
+
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");
|
|
56400
|
+
const handleWidth = (isBarChart ? innerHeight22 : innerWidth22) * visibleBars2 / chartJSON2.dimensionList.length;
|
|
56401
|
+
const handle = svg2.append("rect").attr(
|
|
56402
|
+
"x",
|
|
56403
|
+
isBarChart ? width2 - 8 : margin2.left
|
|
56404
|
+
).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");
|
|
56405
|
+
handle.call(
|
|
56247
56406
|
drag$1().on("drag", (event2) => {
|
|
56248
|
-
|
|
56249
|
-
|
|
56250
|
-
|
|
56251
|
-
|
|
56252
|
-
|
|
56253
|
-
|
|
56254
|
-
(
|
|
56255
|
-
|
|
56256
|
-
|
|
56257
|
-
|
|
56258
|
-
|
|
56259
|
-
|
|
56260
|
-
|
|
56261
|
-
|
|
56262
|
-
|
|
56263
|
-
(
|
|
56264
|
-
|
|
56265
|
-
)
|
|
56266
|
-
|
|
56267
|
-
getXAxis();
|
|
56268
|
-
drawColumnChart();
|
|
56407
|
+
if (isBarChart) {
|
|
56408
|
+
const y2 = clamp(
|
|
56409
|
+
event2.y,
|
|
56410
|
+
margin2.top,
|
|
56411
|
+
margin2.top + innerHeight22 - handleWidth
|
|
56412
|
+
);
|
|
56413
|
+
const pos = (y2 - margin2.top) / (innerHeight22 - handleWidth) * (scrollMax || 1);
|
|
56414
|
+
updateFromScrollPosition(pos, scrollMax, handleWidth, handle, false);
|
|
56415
|
+
handle.attr("y", margin2.top + (innerHeight22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax));
|
|
56416
|
+
} else {
|
|
56417
|
+
const x2 = clamp(
|
|
56418
|
+
event2.x,
|
|
56419
|
+
margin2.left,
|
|
56420
|
+
margin2.left + innerWidth22 - handleWidth
|
|
56421
|
+
);
|
|
56422
|
+
const pos = (x2 - margin2.left) / (innerWidth22 - handleWidth) * (scrollMax || 1);
|
|
56423
|
+
updateFromScrollPosition(pos, scrollMax, handleWidth, handle, false);
|
|
56424
|
+
handle.attr("x", margin2.left + (innerWidth22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax));
|
|
56425
|
+
}
|
|
56269
56426
|
})
|
|
56270
56427
|
);
|
|
56271
56428
|
svg2.on("wheel", (event2) => {
|
|
56272
56429
|
event2.preventDefault();
|
|
56273
56430
|
const scrollDelta = Math.abs(event2.deltaX) > Math.abs(event2.deltaY) ? event2.deltaX : event2.deltaY;
|
|
56274
|
-
|
|
56275
|
-
|
|
56276
|
-
|
|
56277
|
-
|
|
56278
|
-
|
|
56279
|
-
|
|
56280
|
-
|
|
56281
|
-
(
|
|
56282
|
-
|
|
56283
|
-
)
|
|
56284
|
-
);
|
|
56285
|
-
getXAxis();
|
|
56286
|
-
drawColumnChart();
|
|
56431
|
+
const step2 = scrollDelta > 0 ? 1 : -1;
|
|
56432
|
+
updateFromScrollPosition(step2, scrollMax, handleWidth, handle, true);
|
|
56433
|
+
if (isBarChart) {
|
|
56434
|
+
const y2 = margin2.top + (innerHeight22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax);
|
|
56435
|
+
handle.attr("y", y2);
|
|
56436
|
+
} else {
|
|
56437
|
+
const x2 = margin2.left + (innerWidth22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax);
|
|
56438
|
+
handle.attr("x", x2);
|
|
56439
|
+
}
|
|
56287
56440
|
});
|
|
56441
|
+
} else {
|
|
56442
|
+
svg2.on("wheel", null);
|
|
56288
56443
|
}
|
|
56289
|
-
|
|
56290
|
-
|
|
56444
|
+
updateFromScrollPosition(
|
|
56445
|
+
0,
|
|
56446
|
+
0,
|
|
56447
|
+
0,
|
|
56448
|
+
null,
|
|
56449
|
+
true
|
|
56450
|
+
);
|
|
56451
|
+
}
|
|
56291
56452
|
const drawColumnChart = () => {
|
|
56292
|
-
|
|
56453
|
+
getXScale();
|
|
56454
|
+
initAxis();
|
|
56455
|
+
initYaxisBar(
|
|
56456
|
+
formatOptions,
|
|
56457
|
+
gTag,
|
|
56458
|
+
xLabel,
|
|
56459
|
+
innerHeight2,
|
|
56460
|
+
innerWidth2,
|
|
56461
|
+
yAxisLeft,
|
|
56462
|
+
yAxisRight,
|
|
56463
|
+
xScale,
|
|
56464
|
+
chartJSON.yMaxLeft,
|
|
56465
|
+
filteredDimension,
|
|
56466
|
+
chartType,
|
|
56467
|
+
isDateType,
|
|
56468
|
+
width,
|
|
56469
|
+
dimensionHeightWidthArray,
|
|
56470
|
+
columnWidth,
|
|
56471
|
+
yScaleLeft
|
|
56472
|
+
);
|
|
56293
56473
|
getChartType();
|
|
56474
|
+
const dataForAnnotation = createDataForAnnotation(filteredData);
|
|
56294
56475
|
commonAnnotations(
|
|
56295
|
-
|
|
56476
|
+
dataForAnnotation ?? [],
|
|
56296
56477
|
yScaleLeft,
|
|
56297
56478
|
xScale,
|
|
56298
56479
|
null,
|
|
@@ -56332,7 +56513,7 @@
|
|
|
56332
56513
|
}
|
|
56333
56514
|
) });
|
|
56334
56515
|
};
|
|
56335
|
-
const
|
|
56516
|
+
const DotPlot = ({
|
|
56336
56517
|
isDateType,
|
|
56337
56518
|
formatOptions,
|
|
56338
56519
|
data,
|
|
@@ -56341,7 +56522,7 @@
|
|
|
56341
56522
|
}) => {
|
|
56342
56523
|
const chartId = crypto.randomUUID();
|
|
56343
56524
|
let columnWidth = 0;
|
|
56344
|
-
const chartType = chartTypes.
|
|
56525
|
+
const chartType = chartTypes.DotPlot;
|
|
56345
56526
|
const svgRef = require$$0$1.useRef();
|
|
56346
56527
|
const seriesData = generalizedChartData(
|
|
56347
56528
|
data.ChartData,
|
|
@@ -56398,16 +56579,16 @@
|
|
|
56398
56579
|
};
|
|
56399
56580
|
require$$0$1.useEffect(() => {
|
|
56400
56581
|
try {
|
|
56401
|
-
|
|
56582
|
+
createDotPlot();
|
|
56402
56583
|
} catch (error) {
|
|
56403
56584
|
logError$2(
|
|
56404
56585
|
"StackStackHorizontalBarchart",
|
|
56405
|
-
"
|
|
56586
|
+
"createDotPlot",
|
|
56406
56587
|
error
|
|
56407
56588
|
);
|
|
56408
56589
|
}
|
|
56409
56590
|
}, [formatOptions]);
|
|
56410
|
-
const
|
|
56591
|
+
const createDotPlot = () => {
|
|
56411
56592
|
({ formatOptions, svg, width, height } = firstFunctionBeforeRender$1(
|
|
56412
56593
|
svgRef,
|
|
56413
56594
|
formatOptions
|
|
@@ -56635,32 +56816,66 @@
|
|
|
56635
56816
|
};
|
|
56636
56817
|
const getChartType = (lineData) => {
|
|
56637
56818
|
lineData.forEach((lData) => {
|
|
56638
|
-
lData.data.forEach((
|
|
56639
|
-
|
|
56640
|
-
|
|
56641
|
-
|
|
56819
|
+
lData.data.forEach((d) => {
|
|
56820
|
+
d.markerShape = lData.properties.markerShape || "Circle";
|
|
56821
|
+
d.markerSize = lData.properties.markerSize || 6;
|
|
56822
|
+
d.markerColor = lData.properties.markerColor || lData.properties.color;
|
|
56823
|
+
d.alias = lData.properties.alias;
|
|
56824
|
+
d.lineStyle = lData.properties.lineStyle;
|
|
56825
|
+
d.lineWidth = lData.properties.lineWidth;
|
|
56826
|
+
d.lineColor = formatOptions.plotArea.dotPlotLineColor ?? "#c7c7c7";
|
|
56642
56827
|
});
|
|
56643
56828
|
});
|
|
56644
|
-
|
|
56829
|
+
const groupedData = group(
|
|
56830
|
+
lineData.flatMap(
|
|
56831
|
+
(l) => l.data.map((d) => ({
|
|
56832
|
+
...d,
|
|
56833
|
+
color: l.properties.color
|
|
56834
|
+
}))
|
|
56835
|
+
),
|
|
56836
|
+
(d) => d.dimension
|
|
56837
|
+
);
|
|
56838
|
+
const lineGroups = gTag.selectAll(".cleveland-line-group").data(Array.from(groupedData), ([d]) => d);
|
|
56839
|
+
const lineEnter = lineGroups.enter().append("g").attr("class", "cleveland-line-group");
|
|
56840
|
+
lineEnter.append("line").merge(lineGroups.select("line")).attr("y1", ([dim]) => yScale(dim)).attr("y2", ([dim]) => yScale(dim)).attr(
|
|
56841
|
+
"x1",
|
|
56842
|
+
([, v]) => xScaleBottom(Math.min(v[0]?.value ?? 0, v[1]?.value ?? 0))
|
|
56843
|
+
).attr(
|
|
56844
|
+
"x2",
|
|
56845
|
+
([, v]) => xScaleBottom(Math.max(v[0]?.value ?? 0, v[1]?.value ?? 0))
|
|
56846
|
+
).attr("stroke", (d) => d[1][0].lineColor).attr("stroke-width", (d) => d[1][0].lineStyle !== "None" ? d[1][0].lineWidth : 0).attr("stroke-dasharray", (d) => {
|
|
56847
|
+
switch (d[1][0].lineStyle) {
|
|
56848
|
+
case staticLineStyle.dotted:
|
|
56849
|
+
return "1,4";
|
|
56850
|
+
case staticLineStyle.dashed:
|
|
56851
|
+
return strokeDashValues;
|
|
56852
|
+
default:
|
|
56853
|
+
return "";
|
|
56854
|
+
}
|
|
56855
|
+
}).attr(
|
|
56856
|
+
"stroke-linecap",
|
|
56857
|
+
(d) => d[1][0].lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
56858
|
+
);
|
|
56859
|
+
lineGroups.exit().remove();
|
|
56860
|
+
lineData.forEach((data2) => {
|
|
56645
56861
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.properties.legendUniqueId);
|
|
56646
|
-
column = column.enter().append("g").attr("class",
|
|
56647
|
-
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.dimension);
|
|
56648
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
56862
|
+
column = column.enter().append("g").attr("class", "parentGroup").attr(
|
|
56649
56863
|
"hoverId",
|
|
56650
|
-
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
56651
|
-
|
|
56652
|
-
|
|
56653
|
-
|
|
56654
|
-
).attr(
|
|
56655
|
-
"
|
|
56656
|
-
(d) =>
|
|
56657
|
-
)
|
|
56658
|
-
|
|
56659
|
-
|
|
56660
|
-
|
|
56661
|
-
)
|
|
56662
|
-
|
|
56663
|
-
|
|
56864
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")
|
|
56865
|
+
).merge(column);
|
|
56866
|
+
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.dimension);
|
|
56867
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group");
|
|
56868
|
+
columnGroupsEnter.append("path").attr("class", "cleveland-dot").merge(columnGroups.select("path")).attr(
|
|
56869
|
+
"d",
|
|
56870
|
+
(d) => Symbol$1().type(Markershapes(d.markerShape)).size((d.markerSize || 6) * 70)()
|
|
56871
|
+
).attr("transform", (d) => {
|
|
56872
|
+
const x2 = xScaleBottom(d.value);
|
|
56873
|
+
const y2 = yScale(d.dimension);
|
|
56874
|
+
return `translate(${x2},${y2})`;
|
|
56875
|
+
}).attr("fill", (d) => data2.properties.color).attr("opacity", 0.9).attr(
|
|
56876
|
+
"visibility",
|
|
56877
|
+
() => formatOptions.marker?.markerVisibility ? "visible" : "hidden"
|
|
56878
|
+
).on("mousemove", (event2, d) => {
|
|
56664
56879
|
showTooltipOnMouseMove(
|
|
56665
56880
|
[
|
|
56666
56881
|
{
|
|
@@ -56678,18 +56893,16 @@
|
|
|
56678
56893
|
},
|
|
56679
56894
|
{
|
|
56680
56895
|
key: "Legend",
|
|
56681
|
-
value: d.
|
|
56896
|
+
value: d.alias
|
|
56682
56897
|
}
|
|
56683
56898
|
],
|
|
56684
56899
|
formatOptions,
|
|
56685
56900
|
event2,
|
|
56686
56901
|
data2.properties
|
|
56687
56902
|
);
|
|
56688
|
-
let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
|
|
56689
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
56690
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
56691
56903
|
}).on("mouseout", () => {
|
|
56692
56904
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
56905
|
+
selectAll(".halo").remove();
|
|
56693
56906
|
hideTooltipOnMouseOut();
|
|
56694
56907
|
});
|
|
56695
56908
|
columnGroups.exit().remove();
|
|
@@ -56704,9 +56917,9 @@
|
|
|
56704
56917
|
filteredData = fData;
|
|
56705
56918
|
filteredDimension = fDimension;
|
|
56706
56919
|
visibleBars = fVisibleBars;
|
|
56707
|
-
|
|
56920
|
+
drawDotPlot();
|
|
56708
56921
|
};
|
|
56709
|
-
const
|
|
56922
|
+
const drawDotPlot = () => {
|
|
56710
56923
|
getYScale();
|
|
56711
56924
|
getYAxis();
|
|
56712
56925
|
initYaxisBar(
|
|
@@ -56754,8 +56967,8 @@
|
|
|
56754
56967
|
onDataLabelCoordinatesChange,
|
|
56755
56968
|
yScale,
|
|
56756
56969
|
columnWidth,
|
|
56757
|
-
false,
|
|
56758
56970
|
isReportEditable,
|
|
56971
|
+
false,
|
|
56759
56972
|
barChart
|
|
56760
56973
|
);
|
|
56761
56974
|
getConnectors();
|
|
@@ -56992,11 +57205,11 @@
|
|
|
56992
57205
|
};
|
|
56993
57206
|
exports2.AreaChart = AreaChart;
|
|
56994
57207
|
exports2.BubbleChart = BubbleChart;
|
|
56995
|
-
exports2.ClevelandDotPlot = ClevelandDotPlot;
|
|
56996
57208
|
exports2.ColumnChart = ColumnChart;
|
|
56997
57209
|
exports2.ColumnHistogramChart = ColumnHistogramChart;
|
|
56998
57210
|
exports2.CustomColumnChart = CustomColumnChart;
|
|
56999
57211
|
exports2.DonutChart = DonutChart;
|
|
57212
|
+
exports2.DotPlot = DotPlot;
|
|
57000
57213
|
exports2.HorizontalBarChart = HorizontalBarChart;
|
|
57001
57214
|
exports2.HorizontalHistogramChart = HorizontalHistogramChart;
|
|
57002
57215
|
exports2.LayeredColumnChart = LayeredColumnChart;
|