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.
@@ -559,6 +559,27 @@ function keyof(value2) {
559
559
  function identity$8(x2) {
560
560
  return x2;
561
561
  }
562
+ function group(values, ...keys) {
563
+ return nest(values, identity$8, identity$8, keys);
564
+ }
565
+ function nest(values, map2, reduce, keys) {
566
+ return (function regroup(values2, i) {
567
+ if (i >= keys.length) return reduce(values2);
568
+ const groups = new InternMap();
569
+ const keyof2 = keys[i++];
570
+ let index2 = -1;
571
+ for (const value2 of values2) {
572
+ const key = keyof2(value2, ++index2, values2);
573
+ const group2 = groups.get(key);
574
+ if (group2) group2.push(value2);
575
+ else groups.set(key, [value2]);
576
+ }
577
+ for (const [key, values3] of groups) {
578
+ groups.set(key, regroup(values3, i));
579
+ }
580
+ return map2(groups);
581
+ })(values, 0);
582
+ }
562
583
  function compareDefined(compare = ascending$3) {
563
584
  if (compare === ascending$3) return ascendingDefined;
564
585
  if (typeof compare !== "function") throw new TypeError("compare is not a function");
@@ -1057,8 +1078,8 @@ function selector$2(selector2) {
1057
1078
  function selection_select$2(select2) {
1058
1079
  if (typeof select2 !== "function") select2 = selector$2(select2);
1059
1080
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
1060
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
1061
- if ((node = group[i]) && (subnode = select2.call(node, node.__data__, i, group))) {
1081
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
1082
+ if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
1062
1083
  if ("__data__" in node) subnode.__data__ = node.__data__;
1063
1084
  subgroup[i] = subnode;
1064
1085
  }
@@ -1086,9 +1107,9 @@ function selection_selectAll$2(select2) {
1086
1107
  if (typeof select2 === "function") select2 = arrayAll(select2);
1087
1108
  else select2 = selectorAll$2(select2);
1088
1109
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
1089
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
1090
- if (node = group[i]) {
1091
- subgroups.push(select2.call(node, node.__data__, i, group));
1110
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
1111
+ if (node = group2[i]) {
1112
+ subgroups.push(select2.call(node, node.__data__, i, group2));
1092
1113
  parents.push(node);
1093
1114
  }
1094
1115
  }
@@ -1132,8 +1153,8 @@ function selection_selectChildren(match) {
1132
1153
  function selection_filter$2(match) {
1133
1154
  if (typeof match !== "function") match = matcher$2(match);
1134
1155
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
1135
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
1136
- if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
1156
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
1157
+ if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
1137
1158
  subgroup.push(node);
1138
1159
  }
1139
1160
  }
@@ -1173,10 +1194,10 @@ function constant$b(x2) {
1173
1194
  return x2;
1174
1195
  };
1175
1196
  }
1176
- function bindIndex$2(parent, group, enter, update, exit, data) {
1177
- var i = 0, node, groupLength = group.length, dataLength = data.length;
1197
+ function bindIndex$2(parent, group2, enter, update, exit, data) {
1198
+ var i = 0, node, groupLength = group2.length, dataLength = data.length;
1178
1199
  for (; i < dataLength; ++i) {
1179
- if (node = group[i]) {
1200
+ if (node = group2[i]) {
1180
1201
  node.__data__ = data[i];
1181
1202
  update[i] = node;
1182
1203
  } else {
@@ -1184,16 +1205,16 @@ function bindIndex$2(parent, group, enter, update, exit, data) {
1184
1205
  }
1185
1206
  }
1186
1207
  for (; i < groupLength; ++i) {
1187
- if (node = group[i]) {
1208
+ if (node = group2[i]) {
1188
1209
  exit[i] = node;
1189
1210
  }
1190
1211
  }
1191
1212
  }
1192
- function bindKey$2(parent, group, enter, update, exit, data, key) {
1193
- var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
1213
+ function bindKey$2(parent, group2, enter, update, exit, data, key) {
1214
+ var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
1194
1215
  for (i = 0; i < groupLength; ++i) {
1195
- if (node = group[i]) {
1196
- keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
1216
+ if (node = group2[i]) {
1217
+ keyValues[i] = keyValue = key.call(node, node.__data__, i, group2) + "";
1197
1218
  if (nodeByKeyValue.has(keyValue)) {
1198
1219
  exit[i] = node;
1199
1220
  } else {
@@ -1212,7 +1233,7 @@ function bindKey$2(parent, group, enter, update, exit, data, key) {
1212
1233
  }
1213
1234
  }
1214
1235
  for (i = 0; i < groupLength; ++i) {
1215
- if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
1236
+ if ((node = group2[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
1216
1237
  exit[i] = node;
1217
1238
  }
1218
1239
  }
@@ -1225,8 +1246,8 @@ function selection_data$2(value2, key) {
1225
1246
  var bind = key ? bindKey$2 : bindIndex$2, parents = this._parents, groups = this._groups;
1226
1247
  if (typeof value2 !== "function") value2 = constant$b(value2);
1227
1248
  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
1228
- var parent = parents[j], group = groups[j], groupLength = group.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);
1229
- bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
1249
+ 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);
1250
+ bind(parent, group2, enterGroup, updateGroup, exitGroup, data, key);
1230
1251
  for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
1231
1252
  if (previous = enterGroup[i0]) {
1232
1253
  if (i0 >= i1) i1 = i0 + 1;
@@ -1278,8 +1299,8 @@ function selection_merge$2(context) {
1278
1299
  }
1279
1300
  function selection_order$2() {
1280
1301
  for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
1281
- for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
1282
- if (node = group[i]) {
1302
+ for (var group2 = groups[j], i = group2.length - 1, next = group2[i], node; --i >= 0; ) {
1303
+ if (node = group2[i]) {
1283
1304
  if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
1284
1305
  next = node;
1285
1306
  }
@@ -1293,8 +1314,8 @@ function selection_sort$2(compare) {
1293
1314
  return a2 && b ? compare(a2.__data__, b.__data__) : !a2 - !b;
1294
1315
  }
1295
1316
  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
1296
- for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
1297
- if (node = group[i]) {
1317
+ for (var group2 = groups[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
1318
+ if (node = group2[i]) {
1298
1319
  sortgroup[i] = node;
1299
1320
  }
1300
1321
  }
@@ -1316,8 +1337,8 @@ function selection_nodes$2() {
1316
1337
  }
1317
1338
  function selection_node$2() {
1318
1339
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
1319
- for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
1320
- var node = group[i];
1340
+ for (var group2 = groups[j], i = 0, n = group2.length; i < n; ++i) {
1341
+ var node = group2[i];
1321
1342
  if (node) return node;
1322
1343
  }
1323
1344
  }
@@ -1333,8 +1354,8 @@ function selection_empty$2() {
1333
1354
  }
1334
1355
  function selection_each$2(callback) {
1335
1356
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
1336
- for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
1337
- if (node = group[i]) callback.call(node, node.__data__, i, group);
1357
+ for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
1358
+ if (node = group2[i]) callback.call(node, node.__data__, i, group2);
1338
1359
  }
1339
1360
  }
1340
1361
  return this;
@@ -1657,8 +1678,8 @@ function selection_dispatch$2(type, params) {
1657
1678
  }
1658
1679
  function* selection_iterator() {
1659
1680
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
1660
- for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
1661
- if (node = group[i]) yield node;
1681
+ for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
1682
+ if (node = group2[i]) yield node;
1662
1683
  }
1663
1684
  }
1664
1685
  }
@@ -2751,7 +2772,7 @@ var STARTED$1 = 3;
2751
2772
  var RUNNING$1 = 4;
2752
2773
  var ENDING$1 = 5;
2753
2774
  var ENDED$1 = 6;
2754
- function schedule$1(node, name, id2, index2, group, timing) {
2775
+ function schedule$1(node, name, id2, index2, group2, timing) {
2755
2776
  var schedules = node.__transition;
2756
2777
  if (!schedules) node.__transition = {};
2757
2778
  else if (id2 in schedules) return;
@@ -2759,7 +2780,7 @@ function schedule$1(node, name, id2, index2, group, timing) {
2759
2780
  name,
2760
2781
  index: index2,
2761
2782
  // For context during callback.
2762
- group,
2783
+ group: group2,
2763
2784
  // For context during callback.
2764
2785
  on: emptyOn$1,
2765
2786
  tween: emptyTween$1,
@@ -3074,8 +3095,8 @@ function transition_easeVarying(value2) {
3074
3095
  function transition_filter$1(match) {
3075
3096
  if (typeof match !== "function") match = matcher$2(match);
3076
3097
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
3077
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
3078
- if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
3098
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
3099
+ if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
3079
3100
  subgroup.push(node);
3080
3101
  }
3081
3102
  }
@@ -3129,8 +3150,8 @@ function transition_select$1(select2) {
3129
3150
  var name = this._name, id2 = this._id;
3130
3151
  if (typeof select2 !== "function") select2 = selector$2(select2);
3131
3152
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
3132
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
3133
- if ((node = group[i]) && (subnode = select2.call(node, node.__data__, i, group))) {
3153
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
3154
+ if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
3134
3155
  if ("__data__" in node) subnode.__data__ = node.__data__;
3135
3156
  subgroup[i] = subnode;
3136
3157
  schedule$1(subgroup[i], name, id2, i, subgroup, get$5(node, id2));
@@ -3143,9 +3164,9 @@ function transition_selectAll$1(select2) {
3143
3164
  var name = this._name, id2 = this._id;
3144
3165
  if (typeof select2 !== "function") select2 = selectorAll$2(select2);
3145
3166
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
3146
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3147
- if (node = group[i]) {
3148
- for (var children2 = select2.call(node, node.__data__, i, group), child, inherit2 = get$5(node, id2), k2 = 0, l = children2.length; k2 < l; ++k2) {
3167
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
3168
+ if (node = group2[i]) {
3169
+ for (var children2 = select2.call(node, node.__data__, i, group2), child, inherit2 = get$5(node, id2), k2 = 0, l = children2.length; k2 < l; ++k2) {
3149
3170
  if (child = children2[k2]) {
3150
3171
  schedule$1(child, name, id2, k2, children2, inherit2);
3151
3172
  }
@@ -3261,10 +3282,10 @@ function transition_textTween$1(value2) {
3261
3282
  function transition_transition$1() {
3262
3283
  var name = this._name, id0 = this._id, id1 = newId$1();
3263
3284
  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
3264
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3265
- if (node = group[i]) {
3285
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
3286
+ if (node = group2[i]) {
3266
3287
  var inherit2 = get$5(node, id0);
3267
- schedule$1(node, name, id1, i, group, {
3288
+ schedule$1(node, name, id1, i, group2, {
3268
3289
  time: inherit2.time + inherit2.delay + inherit2.duration,
3269
3290
  delay: 0,
3270
3291
  duration: inherit2.duration,
@@ -3407,9 +3428,9 @@ function selection_transition$1(name) {
3407
3428
  id2 = newId$1(), (timing = defaultTiming$1).time = now$1(), name = name == null ? null : name + "";
3408
3429
  }
3409
3430
  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
3410
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3411
- if (node = group[i]) {
3412
- schedule$1(node, name, id2, i, group, timing || inherit$1(node, id2));
3431
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
3432
+ if (node = group2[i]) {
3433
+ schedule$1(node, name, id2, i, group2, timing || inherit$1(node, id2));
3413
3434
  }
3414
3435
  }
3415
3436
  }
@@ -3619,7 +3640,7 @@ function identity$5(x2) {
3619
3640
  }
3620
3641
  var map = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
3621
3642
  function formatLocale(locale2) {
3622
- var group = 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 + "";
3643
+ 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 + "";
3623
3644
  function newFormat(specifier) {
3624
3645
  specifier = formatSpecifier(specifier);
3625
3646
  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;
@@ -3653,9 +3674,9 @@ function formatLocale(locale2) {
3653
3674
  }
3654
3675
  }
3655
3676
  }
3656
- if (comma && !zero2) value2 = group(value2, Infinity);
3677
+ if (comma && !zero2) value2 = group2(value2, Infinity);
3657
3678
  var length = valuePrefix.length + value2.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : "";
3658
- if (comma && zero2) value2 = group(padding + value2, padding.length ? width - valueSuffix.length : Infinity), padding = "";
3679
+ if (comma && zero2) value2 = group2(padding + value2, padding.length ? width - valueSuffix.length : Infinity), padding = "";
3659
3680
  switch (align) {
3660
3681
  case "<":
3661
3682
  value2 = valuePrefix + value2 + valueSuffix + padding;
@@ -7331,8 +7352,8 @@ function selector$1(selector2) {
7331
7352
  function selection_select$1(select2) {
7332
7353
  if (typeof select2 !== "function") select2 = selector$1(select2);
7333
7354
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
7334
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
7335
- if ((node = group[i]) && (subnode = select2.call(node, node.__data__, i, group))) {
7355
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
7356
+ if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
7336
7357
  if ("__data__" in node) subnode.__data__ = node.__data__;
7337
7358
  subgroup[i] = subnode;
7338
7359
  }
@@ -7351,9 +7372,9 @@ function selectorAll$1(selector2) {
7351
7372
  function selection_selectAll$1(select2) {
7352
7373
  if (typeof select2 !== "function") select2 = selectorAll$1(select2);
7353
7374
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
7354
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
7355
- if (node = group[i]) {
7356
- subgroups.push(select2.call(node, node.__data__, i, group));
7375
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
7376
+ if (node = group2[i]) {
7377
+ subgroups.push(select2.call(node, node.__data__, i, group2));
7357
7378
  parents.push(node);
7358
7379
  }
7359
7380
  }
@@ -7368,8 +7389,8 @@ function matcher$1(selector2) {
7368
7389
  function selection_filter$1(match) {
7369
7390
  if (typeof match !== "function") match = matcher$1(match);
7370
7391
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
7371
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
7372
- if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
7392
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
7393
+ if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
7373
7394
  subgroup.push(node);
7374
7395
  }
7375
7396
  }
@@ -7410,10 +7431,10 @@ function constant$5(x2) {
7410
7431
  };
7411
7432
  }
7412
7433
  var keyPrefix$1 = "$";
7413
- function bindIndex$1(parent, group, enter, update, exit, data) {
7414
- var i = 0, node, groupLength = group.length, dataLength = data.length;
7434
+ function bindIndex$1(parent, group2, enter, update, exit, data) {
7435
+ var i = 0, node, groupLength = group2.length, dataLength = data.length;
7415
7436
  for (; i < dataLength; ++i) {
7416
- if (node = group[i]) {
7437
+ if (node = group2[i]) {
7417
7438
  node.__data__ = data[i];
7418
7439
  update[i] = node;
7419
7440
  } else {
@@ -7421,16 +7442,16 @@ function bindIndex$1(parent, group, enter, update, exit, data) {
7421
7442
  }
7422
7443
  }
7423
7444
  for (; i < groupLength; ++i) {
7424
- if (node = group[i]) {
7445
+ if (node = group2[i]) {
7425
7446
  exit[i] = node;
7426
7447
  }
7427
7448
  }
7428
7449
  }
7429
- function bindKey$1(parent, group, enter, update, exit, data, key) {
7430
- var i, node, nodeByKeyValue = {}, groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
7450
+ function bindKey$1(parent, group2, enter, update, exit, data, key) {
7451
+ var i, node, nodeByKeyValue = {}, groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
7431
7452
  for (i = 0; i < groupLength; ++i) {
7432
- if (node = group[i]) {
7433
- keyValues[i] = keyValue = keyPrefix$1 + key.call(node, node.__data__, i, group);
7453
+ if (node = group2[i]) {
7454
+ keyValues[i] = keyValue = keyPrefix$1 + key.call(node, node.__data__, i, group2);
7434
7455
  if (keyValue in nodeByKeyValue) {
7435
7456
  exit[i] = node;
7436
7457
  } else {
@@ -7449,7 +7470,7 @@ function bindKey$1(parent, group, enter, update, exit, data, key) {
7449
7470
  }
7450
7471
  }
7451
7472
  for (i = 0; i < groupLength; ++i) {
7452
- if ((node = group[i]) && nodeByKeyValue[keyValues[i]] === node) {
7473
+ if ((node = group2[i]) && nodeByKeyValue[keyValues[i]] === node) {
7453
7474
  exit[i] = node;
7454
7475
  }
7455
7476
  }
@@ -7465,8 +7486,8 @@ function selection_data$1(value2, key) {
7465
7486
  var bind = key ? bindKey$1 : bindIndex$1, parents = this._parents, groups = this._groups;
7466
7487
  if (typeof value2 !== "function") value2 = constant$5(value2);
7467
7488
  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
7468
- var parent = parents[j], group = groups[j], groupLength = group.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);
7469
- bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
7489
+ 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);
7490
+ bind(parent, group2, enterGroup, updateGroup, exitGroup, data, key);
7470
7491
  for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
7471
7492
  if (previous = enterGroup[i0]) {
7472
7493
  if (i0 >= i1) i1 = i0 + 1;
@@ -7506,8 +7527,8 @@ function selection_merge$1(selection2) {
7506
7527
  }
7507
7528
  function selection_order$1() {
7508
7529
  for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
7509
- for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
7510
- if (node = group[i]) {
7530
+ for (var group2 = groups[j], i = group2.length - 1, next = group2[i], node; --i >= 0; ) {
7531
+ if (node = group2[i]) {
7511
7532
  if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
7512
7533
  next = node;
7513
7534
  }
@@ -7521,8 +7542,8 @@ function selection_sort$1(compare) {
7521
7542
  return a2 && b ? compare(a2.__data__, b.__data__) : !a2 - !b;
7522
7543
  }
7523
7544
  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
7524
- for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
7525
- if (node = group[i]) {
7545
+ for (var group2 = groups[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
7546
+ if (node = group2[i]) {
7526
7547
  sortgroup[i] = node;
7527
7548
  }
7528
7549
  }
@@ -7548,8 +7569,8 @@ function selection_nodes$1() {
7548
7569
  }
7549
7570
  function selection_node$1() {
7550
7571
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
7551
- for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
7552
- var node = group[i];
7572
+ for (var group2 = groups[j], i = 0, n = group2.length; i < n; ++i) {
7573
+ var node = group2[i];
7553
7574
  if (node) return node;
7554
7575
  }
7555
7576
  }
@@ -7567,8 +7588,8 @@ function selection_empty$1() {
7567
7588
  }
7568
7589
  function selection_each$1(callback) {
7569
7590
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
7570
- for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
7571
- if (node = group[i]) callback.call(node, node.__data__, i, group);
7591
+ for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
7592
+ if (node = group2[i]) callback.call(node, node.__data__, i, group2);
7572
7593
  }
7573
7594
  }
7574
7595
  return this;
@@ -7810,8 +7831,8 @@ if (typeof document !== "undefined") {
7810
7831
  filterEvents$1 = { mouseenter: "mouseover", mouseleave: "mouseout" };
7811
7832
  }
7812
7833
  }
7813
- function filterContextListener$1(listener, index2, group) {
7814
- listener = contextListener$1(listener, index2, group);
7834
+ function filterContextListener$1(listener, index2, group2) {
7835
+ listener = contextListener$1(listener, index2, group2);
7815
7836
  return function(event2) {
7816
7837
  var related = event2.relatedTarget;
7817
7838
  if (!related || related !== this && !(related.compareDocumentPosition(this) & 8)) {
@@ -7819,12 +7840,12 @@ function filterContextListener$1(listener, index2, group) {
7819
7840
  }
7820
7841
  };
7821
7842
  }
7822
- function contextListener$1(listener, index2, group) {
7843
+ function contextListener$1(listener, index2, group2) {
7823
7844
  return function(event1) {
7824
7845
  var event0 = event;
7825
7846
  event = event1;
7826
7847
  try {
7827
- listener.call(this, this.__data__, index2, group);
7848
+ listener.call(this, this.__data__, index2, group2);
7828
7849
  } finally {
7829
7850
  event = event0;
7830
7851
  }
@@ -7854,8 +7875,8 @@ function onRemove$1(typename) {
7854
7875
  }
7855
7876
  function onAdd$1(typename, value2, capture) {
7856
7877
  var wrap3 = filterEvents$1.hasOwnProperty(typename.type) ? filterContextListener$1 : contextListener$1;
7857
- return function(d, i, group) {
7858
- var on = this.__on, o, listener = wrap3(value2, i, group);
7878
+ return function(d, i, group2) {
7879
+ var on = this.__on, o, listener = wrap3(value2, i, group2);
7859
7880
  if (on) for (var j = 0, m = on.length; j < m; ++j) {
7860
7881
  if ((o = on[j]).type === typename.type && o.name === typename.name) {
7861
7882
  this.removeEventListener(o.type, o.listener, o.capture);
@@ -9471,8 +9492,8 @@ var circleHandles = function circleHandles2(_ref2) {
9471
9492
  return h;
9472
9493
  };
9473
9494
  var addHandles = function addHandles2(_ref5) {
9474
- var group = _ref5.group, handles = _ref5.handles, _ref5$r = _ref5.r, r = _ref5$r === void 0 ? 10 : _ref5$r;
9475
- var h = group.selectAll("circle.handle").data(handles);
9495
+ var group2 = _ref5.group, handles = _ref5.handles, _ref5$r = _ref5.r, r = _ref5$r === void 0 ? 10 : _ref5$r;
9496
+ var h = group2.selectAll("circle.handle").data(handles);
9476
9497
  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) {
9477
9498
  return d.start && d.start(d);
9478
9499
  }).on("drag", function(d) {
@@ -9480,7 +9501,7 @@ var addHandles = function addHandles2(_ref5) {
9480
9501
  }).on("end", function(d) {
9481
9502
  return d.end && d.end(d);
9482
9503
  }));
9483
- group.selectAll("circle.handle").attr("cx", function(d) {
9504
+ group2.selectAll("circle.handle").attr("cx", function(d) {
9484
9505
  return d.x;
9485
9506
  }).attr("cy", function(d) {
9486
9507
  return d.y;
@@ -10496,9 +10517,9 @@ var d3XYThreshold = customType(ThresholdMap, {
10496
10517
  subject: { type: "threshold" }
10497
10518
  });
10498
10519
  var newWithClass = function newWithClass2(a2, d, type, className, classID) {
10499
- var group = a2.selectAll(type + "." + (classID || className)).data(d);
10500
- group.enter().append(type).merge(group).attr("class", className);
10501
- group.exit().remove();
10520
+ var group2 = a2.selectAll(type + "." + (classID || className)).data(d);
10521
+ group2.enter().append(type).merge(group2).attr("class", className);
10522
+ group2.exit().remove();
10502
10523
  return a2;
10503
10524
  };
10504
10525
  var addHandlers = function addHandlers2(dispatcher, annotation2, _ref3) {
@@ -10571,9 +10592,9 @@ function annotation() {
10571
10592
  });
10572
10593
  var annotationG = selection2.selectAll("g").data([collection]);
10573
10594
  annotationG.enter().append("g").attr("class", "annotations");
10574
- var group = selection2.select("g.annotations");
10575
- newWithClass(group, collection.annotations, "g", "annotation");
10576
- var annotation4 = group.selectAll("g.annotation");
10595
+ var group2 = selection2.select("g.annotations");
10596
+ newWithClass(group2, collection.annotations, "g", "annotation");
10597
+ var annotation4 = group2.selectAll("g.annotation");
10577
10598
  annotation4.each(function(d) {
10578
10599
  var a2 = select$1(this);
10579
10600
  a2.attr("class", "annotation");
@@ -11157,6 +11178,7 @@ const defaultChartFormatOptions = {
11157
11178
  totalColor: "#41a5b4",
11158
11179
  positiveColor: "#9fb700",
11159
11180
  negativeColor: "#e25a42",
11181
+ dotPlotLineColor: "#c7c7c7",
11160
11182
  dataLabelValue: true,
11161
11183
  plotAreaAbsoluteValue: false,
11162
11184
  dataLabelName: true,
@@ -11577,7 +11599,7 @@ var chartTypes = /* @__PURE__ */ ((chartTypes2) => {
11577
11599
  chartTypes2["CombinationArea"] = "CombinationArea";
11578
11600
  chartTypes2["CombinationStackArea"] = "CombinationStackArea";
11579
11601
  chartTypes2["TornadoDefaultEntry"] = "defaultEntry";
11580
- chartTypes2["ClevelandDotPlot"] = "ClevelandDotPlot";
11602
+ chartTypes2["DotPlot"] = "DotPlot";
11581
11603
  return chartTypes2;
11582
11604
  })(chartTypes || {});
11583
11605
  const connecterCurve = {
@@ -13374,7 +13396,8 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
13374
13396
  } else {
13375
13397
  if (barChart) {
13376
13398
  const legendUniqueId = d.legendUniqueId.includes("~$~") ? d.legendUniqueId.split("~$~")[0] : d.legendUniqueId;
13377
- return isTornadoChart ? xScaleForLegends(d.y) + xScaleForLegends.bandwidth() / 2 : xScaleForLegends ? xScale(d.y) + xScaleForLegends(legendUniqueId) - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
13399
+ const xScaleLegend = chartType !== chartTypes.DotPlot ? xScaleForLegends(legendUniqueId) : 0;
13400
+ return isTornadoChart ? xScaleForLegends(d.y) + xScaleForLegends.bandwidth() / 2 : xScaleForLegends ? xScale(d.y) + xScaleLegend - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
13378
13401
  } else
13379
13402
  return dataLabelsPosition(
13380
13403
  d.y.measure,
@@ -16057,11 +16080,13 @@ function calculateMaxLegendWidth(list, formatOptions) {
16057
16080
  let maxLength = 0;
16058
16081
  let maxLegend = list[0];
16059
16082
  list.forEach((legend) => {
16060
- let splitedLegend = legend.includes("~$~") ? legend.split("~$~")[1] : legend.includes("-") ? legend.slice(legend.indexOf("-") + 1) : legend;
16061
- let splitedLegendLength = splitedLegend.length;
16062
- if (maxLength < splitedLegendLength) {
16063
- maxLength = splitedLegendLength;
16064
- maxLegend = splitedLegend;
16083
+ if (legend !== void 0) {
16084
+ let splitedLegend = legend.includes("~$~") ? legend.split("~$~")[1] : legend.includes("-") ? legend.slice(legend.indexOf("-") + 1) : legend;
16085
+ let splitedLegendLength = splitedLegend.length;
16086
+ if (maxLength < splitedLegendLength) {
16087
+ maxLength = splitedLegendLength;
16088
+ maxLegend = splitedLegend;
16089
+ }
16065
16090
  }
16066
16091
  });
16067
16092
  return calculateWidthHeightDynamically(maxLegend, formatOptions.legends.legendFontSize, formatOptions.legends.legendFontFamily);
@@ -16071,9 +16096,6 @@ function calculateMaxLegendWidth(list, formatOptions) {
16071
16096
  }
16072
16097
  function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, tooltipHandle, formatOptions, chartJSON, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue, isNormalizedChart) {
16073
16098
  try {
16074
- let Markershapes = function(Shape) {
16075
- return Shape == "Square" ? square : Shape == "Circle" ? circle : Shape == "Cross" ? cross : Shape == "Triangle" ? triangle : Shape == "Star" ? star : Shape == "Diamond" ? diamond : Shape == "Wye" ? wye : circle;
16076
- };
16077
16099
  let hideZeroValues = formatOptions.plotArea.hideZeroValues;
16078
16100
  formatOptions.plotArea.plotAreaHideLineAndMarkers === void 0 ? formatOptions.plotArea.plotAreaHideLineAndMarkers = true : null;
16079
16101
  chartData.forEach(
@@ -16091,8 +16113,8 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
16091
16113
  let markerGroupsEnter = markerGroups.enter().append("g").attr("class", "parentGroup").attr("hoverId", (d) => (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-"));
16092
16114
  let mergedMarkerGroups = markerGroupsEnter.merge(markerGroups);
16093
16115
  mergedMarkerGroups.each(function(groupData) {
16094
- const group = select$2(this);
16095
- let markers = group.selectAll("path").data(groupData.data);
16116
+ const group2 = select$2(this);
16117
+ let markers = group2.selectAll("path").data(groupData.data);
16096
16118
  let markersEnter = markers.enter().append("path").attr("fill", (d) => d.markerColor);
16097
16119
  markersEnter.merge(markers).attr("d", (d) => {
16098
16120
  return Symbol$1().type(Markershapes(d.markerShape)).size(d.markerSize * 50)();
@@ -16167,6 +16189,9 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
16167
16189
  logError$2(fileName$b, "lineMarkers", error);
16168
16190
  }
16169
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
+ }
16170
16195
  const checkVisibleConditions = (chartData, d, type, hideZeroValues, yScaleRight, customYaxisMinValue, customYaxisMaxValue) => {
16171
16196
  try {
16172
16197
  if (chartData[0].properties.axis && chartData[0].properties.axis === "Secondary") {
@@ -16385,12 +16410,21 @@ function getAutoNumberWithFormat(value2) {
16385
16410
  }
16386
16411
  function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
16387
16412
  try {
16388
- const markerColor = prop.color ?? prop?.markerColor ?? "blue";
16389
- const markerShape = prop?.markerShape.toLowerCase() ?? "circle";
16413
+ const markerColor = prop?.color ?? prop?.markerColor ?? "blue";
16414
+ const markerShape = prop?.markerShape?.toLowerCase() ?? "circle";
16390
16415
  const isLightTheme = chartFormatOptions.toolTip.toolTipTheme === "Light";
16391
16416
  const bgColor = isLightTheme ? "rgba(255, 255, 255)" : "#272729ff";
16392
16417
  const textColor = isLightTheme ? "black" : commonColors.white;
16393
16418
  const subTextColor = isLightTheme ? "gray" : "#d1d5db";
16419
+ const formatValueWithWordLimit = (text, wordsPerLine = 6) => {
16420
+ if (!text) return "";
16421
+ const words = text.split(" ");
16422
+ let result = "";
16423
+ for (let i = 0; i < words.length; i += wordsPerLine) {
16424
+ result += words.slice(i, i + wordsPerLine).join(" ") + "<br/>";
16425
+ }
16426
+ return result;
16427
+ };
16394
16428
  selectAll(".chartTooltip").style("visibility", visibilityCondition.hidden);
16395
16429
  const tooltip = select$2("#chartTooltipDiv").html("").append("div").attr(
16396
16430
  "class",
@@ -16425,29 +16459,53 @@ function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
16425
16459
  }
16426
16460
  })();
16427
16461
  p += `
16428
- <div style="display:flex; align-items:center; margin-bottom:4px;">
16462
+ <div style="
16463
+ display:flex;
16464
+ align-items:flex-start;
16465
+ justify-content:space-between;
16466
+ margin-bottom:6px;
16467
+ gap:10px;
16468
+ ">
16469
+
16470
+ <!-- LEFT SIDE (Dot + Key) -->
16471
+ <div style="
16472
+ display:flex;
16473
+ align-items:flex-start;
16474
+ gap:6px;
16475
+ flex-shrink:0;
16476
+ ">
16429
16477
  <span style="
16430
- display:inline-block;
16431
16478
  width:6px;
16432
16479
  height:6px;
16433
- background-color:${markerColor};
16434
- margin-right:6px;
16435
- ${shapeStyle}
16480
+ background:${markerColor};
16481
+ margin-top:5px;
16482
+ border-radius:50%;
16436
16483
  "></span>
16484
+
16437
16485
  <span style="
16438
- font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
16439
16486
  font-size:11px;
16440
16487
  color:${subTextColor};
16441
- flex:1;
16442
- ">${c2.key || ""}</span>
16443
- <span style="
16444
- font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
16445
- font-size:11px;
16446
- color:${textColor};
16447
- font-weight:bold;
16448
- margin-left:6px;
16449
- ">${c2.value || ""}</span>
16450
- </div>`;
16488
+ white-space:nowrap;
16489
+ ">
16490
+ ${c2.key || ""}
16491
+ </span>
16492
+ </div>
16493
+
16494
+ <!-- RIGHT SIDE (Value) -->
16495
+ <div style="
16496
+ font-size:11px;
16497
+ font-weight:bold;
16498
+ color:${textColor};
16499
+ text-align:right;
16500
+ max-width:200px;
16501
+ word-break:break-word;
16502
+ line-height:1.4;
16503
+ ">
16504
+ ${formatValueWithWordLimit(String(c2.value), 6)}
16505
+ </div>
16506
+
16507
+ </div>
16508
+ `;
16451
16509
  return p;
16452
16510
  }, ``);
16453
16511
  tooltip.html(`
@@ -16459,35 +16517,20 @@ function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
16459
16517
  const tooltipNode = tooltip.node();
16460
16518
  const tooltipWidth = tooltipNode.offsetWidth;
16461
16519
  const tooltipHeight = tooltipNode.offsetHeight;
16462
- const halfWidth = window.innerWidth / 2;
16463
- const halfHeight = window.innerHeight / 2;
16464
- let left2 = 0;
16465
- let top2 = 0;
16466
- let arrow = "";
16467
- if (mouseX > halfWidth && mouseY < halfHeight) {
16520
+ let left2 = mouseX + 15;
16521
+ let top2 = mouseY + 15;
16522
+ if (left2 + tooltipWidth > window.innerWidth) {
16468
16523
  left2 = mouseX - tooltipWidth - 10;
16469
- top2 = mouseY - 10;
16470
- arrow = "right-top";
16471
- } else if (mouseX < halfWidth && mouseY < halfHeight) {
16472
- left2 = mouseX + 20;
16473
- top2 = mouseY - 10;
16474
- arrow = "left-top";
16475
- } else if (mouseX < halfWidth && mouseY >= halfHeight) {
16476
- left2 = mouseX + 20;
16477
- top2 = mouseY - tooltipHeight + 10;
16478
- arrow = "left-bottom";
16479
- } else {
16480
- left2 = mouseX - tooltipWidth - 10;
16481
- top2 = mouseY - tooltipHeight + 10;
16482
- arrow = "right-bottom";
16524
+ }
16525
+ if (top2 + tooltipHeight > window.innerHeight) {
16526
+ top2 = mouseY - tooltipHeight - 10;
16483
16527
  }
16484
16528
  tooltip.style("left", `${left2}px`).style("top", `${top2}px`).style(
16485
16529
  "visibility",
16486
- chartFormatOptions.toolTip.toolTipVisibility ? visibilityCondition.visible : visibilityCondition.hidden
16487
- ).style("transform", "scale(1)").style("opacity", "1");
16488
- tooltip.select(".arrow-placeholder").attr("class", `arrow-${arrow}`);
16530
+ chartFormatOptions.toolTip.toolTipVisibility ? "visible" : "hidden"
16531
+ );
16489
16532
  } catch (error) {
16490
- logError$2(fileName$b, "showTooltipOnMouseMove", error);
16533
+ console.error("Tooltip Error:", error);
16491
16534
  }
16492
16535
  }
16493
16536
  function hideTooltipOnMouseOut() {
@@ -16556,12 +16599,14 @@ const legendsWithScroll = (svg, seriesData, x2, y2, width, height, legendPositio
16556
16599
  const hoverId = this.textContent.replace(/\s+/g, "-");
16557
16600
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
16558
16601
  svg.selectAll(`[hoverId="${hoverId}"]`).classed("highlight", true).classed("unhighlight", false);
16602
+ svg.selectAll(".cleveland-line-group").classed("highlight", false).classed("unhighlight", true);
16559
16603
  }
16560
16604
  }).on("mouseout", function() {
16561
16605
  if (chartFormatOptions.legends.onHoverEffect) {
16562
16606
  const hoverId = this.textContent.replace(/\s+/g, "-");
16563
16607
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
16564
16608
  svg.selectAll(`[hoverId="${hoverId}"]`).classed("highlight", false).classed("unhighlight", false);
16609
+ svg.selectAll(".cleveland-line-group").classed("highlight", false).classed("unhighlight", false);
16565
16610
  }
16566
16611
  });
16567
16612
  if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom) {
@@ -17102,12 +17147,12 @@ function modifySeriesDataForTornadoChart(seriesData, data, isAdvanceAnalyticsCha
17102
17147
  };
17103
17148
  const measureMap = /* @__PURE__ */ new Map();
17104
17149
  data?.LegendList?.forEach((legend) => {
17105
- measureMap.set(splitLengend(legend?.name), legend);
17150
+ measureMap.set(isAdvanceAnalyticsChart ? splitLengend(legend?.name) : legend.measureUniqueId, legend);
17106
17151
  });
17107
17152
  return seriesData.map((series) => {
17108
17153
  return {
17109
17154
  ...series,
17110
- properties: measureMap.get(isAdvanceAnalyticsChart ? splitLengend(series.legend) : series.properties.currentMeasure) ?? series.properties
17155
+ properties: measureMap.get(isAdvanceAnalyticsChart ? splitLengend(series.legend) : series.properties.measureUniqueId) ?? series.properties
17111
17156
  };
17112
17157
  }).filter((series) => series.data[0].value !== 0);
17113
17158
  } catch (_) {
@@ -22181,7 +22226,7 @@ const LineChart = ({
22181
22226
  (d2) => d2.properties.lineStyle !== "None" ? d2.properties.lineWidth : 0
22182
22227
  ).attr(
22183
22228
  "hoverId",
22184
- (d.properties.alias || lineGroups.properties.name || "Legend").replace(/\s+/g, "-")
22229
+ (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-")
22185
22230
  ).attr("d", (d2) => lineGenerator(d2.data));
22186
22231
  });
22187
22232
  lineGroups.exit().remove();
@@ -22219,7 +22264,7 @@ const LineChart = ({
22219
22264
  xAxis,
22220
22265
  dimensionHeightWidthArray,
22221
22266
  height,
22222
- innerWidth2 / xScale.length,
22267
+ innerWidth2 / filteredDimension.length,
22223
22268
  isDateType,
22224
22269
  innerWidth2,
22225
22270
  innerHeight2,
@@ -29135,8 +29180,16 @@ const Treemap = ({ data, formatOptions, chartId }) => {
29135
29180
  }
29136
29181
  chartData = chartData.map((d) => {
29137
29182
  let value2 = d.data.data[valueIndex].value;
29138
- d.data.properties["themeColor"] = colorScale(value2.toString());
29139
- return d;
29183
+ return {
29184
+ ...d,
29185
+ data: {
29186
+ ...d.data,
29187
+ properties: {
29188
+ ...d.data.properties,
29189
+ themeColor: colorScale(value2.toString())
29190
+ }
29191
+ }
29192
+ };
29140
29193
  });
29141
29194
  appendColorScale(
29142
29195
  startColor,
@@ -29970,6 +30023,11 @@ const PyramidChart = ({
29970
30023
  annotationsList = [];
29971
30024
  seriesData.forEach((d, i) => {
29972
30025
  try {
30026
+ const type = chartFormatOptions.annotation.annotationVisibility;
30027
+ const lastIndex = seriesData.length - 1;
30028
+ if (type === dataLabelPositionType.none || type === dataLabelPositionType.startOnly && i !== 0 || type === dataLabelPositionType.endOnly && i !== lastIndex || type === dataLabelPositionType.startAndEndBoth && i !== 0 && i !== lastIndex) {
30029
+ return;
30030
+ }
29973
30031
  let singleAnnotation = {
29974
30032
  note: {
29975
30033
  title: chartFormatOptions.plotArea.dataLabelName ? d.properties.alias : "",
@@ -30746,7 +30804,8 @@ const Speedometer = ({
30746
30804
  }
30747
30805
  }
30748
30806
  let valuefontStyle = chartFormatOptions.pointerValue.pointerValueFontStyle;
30749
- let comparedValue = chartAreaTagG.append("g").attr("class", "label").attr("transform", positionTransformString2);
30807
+ chartAreaTagG.selectAll(".pointerValueText").remove();
30808
+ let comparedValue = chartAreaTagG.append("g").attr("class", "pointerValueText").attr("transform", positionTransformString2);
30750
30809
  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(
30751
30810
  "fill",
30752
30811
  chartFormatOptions.pointerValue.pointerValueColor !== commonColors.white ? chartFormatOptions.pointerValue.pointerValueColor : "none"
@@ -30890,6 +30949,31 @@ const RadialBarChart = ({
30890
30949
  logError("RadialBarChart.tsx", "loopOverChartData", error);
30891
30950
  }
30892
30951
  };
30952
+ const getModifiedDataForLabels = (data) => {
30953
+ try {
30954
+ const dataLabelType = chartFormatOptions.plotArea.dataLabelsOptions;
30955
+ switch (dataLabelType) {
30956
+ case dataLabelPositionType.automatic:
30957
+ return data.map((item, index2) => {
30958
+ return {
30959
+ ...item,
30960
+ index: index2
30961
+ };
30962
+ });
30963
+ case dataLabelPositionType.startOnly:
30964
+ return [{ ...data[0], index: 0 }];
30965
+ case dataLabelPositionType.endOnly:
30966
+ return [{ ...data[data.length - 1], index: data.length - 1 }];
30967
+ case dataLabelPositionType.startAndEndBoth:
30968
+ return [{ ...data[0], index: 0 }, { ...data[data.length - 1], index: data.length - 1 }];
30969
+ case dataLabelPositionType.none:
30970
+ return [];
30971
+ }
30972
+ } catch (error) {
30973
+ logError("RadialBarChart.tsx", "getModifiedDataForLabels", error);
30974
+ return data;
30975
+ }
30976
+ };
30893
30977
  const initRadialBarChart = () => {
30894
30978
  try {
30895
30979
  let arcTween = function(d, i) {
@@ -31045,7 +31129,8 @@ const RadialBarChart = ({
31045
31129
  (d, i) => chartFormatOptions.plotArea.arcTransition ? i * 200 : 0
31046
31130
  ).duration(chartFormatOptions.plotArea.arcTransition ? 500 : 0).attrTween("d", arcTween);
31047
31131
  if (chartFormatOptions.plotArea.dataLabels) {
31048
- svg2.selectAll(".arc-label-" + chartId).data(ChartData).enter().append("text").attr("class", "arc-label-" + chartId).attr("class", "parentGroup").attr("text-anchor", "start").attr("dy", (d, i) => (getOuterRadius(i) - getInnerRadius(i)) / 1.75).append("textPath").attr("xlink:href", (d, i) => `#arc-path-${i}-` + chartId).style("startOffset", "50%").attr("hoverId", (d) => d.legend.replaceAll(" ", "-")).text(
31132
+ const labelsData = getModifiedDataForLabels(ChartData);
31133
+ 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(
31049
31134
  (d) => `  ${d.properties.alias}
31050
31135
   ${chartFormatOptions.plotArea.dataLabelValue ? getNumberWithFormatFunction(
31051
31136
  chartFormatOptions.plotArea.plotAreaDisplayUnits,
@@ -31522,28 +31607,27 @@ const WordCloud = ({
31522
31607
  initSvg(svgRef, width, height, chartFormatOptions);
31523
31608
  chartAreaTagG = initChartArea(svg, margins);
31524
31609
  drawChartTitle(svgRef, chartTitleHeight, width, chartFormatOptions);
31525
- calculateWordCloudData(seriesData);
31610
+ calculateWordCloudData();
31526
31611
  drawWordCloudChart();
31527
31612
  };
31528
- const calculateWordCloudData = (seriesData2) => {
31613
+ const calculateWordCloudData = () => {
31529
31614
  try {
31530
31615
  totalMeasureValue = 0;
31531
- seriesData2 = seriesData2.map((item) => {
31616
+ seriesData = seriesData.map((item) => {
31532
31617
  let value2 = item.data[0].value;
31533
31618
  totalMeasureValue += value2;
31619
+ if (chartFormatOptions.plotArea.hideZeroValues && value2 == 0) {
31620
+ return null;
31621
+ }
31534
31622
  if (value2 < min2) {
31535
31623
  min2 = value2;
31536
31624
  }
31537
31625
  if (value2 > max2) {
31538
31626
  max2 = value2;
31539
31627
  }
31540
- if (chartFormatOptions.plotArea.hideZeroValues && item[0].value != 0) {
31541
- return null;
31542
- } else {
31543
- return item;
31544
- }
31628
+ return item;
31545
31629
  });
31546
- seriesData2 = seriesData2.filter((item) => item !== null);
31630
+ seriesData = seriesData.filter((item) => item !== null);
31547
31631
  scale2 = linear$1().domain([min2, max2]).range([12, 70]);
31548
31632
  } catch (error) {
31549
31633
  logError$2(fileName$2, "calculateWordCloudData", error);
@@ -32598,8 +32682,8 @@ function selector(selector2) {
32598
32682
  function selection_select(select2) {
32599
32683
  if (typeof select2 !== "function") select2 = selector(select2);
32600
32684
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
32601
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
32602
- if ((node = group[i]) && (subnode = select2.call(node, node.__data__, i, group))) {
32685
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
32686
+ if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
32603
32687
  if ("__data__" in node) subnode.__data__ = node.__data__;
32604
32688
  subgroup[i] = subnode;
32605
32689
  }
@@ -32618,9 +32702,9 @@ function selectorAll(selector2) {
32618
32702
  function selection_selectAll(select2) {
32619
32703
  if (typeof select2 !== "function") select2 = selectorAll(select2);
32620
32704
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
32621
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
32622
- if (node = group[i]) {
32623
- subgroups.push(select2.call(node, node.__data__, i, group));
32705
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
32706
+ if (node = group2[i]) {
32707
+ subgroups.push(select2.call(node, node.__data__, i, group2));
32624
32708
  parents.push(node);
32625
32709
  }
32626
32710
  }
@@ -32635,8 +32719,8 @@ function matcher(selector2) {
32635
32719
  function selection_filter(match) {
32636
32720
  if (typeof match !== "function") match = matcher(match);
32637
32721
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
32638
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
32639
- if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
32722
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
32723
+ if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
32640
32724
  subgroup.push(node);
32641
32725
  }
32642
32726
  }
@@ -32677,10 +32761,10 @@ function constant$2(x2) {
32677
32761
  };
32678
32762
  }
32679
32763
  var keyPrefix = "$";
32680
- function bindIndex(parent, group, enter, update, exit, data) {
32681
- var i = 0, node, groupLength = group.length, dataLength = data.length;
32764
+ function bindIndex(parent, group2, enter, update, exit, data) {
32765
+ var i = 0, node, groupLength = group2.length, dataLength = data.length;
32682
32766
  for (; i < dataLength; ++i) {
32683
- if (node = group[i]) {
32767
+ if (node = group2[i]) {
32684
32768
  node.__data__ = data[i];
32685
32769
  update[i] = node;
32686
32770
  } else {
@@ -32688,16 +32772,16 @@ function bindIndex(parent, group, enter, update, exit, data) {
32688
32772
  }
32689
32773
  }
32690
32774
  for (; i < groupLength; ++i) {
32691
- if (node = group[i]) {
32775
+ if (node = group2[i]) {
32692
32776
  exit[i] = node;
32693
32777
  }
32694
32778
  }
32695
32779
  }
32696
- function bindKey(parent, group, enter, update, exit, data, key) {
32697
- var i, node, nodeByKeyValue = {}, groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
32780
+ function bindKey(parent, group2, enter, update, exit, data, key) {
32781
+ var i, node, nodeByKeyValue = {}, groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
32698
32782
  for (i = 0; i < groupLength; ++i) {
32699
- if (node = group[i]) {
32700
- keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);
32783
+ if (node = group2[i]) {
32784
+ keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group2);
32701
32785
  if (keyValue in nodeByKeyValue) {
32702
32786
  exit[i] = node;
32703
32787
  } else {
@@ -32716,7 +32800,7 @@ function bindKey(parent, group, enter, update, exit, data, key) {
32716
32800
  }
32717
32801
  }
32718
32802
  for (i = 0; i < groupLength; ++i) {
32719
- if ((node = group[i]) && nodeByKeyValue[keyValues[i]] === node) {
32803
+ if ((node = group2[i]) && nodeByKeyValue[keyValues[i]] === node) {
32720
32804
  exit[i] = node;
32721
32805
  }
32722
32806
  }
@@ -32732,8 +32816,8 @@ function selection_data(value2, key) {
32732
32816
  var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups;
32733
32817
  if (typeof value2 !== "function") value2 = constant$2(value2);
32734
32818
  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
32735
- var parent = parents[j], group = groups[j], groupLength = group.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);
32736
- bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
32819
+ 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);
32820
+ bind(parent, group2, enterGroup, updateGroup, exitGroup, data, key);
32737
32821
  for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
32738
32822
  if (previous = enterGroup[i0]) {
32739
32823
  if (i0 >= i1) i1 = i0 + 1;
@@ -32773,8 +32857,8 @@ function selection_merge(selection2) {
32773
32857
  }
32774
32858
  function selection_order() {
32775
32859
  for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
32776
- for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
32777
- if (node = group[i]) {
32860
+ for (var group2 = groups[j], i = group2.length - 1, next = group2[i], node; --i >= 0; ) {
32861
+ if (node = group2[i]) {
32778
32862
  if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
32779
32863
  next = node;
32780
32864
  }
@@ -32788,8 +32872,8 @@ function selection_sort(compare) {
32788
32872
  return a2 && b ? compare(a2.__data__, b.__data__) : !a2 - !b;
32789
32873
  }
32790
32874
  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
32791
- for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
32792
- if (node = group[i]) {
32875
+ for (var group2 = groups[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
32876
+ if (node = group2[i]) {
32793
32877
  sortgroup[i] = node;
32794
32878
  }
32795
32879
  }
@@ -32815,8 +32899,8 @@ function selection_nodes() {
32815
32899
  }
32816
32900
  function selection_node() {
32817
32901
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
32818
- for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
32819
- var node = group[i];
32902
+ for (var group2 = groups[j], i = 0, n = group2.length; i < n; ++i) {
32903
+ var node = group2[i];
32820
32904
  if (node) return node;
32821
32905
  }
32822
32906
  }
@@ -32834,8 +32918,8 @@ function selection_empty() {
32834
32918
  }
32835
32919
  function selection_each(callback) {
32836
32920
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
32837
- for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
32838
- if (node = group[i]) callback.call(node, node.__data__, i, group);
32921
+ for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
32922
+ if (node = group2[i]) callback.call(node, node.__data__, i, group2);
32839
32923
  }
32840
32924
  }
32841
32925
  return this;
@@ -33078,8 +33162,8 @@ if (typeof document !== "undefined") {
33078
33162
  filterEvents = { mouseenter: "mouseover", mouseleave: "mouseout" };
33079
33163
  }
33080
33164
  }
33081
- function filterContextListener(listener, index2, group) {
33082
- listener = contextListener(listener, index2, group);
33165
+ function filterContextListener(listener, index2, group2) {
33166
+ listener = contextListener(listener, index2, group2);
33083
33167
  return function(event2) {
33084
33168
  var related = event2.relatedTarget;
33085
33169
  if (!related || related !== this && !(related.compareDocumentPosition(this) & 8)) {
@@ -33087,10 +33171,10 @@ function filterContextListener(listener, index2, group) {
33087
33171
  }
33088
33172
  };
33089
33173
  }
33090
- function contextListener(listener, index2, group) {
33174
+ function contextListener(listener, index2, group2) {
33091
33175
  return function(event1) {
33092
33176
  try {
33093
- listener.call(this, this.__data__, index2, group);
33177
+ listener.call(this, this.__data__, index2, group2);
33094
33178
  } finally {
33095
33179
  }
33096
33180
  };
@@ -33119,8 +33203,8 @@ function onRemove(typename) {
33119
33203
  }
33120
33204
  function onAdd(typename, value2, capture) {
33121
33205
  var wrap3 = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;
33122
- return function(d, i, group) {
33123
- var on = this.__on, o, listener = wrap3(value2, i, group);
33206
+ return function(d, i, group2) {
33207
+ var on = this.__on, o, listener = wrap3(value2, i, group2);
33124
33208
  if (on) for (var j = 0, m = on.length; j < m; ++j) {
33125
33209
  if ((o = on[j]).type === typename.type && o.name === typename.name) {
33126
33210
  this.removeEventListener(o.type, o.listener, o.capture);
@@ -33397,7 +33481,7 @@ var STARTED = 3;
33397
33481
  var RUNNING = 4;
33398
33482
  var ENDING = 5;
33399
33483
  var ENDED = 6;
33400
- function schedule(node, name, id2, index2, group, timing) {
33484
+ function schedule(node, name, id2, index2, group2, timing) {
33401
33485
  var schedules = node.__transition;
33402
33486
  if (!schedules) node.__transition = {};
33403
33487
  else if (id2 in schedules) return;
@@ -33405,7 +33489,7 @@ function schedule(node, name, id2, index2, group, timing) {
33405
33489
  name,
33406
33490
  index: index2,
33407
33491
  // For context during callback.
33408
- group,
33492
+ group: group2,
33409
33493
  // For context during callback.
33410
33494
  on: emptyOn,
33411
33495
  tween: emptyTween,
@@ -34197,8 +34281,8 @@ function transition_ease(value2) {
34197
34281
  function transition_filter(match) {
34198
34282
  if (typeof match !== "function") match = matcher(match);
34199
34283
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
34200
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
34201
- if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
34284
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
34285
+ if ((node = group2[i]) && match.call(node, node.__data__, i, group2)) {
34202
34286
  subgroup.push(node);
34203
34287
  }
34204
34288
  }
@@ -34252,8 +34336,8 @@ function transition_select(select2) {
34252
34336
  var name = this._name, id2 = this._id;
34253
34337
  if (typeof select2 !== "function") select2 = selector(select2);
34254
34338
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
34255
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
34256
- if ((node = group[i]) && (subnode = select2.call(node, node.__data__, i, group))) {
34339
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
34340
+ if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
34257
34341
  if ("__data__" in node) subnode.__data__ = node.__data__;
34258
34342
  subgroup[i] = subnode;
34259
34343
  schedule(subgroup[i], name, id2, i, subgroup, get2(node, id2));
@@ -34266,9 +34350,9 @@ function transition_selectAll(select2) {
34266
34350
  var name = this._name, id2 = this._id;
34267
34351
  if (typeof select2 !== "function") select2 = selectorAll(select2);
34268
34352
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
34269
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
34270
- if (node = group[i]) {
34271
- for (var children2 = select2.call(node, node.__data__, i, group), child, inherit2 = get2(node, id2), k2 = 0, l = children2.length; k2 < l; ++k2) {
34353
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
34354
+ if (node = group2[i]) {
34355
+ for (var children2 = select2.call(node, node.__data__, i, group2), child, inherit2 = get2(node, id2), k2 = 0, l = children2.length; k2 < l; ++k2) {
34272
34356
  if (child = children2[k2]) {
34273
34357
  schedule(child, name, id2, k2, children2, inherit2);
34274
34358
  }
@@ -34384,10 +34468,10 @@ function transition_textTween(value2) {
34384
34468
  function transition_transition() {
34385
34469
  var name = this._name, id0 = this._id, id1 = newId();
34386
34470
  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
34387
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
34388
- if (node = group[i]) {
34471
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
34472
+ if (node = group2[i]) {
34389
34473
  var inherit2 = get2(node, id0);
34390
- schedule(node, name, id1, i, group, {
34474
+ schedule(node, name, id1, i, group2, {
34391
34475
  time: inherit2.time + inherit2.delay + inherit2.duration,
34392
34476
  delay: 0,
34393
34477
  duration: inherit2.duration,
@@ -34482,9 +34566,9 @@ function selection_transition(name) {
34482
34566
  id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
34483
34567
  }
34484
34568
  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
34485
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
34486
- if (node = group[i]) {
34487
- schedule(node, name, id2, i, group, timing || inherit(node, id2));
34569
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
34570
+ if (node = group2[i]) {
34571
+ schedule(node, name, id2, i, group2, timing || inherit(node, id2));
34488
34572
  }
34489
34573
  }
34490
34574
  }
@@ -35704,7 +35788,7 @@ const SankeyChart = ({
35704
35788
  break;
35705
35789
  case TSankeyDataLabelPostion.right:
35706
35790
  xAndYCoordinate = [1, 5];
35707
- widthAndHeight = [maxNodeLabelWidth, innerHeight2];
35791
+ widthAndHeight = [innerWidth2 - maxNodeLabelWidth, innerHeight2];
35708
35792
  break;
35709
35793
  case TSankeyDataLabelPostion.left:
35710
35794
  xAndYCoordinate = [maxNodeLabelWidth, 5];
@@ -55211,7 +55295,8 @@ const WaterfallChart = ({
55211
55295
  dataTableHeight,
55212
55296
  innerWidth2,
55213
55297
  innerHeight2,
55214
- chartType
55298
+ chartType,
55299
+ chartId
55215
55300
  );
55216
55301
  initScale();
55217
55302
  initAxis();
@@ -55512,7 +55597,7 @@ const WaterfallChart = ({
55512
55597
  (d) => xScale(
55513
55598
  !isAdvancedWaterfall ? d.data.dimension || d.data.legend : d.data.xKey
55514
55599
  )
55515
- ).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr(
55600
+ ).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr("clip-path", `url(#${chartId}-clip)`).attr(
55516
55601
  "height",
55517
55602
  (d) => d[1] ? yScaleLeft(d[0]) - yScaleLeft(d[1]) : 0
55518
55603
  ).attr("width", xScale.bandwidth()).attr(
@@ -55571,6 +55656,7 @@ const WaterfallChart = ({
55571
55656
  }
55572
55657
  }
55573
55658
  });
55659
+ gTag.selectAll(".parentGroup").raise();
55574
55660
  };
55575
55661
  const setSVGContainer = (margin2) => {
55576
55662
  innerWidth2 = width - margin2.left - margin2.right;
@@ -55640,7 +55726,6 @@ const WaterfallChart = ({
55640
55726
  drawColumnChart();
55641
55727
  };
55642
55728
  const drawColumnChart = () => {
55643
- getChartType();
55644
55729
  initXaxis$1(
55645
55730
  gTag,
55646
55731
  chartJSON,
@@ -55658,6 +55743,7 @@ const WaterfallChart = ({
55658
55743
  chartJSON.legendList,
55659
55744
  xScale
55660
55745
  );
55746
+ getChartType();
55661
55747
  };
55662
55748
  const generateWaterFallData = () => {
55663
55749
  try {
@@ -55773,7 +55859,7 @@ const TornadoChart = ({
55773
55859
  const chartId = crypto.randomUUID();
55774
55860
  let columnWidth = 0;
55775
55861
  const chartType = chartTypes.TornadoChart;
55776
- const isAdvanceAnalyticsChart = data.IsadvanceanalyticsChart;
55862
+ const isAdvanceAnalyticsChart = data.IsadvanceanalyticsChart ?? data.IsCalCSensitivity;
55777
55863
  const svgRef = useRef();
55778
55864
  let seriesData = generalizedChartData(
55779
55865
  data.ChartData,
@@ -55913,26 +55999,8 @@ const TornadoChart = ({
55913
55999
  chartType
55914
56000
  );
55915
56001
  initScale();
55916
- initAxis();
55917
- initYaxisBar(
55918
- formatOptions,
55919
- gTag,
55920
- xLabel,
55921
- innerHeight2,
55922
- innerWidth2,
55923
- yAxisLeft,
55924
- yAxisRight,
55925
- xScale,
55926
- chartJSON.yMaxLeft,
55927
- chartJSON.dimensionList,
55928
- chartType,
55929
- isDateType,
55930
- width,
55931
- dimensionHeightWidthArray,
55932
- columnWidth,
55933
- yScaleLeft
55934
- );
55935
- horizontalScrollBar2(seriesData, height, svg, margin, innerWidth2);
56002
+ getXAxis();
56003
+ initXaxisBar(formatOptions, gTag, xLabel, innerHeight2, innerWidth2, xAxis);
55936
56004
  if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
55937
56005
  if (formatOptions.xAxisLabel.xAxisPosition != "1")
55938
56006
  formatOptions.xAxisLabel.xAxisLabelVisibility = false;
@@ -56014,6 +56082,21 @@ const TornadoChart = ({
56014
56082
  chartId,
56015
56083
  staticLegendShape.rectangle
56016
56084
  );
56085
+ horizontalScrollBar2(
56086
+ seriesData,
56087
+ height,
56088
+ width,
56089
+ svg,
56090
+ margin,
56091
+ innerWidth2,
56092
+ scrollbarVisible,
56093
+ visibleBars,
56094
+ chartJSON,
56095
+ scrollPosition,
56096
+ false,
56097
+ setAndUpdateChartData,
56098
+ barChart
56099
+ );
56017
56100
  };
56018
56101
  const mapSeriesDataWithLegendList = (seriesData2, legendList, isAdvanceAnalyticsChart2, formatOptions2) => {
56019
56102
  return seriesData2.map((series, index2) => {
@@ -56046,11 +56129,11 @@ const TornadoChart = ({
56046
56129
  const preProcessChartData = () => {
56047
56130
  let processedSeriesData;
56048
56131
  if (!isAdvanceAnalyticsChart) {
56049
- const firstMeasure = "0~$~" + seriesData[0]?.properties.currentMeasure;
56132
+ const firstMeasure = seriesData[0]?.properties?.measureUniqueId;
56050
56133
  let yMaxLeft = 0;
56051
56134
  let yMaxRight = -Infinity;
56052
56135
  processedSeriesData = seriesData.map((series, index2) => {
56053
- const isFirstMeasure = index2 + "~$~" + series.properties.currentMeasure === firstMeasure;
56136
+ const isFirstMeasure = series.properties.measureUniqueId === firstMeasure;
56054
56137
  const newData = series.data.map((point2) => {
56055
56138
  const newValue = isFirstMeasure ? -Math.abs(point2.value) : Math.abs(point2.value);
56056
56139
  return {
@@ -56086,47 +56169,67 @@ const TornadoChart = ({
56086
56169
  !isAdvanceAnalyticsChart ? processedSeriesData : seriesData
56087
56170
  )
56088
56171
  );
56089
- filteredDimension = !formatOptions.plotArea.fitChart ? chartJSON.dimensionList.slice(
56090
- scrollPosition,
56091
- scrollPosition + visibleBars
56092
- ) : chartJSON.dimensionList;
56172
+ seriesData = filteredData;
56173
+ filteredDimension = chartJSON.dimensionList;
56093
56174
  if (formatOptions.plotArea.hideZeroValues) {
56094
56175
  chartJSON.hideZeroValues = true;
56095
56176
  }
56096
56177
  };
56097
56178
  const initScale = () => {
56179
+ let min2 = chartJSON.yMaxLeft;
56180
+ let max2 = chartJSON.yMaxRight;
56181
+ let adjustedPosition = formatOptions.annotation.annotationVisibility != "5" && formatOptions.annotation.annotationPosition == "1" ? 20 : 0;
56182
+ let maxValue;
56098
56183
  let right2 = false;
56099
56184
  let left2 = false;
56100
- let maxValue;
56101
- if (chartJSON.yMaxLeft > chartJSON.yMaxRight) {
56102
- maxValue = chartJSON.yMaxLeft;
56185
+ if (min2 > max2) {
56186
+ maxValue = min2;
56103
56187
  right2 = true;
56104
56188
  } else {
56105
- maxValue = chartJSON.yMaxRight;
56189
+ maxValue = max2;
56106
56190
  left2 = true;
56107
56191
  }
56108
- let adjustedPosition = formatOptions.annotation.annotationVisibility != "5" && formatOptions.annotation.annotationPosition == "1" ? 20 : 0;
56109
- let scaleFactor = formatOptions.annotation.annotationVisibility != "5" ? chartJSON.yMaxLeft / maxValue !== 1 ? Math.abs(chartJSON.yMaxLeft / maxValue) * 100 < 10 ? 3 : 0 : Math.abs(chartJSON.yMaxRight / maxValue) * 100 < 10 ? 3 : 0 : 0;
56110
- chartJSON.yMaxLeft = chartJSON.yMaxLeft;
56111
- xScaleForLegends = linear$1().domain([
56112
- chartJSON.yMaxLeft * (1.2 + (left2 ? scaleFactor : 0)),
56113
- chartJSON.yMaxRight * (1.2 + (right2 ? scaleFactor : 0))
56114
- ]).range([adjustedPosition, innerWidth2 - adjustedPosition]);
56192
+ 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;
56193
+ let domainMin = 0;
56194
+ let domainMax = 0;
56195
+ if (min2 < 0 && max2 > 0) {
56196
+ domainMin = min2 * (1.2 + (left2 ? scaleFactor : 0));
56197
+ domainMax = max2 * (1.2 + (right2 ? scaleFactor : 0));
56198
+ } else if (min2 >= 0 && max2 >= 0) {
56199
+ domainMin = 0;
56200
+ domainMax = max2 * (1.2 + (right2 ? scaleFactor : 0));
56201
+ } else if (min2 <= 0 && max2 <= 0) {
56202
+ domainMin = min2 * (1.2 + (left2 ? scaleFactor : 0));
56203
+ domainMax = 0;
56204
+ } else {
56205
+ domainMin = min2 * 1.2;
56206
+ domainMax = max2 * 1.2;
56207
+ }
56208
+ domainMin = Math.floor(domainMin);
56209
+ domainMax = Math.ceil(domainMax);
56210
+ xScaleForLegends = linear$1().domain([domainMin, domainMax]).range([adjustedPosition, innerWidth2 - adjustedPosition]);
56115
56211
  xScale = xScaleForLegends;
56116
56212
  calculatedRange = [0, innerWidth2];
56117
56213
  getXScale();
56118
56214
  };
56119
56215
  const getXScale = () => {
56120
- yScaleLeft = point$7().domain(chartJSON.dimensionList).range([innerHeight2, 0]).padding(0.5);
56216
+ yScaleLeft = point$7().domain(filteredDimension).range([innerHeight2, 0]).padding(0.5);
56121
56217
  };
56122
56218
  const initAxis = () => {
56123
- getXAxis();
56124
56219
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
56125
- formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -(innerWidth2 - xScaleForLegends(0)) : 0 : 0
56126
- ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(chartJSON.dimensionList, innerHeight2));
56220
+ getHorizontalGridLinesTickSize(
56221
+ formatOptions,
56222
+ innerWidth2 - xScaleForLegends(0),
56223
+ 0
56224
+ )
56225
+ ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerHeight2));
56127
56226
  yAxisRight = axisRight(yScaleLeft).tickSize(
56128
- formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -xScaleForLegends(0) : 0 : 0
56129
- ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(chartJSON.dimensionList, innerWidth2));
56227
+ getHorizontalGridLinesTickSize(
56228
+ formatOptions,
56229
+ xScaleForLegends(0),
56230
+ 0
56231
+ )
56232
+ ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
56130
56233
  };
56131
56234
  const getXAxis = () => {
56132
56235
  xAxis = axisBottom(xScaleForLegends).tickFormat(
@@ -56198,7 +56301,7 @@ const TornadoChart = ({
56198
56301
  [
56199
56302
  {
56200
56303
  key: "Measure",
56201
- value: formatOptions.yAxisTitle.yAxisTitleHTML !== "" ? new DOMParser().parseFromString(formatOptions.yAxisTitle.yAxisTitleHTML, "text/html").body.textContent?.trim() : d.dimension
56304
+ value: formatOptions.yAxisTitle.yAxisTitleHTML !== "" ? new DOMParser().parseFromString(formatOptions.yAxisTitle.yAxisTitleHTML, "text/html").body.textContent?.trim() : !data.IsCalCSensitivity ? d.dimension : d.properties.currentMeasure.split("~$~")[1]
56202
56305
  },
56203
56306
  { key: "Legend", value: d.legendText },
56204
56307
  {
@@ -56214,7 +56317,7 @@ const TornadoChart = ({
56214
56317
  ],
56215
56318
  formatOptions,
56216
56319
  event2,
56217
- d.properties
56320
+ !data.IsCalCSensitivity ? d.properties : d.properties.legend === "Calculated Low(-ve)" ? { markerColor: formatOptions.plotArea.plotAreaCalculatedLow } : { markerColor: formatOptions.plotArea.plotAreaCalculatedHigh }
56218
56321
  );
56219
56322
  }).on("mouseout", hideTooltipOnMouseOut);
56220
56323
  };
@@ -56222,74 +56325,152 @@ const TornadoChart = ({
56222
56325
  innerWidth2 = width - margin2.left - margin2.right;
56223
56326
  innerHeight2 = height - margin2.bottom - margin2.top;
56224
56327
  };
56225
- const horizontalScrollBar2 = (seriesData2, height2, svg2, margin2, innerWidth22) => {
56226
- if (!formatOptions.plotArea.fitChart) {
56227
- const scrollMax = seriesData2[0].data.length - visibleBars;
56228
- const scrollbarY = height2 - 20;
56229
- filteredDimension = chartJSON.dimensionList.slice(
56230
- scrollPosition,
56231
- scrollPosition + visibleBars
56232
- );
56233
- getXScale();
56234
- filteredData = JSON.parse(JSON.stringify(seriesData2));
56235
- filteredData.forEach(
56236
- (data2, i) => filteredData[i].data = data2.data.filter(
56237
- (d) => filteredDimension.includes(d.dimension)
56238
- )
56239
- );
56240
- getXAxis();
56241
- svg2.append("rect").attr("x", margin2.left).attr("y", scrollbarY).attr("width", innerWidth22).attr("height", 8).attr("fill", "#ddd").attr("rx", 4);
56242
- const handleWidth = innerWidth22 * visibleBars / chartJSON.dimensionList.length;
56243
- const handle = svg2.append("rect").attr("x", margin2.left).attr("y", scrollbarY).attr("width", handleWidth).attr("height", 8).attr("fill", "#999").attr("rx", 4).style("cursor", "ew-resize").call(
56328
+ const setAndUpdateChartData = (fDimension, fData, fVisibleBars) => {
56329
+ filteredData = fData;
56330
+ filteredDimension = fDimension;
56331
+ visibleBars = fVisibleBars;
56332
+ drawColumnChart();
56333
+ };
56334
+ function createDataForAnnotation(chartData) {
56335
+ const legendUniqueIdToLegendMap = /* @__PURE__ */ new Map();
56336
+ chartData.forEach((d) => {
56337
+ let obj = legendUniqueIdToLegendMap.get(d.properties.legendUniqueId);
56338
+ if (obj) {
56339
+ let array2 = obj.data ?? [];
56340
+ array2.push(d.data[0]);
56341
+ legendUniqueIdToLegendMap.set(d.properties.legendUniqueId, { ...obj, data: array2 });
56342
+ } else {
56343
+ obj = {
56344
+ ...d,
56345
+ data: [d.data[0]]
56346
+ };
56347
+ legendUniqueIdToLegendMap.set(d.properties.legendUniqueId, obj);
56348
+ }
56349
+ });
56350
+ return legendUniqueIdToLegendMap.size > 0 ? Array.from(legendUniqueIdToLegendMap.keys()).map((d) => legendUniqueIdToLegendMap.get(d)) : chartData;
56351
+ }
56352
+ function horizontalScrollBar2(seriesData2, height2, width2, svg2, margin2, innerWidth22, scrollbarVisible2, visibleBars2, chartJSON2, scrollPosition2, isStackedChart, setAndUpdateChartData2, isBarChart = false) {
56353
+ const updateFromScrollPosition = (pos, scrollMax, handleWidth, handle, mouseEvent) => {
56354
+ try {
56355
+ mouseEvent && (pos = scrollPosition2 + pos);
56356
+ if (!chartJSON2 || !Array.isArray(chartJSON2.dimensionList) || !Array.isArray(seriesData2))
56357
+ return;
56358
+ pos = pos == null ? 0 : Number(pos);
56359
+ scrollMax = scrollMax == null ? 0 : Number(scrollMax);
56360
+ handleWidth = handleWidth == null ? 0 : Number(handleWidth);
56361
+ scrollPosition2 = clamp(Math.round(pos), 0, Math.max(0, scrollMax));
56362
+ visibleBars2 = typeof visibleBars2 === "number" ? visibleBars2 : 0;
56363
+ const start2 = scrollPosition2;
56364
+ const end = start2 + visibleBars2;
56365
+ let filteredDimension2 = chartJSON2.dimensionList.slice(start2, end);
56366
+ const isDefaultEntry = filteredDimension2[0] == chartTypes.TornadoDefaultEntry;
56367
+ let filteredData2 = JSON.parse(JSON.stringify(seriesData2 || []));
56368
+ filteredData2 = filteredData2.filter((d) => isDefaultEntry ? true : filteredDimension2.includes(d.legend.split(" - ")[1]));
56369
+ const safeMarginLeft = margin2?.left ?? 0;
56370
+ const safeMarginTop = margin2?.top ?? 0;
56371
+ const safeInnerWidth = Number(innerWidth22) || 0;
56372
+ const safeInnerHeight = Number(innerHeight2) || 0;
56373
+ const safeHandleSize = Number(handleWidth) || 0;
56374
+ const denom = scrollMax === 0 ? 1 : scrollMax;
56375
+ if (isBarChart) {
56376
+ const y2 = safeMarginTop + (safeInnerHeight - safeHandleSize) * (scrollMax === 0 ? 0 : scrollPosition2) / denom;
56377
+ if (handle && typeof handle.attr === "function") {
56378
+ handle.attr("y", y2);
56379
+ }
56380
+ } else {
56381
+ const x2 = safeMarginLeft + (safeInnerWidth - safeHandleSize) * (scrollMax === 0 ? 0 : scrollPosition2) / denom;
56382
+ if (handle && typeof handle.attr === "function") {
56383
+ handle.attr("x", x2);
56384
+ }
56385
+ }
56386
+ setAndUpdateChartData2(filteredDimension2, filteredData2, visibleBars2);
56387
+ } catch (error) {
56388
+ if (typeof logError$2 === "function")
56389
+ logError$2("ColumnChart", "updateFromScrollPosition", error);
56390
+ }
56391
+ };
56392
+ if (scrollbarVisible2) {
56393
+ const innerHeight22 = height2 - margin2.top - margin2.bottom;
56394
+ const scrollMax = Math.max(0, dimensionList.length - visibleBars2);
56395
+ const scrollbarY = height2 - 8;
56396
+ 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");
56397
+ const handleWidth = (isBarChart ? innerHeight22 : innerWidth22) * visibleBars2 / chartJSON2.dimensionList.length;
56398
+ const handle = svg2.append("rect").attr(
56399
+ "x",
56400
+ isBarChart ? width2 - 8 : margin2.left
56401
+ ).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");
56402
+ handle.call(
56244
56403
  drag$1().on("drag", (event2) => {
56245
- let x2 = Math.min(
56246
- Math.max(event2.x, margin2.left),
56247
- margin2.left + innerWidth22 - handleWidth
56248
- );
56249
- handle.attr("x", x2);
56250
- scrollPosition = Math.round(
56251
- (x2 - margin2.left) / (innerWidth22 - handleWidth) * scrollMax
56252
- );
56253
- filteredDimension = chartJSON.dimensionList.slice(
56254
- scrollPosition,
56255
- scrollPosition + visibleBars
56256
- );
56257
- getXScale();
56258
- filteredData = JSON.parse(JSON.stringify(seriesData2));
56259
- filteredData.forEach(
56260
- (data2, i) => filteredData[i].data = data2.data.filter(
56261
- (d) => filteredDimension.includes(d.dimension)
56262
- )
56263
- );
56264
- getXAxis();
56265
- drawColumnChart();
56404
+ if (isBarChart) {
56405
+ const y2 = clamp(
56406
+ event2.y,
56407
+ margin2.top,
56408
+ margin2.top + innerHeight22 - handleWidth
56409
+ );
56410
+ const pos = (y2 - margin2.top) / (innerHeight22 - handleWidth) * (scrollMax || 1);
56411
+ updateFromScrollPosition(pos, scrollMax, handleWidth, handle, false);
56412
+ handle.attr("y", margin2.top + (innerHeight22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax));
56413
+ } else {
56414
+ const x2 = clamp(
56415
+ event2.x,
56416
+ margin2.left,
56417
+ margin2.left + innerWidth22 - handleWidth
56418
+ );
56419
+ const pos = (x2 - margin2.left) / (innerWidth22 - handleWidth) * (scrollMax || 1);
56420
+ updateFromScrollPosition(pos, scrollMax, handleWidth, handle, false);
56421
+ handle.attr("x", margin2.left + (innerWidth22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax));
56422
+ }
56266
56423
  })
56267
56424
  );
56268
56425
  svg2.on("wheel", (event2) => {
56269
56426
  event2.preventDefault();
56270
56427
  const scrollDelta = Math.abs(event2.deltaX) > Math.abs(event2.deltaY) ? event2.deltaX : event2.deltaY;
56271
- scrollPosition += scrollDelta > 0 ? 1 : -1;
56272
- scrollPosition = Math.max(0, Math.min(scrollPosition, scrollMax));
56273
- const x2 = margin2.left + (innerWidth22 - handleWidth) * scrollPosition / scrollMax;
56274
- handle.attr("x", x2);
56275
- getXScale();
56276
- filteredData = JSON.parse(JSON.stringify(seriesData2));
56277
- filteredData.forEach(
56278
- (data2, i) => filteredData[i].data = data2.data.filter(
56279
- (d) => filteredDimension.includes(d.dimension)
56280
- )
56281
- );
56282
- getXAxis();
56283
- drawColumnChart();
56428
+ const step2 = scrollDelta > 0 ? 1 : -1;
56429
+ updateFromScrollPosition(step2, scrollMax, handleWidth, handle, true);
56430
+ if (isBarChart) {
56431
+ const y2 = margin2.top + (innerHeight22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax);
56432
+ handle.attr("y", y2);
56433
+ } else {
56434
+ const x2 = margin2.left + (innerWidth22 - handleWidth) * (scrollMax === 0 ? 0 : scrollPosition2) / (scrollMax === 0 ? 1 : scrollMax);
56435
+ handle.attr("x", x2);
56436
+ }
56284
56437
  });
56438
+ } else {
56439
+ svg2.on("wheel", null);
56285
56440
  }
56286
- drawColumnChart();
56287
- };
56441
+ updateFromScrollPosition(
56442
+ 0,
56443
+ 0,
56444
+ 0,
56445
+ null,
56446
+ true
56447
+ );
56448
+ }
56288
56449
  const drawColumnChart = () => {
56289
- initXaxisBar(formatOptions, gTag, xLabel, innerHeight2, innerWidth2, xAxis);
56450
+ getXScale();
56451
+ initAxis();
56452
+ initYaxisBar(
56453
+ formatOptions,
56454
+ gTag,
56455
+ xLabel,
56456
+ innerHeight2,
56457
+ innerWidth2,
56458
+ yAxisLeft,
56459
+ yAxisRight,
56460
+ xScale,
56461
+ chartJSON.yMaxLeft,
56462
+ filteredDimension,
56463
+ chartType,
56464
+ isDateType,
56465
+ width,
56466
+ dimensionHeightWidthArray,
56467
+ columnWidth,
56468
+ yScaleLeft
56469
+ );
56290
56470
  getChartType();
56471
+ const dataForAnnotation = createDataForAnnotation(filteredData);
56291
56472
  commonAnnotations(
56292
- filteredData,
56473
+ dataForAnnotation ?? [],
56293
56474
  yScaleLeft,
56294
56475
  xScale,
56295
56476
  null,
@@ -56329,7 +56510,7 @@ const TornadoChart = ({
56329
56510
  }
56330
56511
  ) });
56331
56512
  };
56332
- const ClevelandDotPlot = ({
56513
+ const DotPlot = ({
56333
56514
  isDateType,
56334
56515
  formatOptions,
56335
56516
  data,
@@ -56338,7 +56519,7 @@ const ClevelandDotPlot = ({
56338
56519
  }) => {
56339
56520
  const chartId = crypto.randomUUID();
56340
56521
  let columnWidth = 0;
56341
- const chartType = chartTypes.ClevelandDotPlot;
56522
+ const chartType = chartTypes.DotPlot;
56342
56523
  const svgRef = useRef();
56343
56524
  const seriesData = generalizedChartData(
56344
56525
  data.ChartData,
@@ -56395,16 +56576,16 @@ const ClevelandDotPlot = ({
56395
56576
  };
56396
56577
  useEffect(() => {
56397
56578
  try {
56398
- createStackHorizontalBarChart();
56579
+ createDotPlot();
56399
56580
  } catch (error) {
56400
56581
  logError$2(
56401
56582
  "StackStackHorizontalBarchart",
56402
- "createStackHorizontalBarChart",
56583
+ "createDotPlot",
56403
56584
  error
56404
56585
  );
56405
56586
  }
56406
56587
  }, [formatOptions]);
56407
- const createStackHorizontalBarChart = () => {
56588
+ const createDotPlot = () => {
56408
56589
  ({ formatOptions, svg, width, height } = firstFunctionBeforeRender$1(
56409
56590
  svgRef,
56410
56591
  formatOptions
@@ -56632,32 +56813,66 @@ const ClevelandDotPlot = ({
56632
56813
  };
56633
56814
  const getChartType = (lineData) => {
56634
56815
  lineData.forEach((lData) => {
56635
- lData.data.forEach((cData) => {
56636
- cData.hideZero = lData.properties.hideZeroValues;
56637
- cData.axis = lData.properties.axis;
56638
- cData["properties"] = lData.properties;
56816
+ lData.data.forEach((d) => {
56817
+ d.markerShape = lData.properties.markerShape || "Circle";
56818
+ d.markerSize = lData.properties.markerSize || 6;
56819
+ d.markerColor = lData.properties.markerColor || lData.properties.color;
56820
+ d.alias = lData.properties.alias;
56821
+ d.lineStyle = lData.properties.lineStyle;
56822
+ d.lineWidth = lData.properties.lineWidth;
56823
+ d.lineColor = formatOptions.plotArea.dotPlotLineColor ?? "#c7c7c7";
56639
56824
  });
56640
56825
  });
56641
- lineData.forEach((data2, index2) => {
56826
+ const groupedData = group(
56827
+ lineData.flatMap(
56828
+ (l) => l.data.map((d) => ({
56829
+ ...d,
56830
+ color: l.properties.color
56831
+ }))
56832
+ ),
56833
+ (d) => d.dimension
56834
+ );
56835
+ const lineGroups = gTag.selectAll(".cleveland-line-group").data(Array.from(groupedData), ([d]) => d);
56836
+ const lineEnter = lineGroups.enter().append("g").attr("class", "cleveland-line-group");
56837
+ lineEnter.append("line").merge(lineGroups.select("line")).attr("y1", ([dim]) => yScale(dim)).attr("y2", ([dim]) => yScale(dim)).attr(
56838
+ "x1",
56839
+ ([, v]) => xScaleBottom(Math.min(v[0]?.value ?? 0, v[1]?.value ?? 0))
56840
+ ).attr(
56841
+ "x2",
56842
+ ([, v]) => xScaleBottom(Math.max(v[0]?.value ?? 0, v[1]?.value ?? 0))
56843
+ ).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) => {
56844
+ switch (d[1][0].lineStyle) {
56845
+ case staticLineStyle.dotted:
56846
+ return "1,4";
56847
+ case staticLineStyle.dashed:
56848
+ return strokeDashValues;
56849
+ default:
56850
+ return "";
56851
+ }
56852
+ }).attr(
56853
+ "stroke-linecap",
56854
+ (d) => d[1][0].lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
56855
+ );
56856
+ lineGroups.exit().remove();
56857
+ lineData.forEach((data2) => {
56642
56858
  let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.properties.legendUniqueId);
56643
- column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
56644
- let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.dimension);
56645
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
56859
+ column = column.enter().append("g").attr("class", "parentGroup").attr(
56646
56860
  "hoverId",
56647
- (data2.properties.alias || data2.properties.name || "Legend").replace(
56648
- /\s+/g,
56649
- "-"
56650
- )
56651
- ).attr(
56652
- "transform",
56653
- (d) => `translate(0,${yScale(d.dimension)})`
56654
- );
56655
- columnGroupsEnter.merge(columnGroups).attr(
56656
- "transform",
56657
- (d) => `translate(0,${yScale(d.dimension)})`
56658
- );
56659
- columnGroupsEnter.append("line").attr("class", "cleveland-line").attr("x1", (d) => xScaleBottom(0)).attr("x2", (d) => xScaleBottom(d.value)).attr("y1", 0).attr("y2", 0).attr("stroke", "#c7c7c7").attr("stroke-width", 2);
56660
- columnGroupsEnter.append("circle").attr("class", "cleveland-dot").attr("cx", (d) => xScaleBottom(d.value)).attr("cy", 0).attr("r", 6).attr("fill", data2.properties.color).attr("opacity", 0.9).on("mousemove", (event2, d) => {
56861
+ (data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")
56862
+ ).merge(column);
56863
+ let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.dimension);
56864
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group");
56865
+ columnGroupsEnter.append("path").attr("class", "cleveland-dot").merge(columnGroups.select("path")).attr(
56866
+ "d",
56867
+ (d) => Symbol$1().type(Markershapes(d.markerShape)).size((d.markerSize || 6) * 70)()
56868
+ ).attr("transform", (d) => {
56869
+ const x2 = xScaleBottom(d.value);
56870
+ const y2 = yScale(d.dimension);
56871
+ return `translate(${x2},${y2})`;
56872
+ }).attr("fill", (d) => data2.properties.color).attr("opacity", 0.9).attr(
56873
+ "visibility",
56874
+ () => formatOptions.marker?.markerVisibility ? "visible" : "hidden"
56875
+ ).on("mousemove", (event2, d) => {
56661
56876
  showTooltipOnMouseMove(
56662
56877
  [
56663
56878
  {
@@ -56675,18 +56890,16 @@ const ClevelandDotPlot = ({
56675
56890
  },
56676
56891
  {
56677
56892
  key: "Legend",
56678
- value: d.legend
56893
+ value: d.alias
56679
56894
  }
56680
56895
  ],
56681
56896
  formatOptions,
56682
56897
  event2,
56683
56898
  data2.properties
56684
56899
  );
56685
- let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
56686
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
56687
- selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
56688
56900
  }).on("mouseout", () => {
56689
56901
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
56902
+ selectAll(".halo").remove();
56690
56903
  hideTooltipOnMouseOut();
56691
56904
  });
56692
56905
  columnGroups.exit().remove();
@@ -56701,9 +56914,9 @@ const ClevelandDotPlot = ({
56701
56914
  filteredData = fData;
56702
56915
  filteredDimension = fDimension;
56703
56916
  visibleBars = fVisibleBars;
56704
- drawLineChart();
56917
+ drawDotPlot();
56705
56918
  };
56706
- const drawLineChart = () => {
56919
+ const drawDotPlot = () => {
56707
56920
  getYScale();
56708
56921
  getYAxis();
56709
56922
  initYaxisBar(
@@ -56751,8 +56964,8 @@ const ClevelandDotPlot = ({
56751
56964
  onDataLabelCoordinatesChange,
56752
56965
  yScale,
56753
56966
  columnWidth,
56754
- false,
56755
56967
  isReportEditable,
56968
+ false,
56756
56969
  barChart
56757
56970
  );
56758
56971
  getConnectors();
@@ -56990,11 +57203,11 @@ const ClevelandDotPlot = ({
56990
57203
  export {
56991
57204
  AreaChart,
56992
57205
  BubbleChart,
56993
- ClevelandDotPlot,
56994
57206
  ColumnChart,
56995
57207
  ColumnHistogramChart,
56996
57208
  CustomColumnChart,
56997
57209
  DonutChart,
57210
+ DotPlot,
56998
57211
  HorizontalBarChart,
56999
57212
  HorizontalHistogramChart,
57000
57213
  LayeredColumnChart,