pace-chart-lib 1.0.16 → 1.0.18

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.
@@ -11882,14 +11882,14 @@
11882
11882
  svg.attr("viewBox", "0 0 " + width + " " + height);
11883
11883
  const { chartAreaColor, chartAreaBorder } = formatOptions.chartArea;
11884
11884
  svg.style("background-color", chartAreaColor);
11885
- const isBorderEnable = chartAreaBorder;
11886
- if (isBorderEnable) {
11887
- let borderColor = formatOptions.chartArea.chartAreaBorderColor;
11888
- let borderWidth = formatOptions.chartArea.chartAreaBorderThickness + "px";
11889
- let borderStyle = formatOptions.chartArea.chartAreaBorderStyle;
11890
- let border = borderStyle == "1" ? "solid" : borderStyle == "2" ? "dashed" : "dotted";
11891
- svg.style("outline", `${borderWidth} ${border} ${borderColor}`);
11892
- svg.style("outlineOffset", `-${borderWidth}`);
11885
+ if (chartAreaBorder) {
11886
+ const borderColor = formatOptions.chartArea.chartAreaBorderColor;
11887
+ const borderWidth = formatOptions.chartArea.chartAreaBorderThickness;
11888
+ const borderStyle = formatOptions.chartArea.chartAreaBorderStyle;
11889
+ const border = borderStyle === "1" ? "solid" : borderStyle === "2" ? "dashed" : "dotted";
11890
+ svg.style("outline", `${borderWidth}px ${border} ${borderColor}`).style("outline-offset", `-${borderWidth}px`);
11891
+ } else {
11892
+ svg.style("outline", "none").style("outline-offset", null);
11893
11893
  }
11894
11894
  }
11895
11895
  const firstFunctionBeforeRender$1 = (svgRef, chartformatOptions) => {
@@ -15126,13 +15126,7 @@
15126
15126
  )
15127
15127
  );
15128
15128
  let markerGroups = lines.selectAll(".lineGroup").data(chartData, (d) => d.legend);
15129
- let markerGroupsEnter = markerGroups.enter().append("g").attr("class", "parentGroup").attr("hoverId", (d) => {
15130
- if (Array.isArray(d.legend) && d.legend.length > 0) {
15131
- return d.legend.includes("~$~") ? d.legend.split("~$~")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
15132
- } else {
15133
- return d.legend.replace(/ /g, "-");
15134
- }
15135
- });
15129
+ let markerGroupsEnter = markerGroups.enter().append("g").attr("class", "parentGroup").attr("hoverId", (d) => (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-"));
15136
15130
  let mergedMarkerGroups = markerGroupsEnter.merge(markerGroups);
15137
15131
  mergedMarkerGroups.each(function(groupData) {
15138
15132
  const group = select$2(this);
@@ -15429,11 +15423,18 @@
15429
15423
  try {
15430
15424
  const markerColor = prop?.markerColor ?? "blue";
15431
15425
  const markerShape = prop?.markerShape.toLowerCase() ?? "circle";
15426
+ const isLightTheme = chartFormatOptions.toolTip.toolTipTheme === "Light";
15427
+ const bgColor = isLightTheme ? "rgba(255, 255, 255)" : "#272729ff";
15428
+ const textColor = isLightTheme ? "black" : "#ffffff";
15429
+ const subTextColor = isLightTheme ? "gray" : "#d1d5db";
15432
15430
  selectAll(".chartTooltip").style("visibility", "hidden");
15433
15431
  const tooltip = select$2("#chartTooltipDiv").html("").append("div").attr(
15434
15432
  "class",
15435
- chartFormatOptions.toolTip.toolTipTheme === "Light" ? "tooltipParentLight chartTooltip" : "tooltipParentDark chartTooltip"
15436
- ).style("color", "black").style("background", "rgba(255, 255, 255)").style("border", "0px solid #d4d4d4").style("border-radius", "4px").style("padding", "8px 12px").style("position", "absolute").style("box-shadow", "0px 4px 10px #240808ff").style("transition", "transform 0.1s ease, opacity 0.2s ease").style("position", "absolute");
15433
+ isLightTheme ? "tooltipParentLight chartTooltip" : "tooltipParentDark chartTooltip"
15434
+ ).style("color", textColor).style("background", bgColor).style("border", "0px solid #d4d4d4").style("border-radius", "4px").style("padding", "8px 12px").style("position", "absolute").style(
15435
+ "box-shadow",
15436
+ isLightTheme ? "0px 4px 10px #240808ff" : "0px 4px 12px rgba(0,0,0,0.6)"
15437
+ ).style("transition", "transform 0.1s ease, opacity 0.2s ease");
15437
15438
  const e = event2 || window.event;
15438
15439
  const mouseX = e.pageX;
15439
15440
  const mouseY = e.pageY;
@@ -15470,17 +15471,16 @@
15470
15471
  ${shapeStyle}
15471
15472
  "></span>
15472
15473
  <span style="
15473
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
15474
- font-size: 11px;
15475
- color: gray;
15476
- text-align:left;
15474
+ font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
15475
+ font-size:11px;
15476
+ color:${subTextColor};
15477
15477
  flex:1;
15478
15478
  ">${c2.key || ""}</span>
15479
15479
  <span style="
15480
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
15481
- font-size: 11px;
15482
- color: black;
15483
- font-weight: bold;
15480
+ font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
15481
+ font-size:11px;
15482
+ color:${textColor};
15483
+ font-weight:bold;
15484
15484
  margin-left:6px;
15485
15485
  ">${c2.value || ""}</span>
15486
15486
  </div>`;
@@ -15517,7 +15517,10 @@
15517
15517
  top2 = mouseY - tooltipHeight + 10;
15518
15518
  arrow = "right-bottom";
15519
15519
  }
15520
- tooltip.style("left", `${left2}px`).style("top", `${top2}px`).style("visibility", chartFormatOptions.toolTip.toolTipVisibility ? "visible" : "hidden").style("transform", "scale(1)").style("opacity", "1");
15520
+ tooltip.style("left", `${left2}px`).style("top", `${top2}px`).style(
15521
+ "visibility",
15522
+ chartFormatOptions.toolTip.toolTipVisibility ? "visible" : "hidden"
15523
+ ).style("transform", "scale(1)").style("opacity", "1");
15521
15524
  tooltip.select(".arrow-placeholder").attr("class", `arrow-${arrow}`);
15522
15525
  } catch (error) {
15523
15526
  logError$2(fileName$b, "showTooltipOnMouseMove", error);
@@ -15584,19 +15587,17 @@
15584
15587
  if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom)
15585
15588
  div.style("flex-direction", "row");
15586
15589
  seriesData.forEach((d, i) => {
15587
- let innerdiv = div.append("div").style("display", "inline-flex").style("justify-content", "flex-start").style("align-items", "center").style("width", "fit-content").style("margin", "3px 0px").style("flex-wrap", "nowrap").style("white-space", "nowrap").on("mousemove", function(d2) {
15590
+ let innerdiv = div.append("div").style("display", "inline-flex").style("justify-content", "flex-start").style("align-items", "center").style("width", "fit-content").style("margin", "3px 0px").style("flex-wrap", "nowrap").style("white-space", "nowrap").on("mousemove", function() {
15588
15591
  if (chartFormatOptions.legends.onHoverEffect) {
15589
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
15590
- selectAll(
15591
- '[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
15592
- ).classed("highlight", true).classed("unhighlight", false);
15592
+ const hoverId = this.textContent.replace(/\s+/g, "-");
15593
+ svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
15594
+ svg.selectAll(`[hoverId="${hoverId}"]`).classed("highlight", true).classed("unhighlight", false);
15593
15595
  }
15594
- }).on("mouseout", function(d2) {
15596
+ }).on("mouseout", function() {
15595
15597
  if (chartFormatOptions.legends.onHoverEffect) {
15596
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
15597
- selectAll(
15598
- '[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
15599
- ).classed("highlight", false).classed("unhighlight", false);
15598
+ const hoverId = this.textContent.replace(/\s+/g, "-");
15599
+ svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
15600
+ svg.selectAll(`[hoverId="${hoverId}"]`).classed("highlight", false).classed("unhighlight", false);
15600
15601
  }
15601
15602
  });
15602
15603
  if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom) {
@@ -16120,7 +16121,7 @@
16120
16121
  };
16121
16122
  const getHoverId = (inputText) => {
16122
16123
  try {
16123
- return inputText.includes("~$~") ? inputText.split("~$~")[1].replace(/ /g, "-") : inputText.replace(/ /g, "-");
16124
+ return inputText.includes("~$~") ? inputText.split("~$~")[1].replace(/ /g, "-") : inputText.replace(/\s+/g, "-");
16124
16125
  } catch (error) {
16125
16126
  return inputText;
16126
16127
  }
@@ -16520,10 +16521,7 @@
16520
16521
  let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
16521
16522
  column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
16522
16523
  let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
16523
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
16524
- "hoverId",
16525
- (d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
16526
- ).attr(
16524
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr("hoverId", (data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")).attr(
16527
16525
  "transform",
16528
16526
  (d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
16529
16527
  );
@@ -16554,7 +16552,7 @@
16554
16552
  return Math.abs(yScale(d.value) - yScale(0));
16555
16553
  });
16556
16554
  columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
16557
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
16555
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
16558
16556
  gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "visible");
16559
16557
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
16560
16558
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
@@ -16589,7 +16587,7 @@
16589
16587
  data2.properties
16590
16588
  );
16591
16589
  }).on("mouseout", (event2, d) => {
16592
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
16590
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
16593
16591
  gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "hidden");
16594
16592
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
16595
16593
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
@@ -18008,10 +18006,7 @@
18008
18006
  let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
18009
18007
  column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
18010
18008
  let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
18011
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
18012
- "hoverId",
18013
- (d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
18014
- ).attr(
18009
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr("hoverId", (data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")).attr(
18015
18010
  "transform",
18016
18011
  (d) => index2 === 0 ? `translate(${xScale(d.dimension) - columnWidth / 2}, 0)` : `translate(${xScale(d.dimension) - columnWidth / (2 + index2 * 2)}, 0)`
18017
18012
  );
@@ -18069,13 +18064,14 @@
18069
18064
  event2,
18070
18065
  d.properties
18071
18066
  );
18072
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
18067
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
18073
18068
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
18074
18069
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
18075
18070
  }).on("mouseout", (e, d) => {
18076
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
18071
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
18077
18072
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
18078
18073
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
18074
+ hideTooltipOnMouseOut();
18079
18075
  });
18080
18076
  columnGroups.exit().remove();
18081
18077
  });
@@ -19233,10 +19229,7 @@
19233
19229
  let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
19234
19230
  columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
19235
19231
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
19236
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
19237
- "hoverId",
19238
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
19239
- );
19232
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr("hoverId", (d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-"));
19240
19233
  columnGroups = columnGroupsEnter.merge(columnGroups);
19241
19234
  let rects = columnGroups.selectAll("rect").data((d) => d);
19242
19235
  const getPropsForRect = (nodes, i) => {
@@ -19290,14 +19283,14 @@
19290
19283
  );
19291
19284
  const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
19292
19285
  gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
19293
- const legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
19286
+ const legend = (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-");
19294
19287
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
19295
19288
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
19296
19289
  }).on("mouseout", (event2, d) => {
19297
19290
  hideTooltipOnMouseOut();
19298
19291
  const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
19299
19292
  gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
19300
- const legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
19293
+ const legend = (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-");
19301
19294
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
19302
19295
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
19303
19296
  });
@@ -20819,7 +20812,7 @@
20819
20812
  lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
20820
20813
  let lineGroups = lines.selectAll(".line-group").data((d) => d);
20821
20814
  let lineGroupsEnter = lineGroups.enter().append("g").attr("class", "line-group");
20822
- lineGroupsEnter.attr("hoverId", (d) => d.legend.replace(/ /g, "-")).append("path").attr("class", "visibleLine").attr("fill", "none");
20815
+ lineGroupsEnter.append("path").attr("class", "visibleLine").attr("fill", "none");
20823
20816
  lineGroupsEnter.merge(lineGroups).each(function(d) {
20824
20817
  const g = select$2(this);
20825
20818
  g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", (d2) => lineGenerator(d2.data)).attr(
@@ -20840,16 +20833,16 @@
20840
20833
  ).attr(
20841
20834
  "stroke-width",
20842
20835
  (d2) => d2.properties.lineStyle !== "None" ? 2.5 : 0
20843
- ).attr("d", (d2) => lineGenerator(d2.data));
20836
+ ).attr("hoverId", (d.properties.alias || lineGroups.properties.name || "Legend").replace(/\s+/g, "-")).attr("d", (d2) => lineGenerator(d2.data));
20844
20837
  g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => lineGenerator(d2.data)).attr("stroke", "transparent").attr("stroke-width", 20).attr("fill", "none").style("pointer-events", "stroke").on("mouseenter", function(event2, d2) {
20845
20838
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
20846
20839
  svg.selectAll(
20847
- '[hoverId="' + getJQuerySelector(d2.legend.replace(/ /g, "-")) + '"]'
20840
+ '[hoverId="' + getJQuerySelector(d2.properties.alias || d2.properties.name || "Legend").replace(/\s+/g, "-") + '"]'
20848
20841
  ).classed("highlight", true).classed("unhighlight", false);
20849
20842
  }).on("mouseleave", function(event2, d2) {
20850
20843
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
20851
20844
  svg.selectAll(
20852
- '[hoverId="' + getJQuerySelector(d2.legend.replace(/ /g, "-")) + '"]'
20845
+ '[hoverId="' + getJQuerySelector(d2.properties?.alias || d2.properties?.name || "Legend").replace(/\s+/g, "-") + '"]'
20853
20846
  ).classed("highlight", false).classed("unhighlight", false);
20854
20847
  });
20855
20848
  });
@@ -21328,13 +21321,10 @@
21328
21321
  lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
21329
21322
  let lineGroups = lines.selectAll(".line-group").data((d) => d);
21330
21323
  const lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
21331
- lineGroupsEnter.attr(
21332
- "hoverId",
21333
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
21334
- ).append("path").attr("class", "line").attr("fill", "none");
21324
+ lineGroupsEnter.append("path").attr("class", "line").attr("fill", "none");
21335
21325
  lineGroupsEnter.merge(lineGroups).each(function(d, i) {
21336
21326
  const g = select$2(this);
21337
- const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", lineGenerator(d)).attr("stroke", d.color !== "#ffffff" ? d.color : "none").attr(
21327
+ const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("hoverId", (d2) => (seriesData[i]?.properties?.alias || seriesData[i]?.properties?.name || "Legend").replace(/\s+/g, "-")).attr("d", lineGenerator(d)).attr("stroke", d.color !== "#ffffff" ? d.color : "none").attr(
21338
21328
  "stroke-dasharray",
21339
21329
  seriesData[i].properties.lineStyle === "dotted" ? "0,3" : seriesData[i].properties.lineStyle === "dashed" ? "20,10,5,5,5,10" : ""
21340
21330
  ).attr(
@@ -21351,9 +21341,7 @@
21351
21341
  g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke", "transparent").attr("stroke-width", 20).attr("fill", "none").style("pointer-events", "stroke").on("mouseenter", function() {
21352
21342
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
21353
21343
  svg.selectAll(
21354
- `[hoverId="${getJQuerySelector(
21355
- d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
21356
- )}"]`
21344
+ '[hoverId="' + getJQuerySelector(seriesData[i].properties.alias || seriesData[i].properties.name || "Legend").replace(/\s+/g, "-") + '"]'
21357
21345
  ).classed("highlight", true).classed("unhighlight", false);
21358
21346
  }).on("mouseleave", function() {
21359
21347
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
@@ -21825,10 +21813,7 @@
21825
21813
  lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
21826
21814
  let lineGroups = lines.selectAll(".line-group").data((d) => d);
21827
21815
  let lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
21828
- lineGroupsEnter.attr(
21829
- "hoverId",
21830
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
21831
- ).append("path").attr("class", "line").attr("fill", "none");
21816
+ lineGroupsEnter.attr("hoverId", (d) => (lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/\s+/g, "-")).append("path").attr("class", "line").attr("fill", "none");
21832
21817
  lineGroupsEnter.merge(lineGroups).each(function(d, i) {
21833
21818
  const g = select$2(this);
21834
21819
  const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", lineGenerator(d)).attr("stroke", d.color !== "#ffffff" ? d.color : "none").attr(
@@ -21845,20 +21830,12 @@
21845
21830
  {
21846
21831
  pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", 0);
21847
21832
  }
21848
- g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke", "transparent").attr("stroke-width", 20).attr("fill", "none").style("pointer-events", "stroke").on("mouseenter", function() {
21833
+ g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke", "transparent").attr("stroke-width", 20).attr("fill", "none").style("pointer-events", "stroke").on("mouseenter", function(event2, d2) {
21849
21834
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
21850
- svg.selectAll(
21851
- `[hoverId="${getJQuerySelector(
21852
- d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
21853
- )}"]`
21854
- ).classed("highlight", true).classed("unhighlight", false);
21855
- }).on("mouseleave", function() {
21835
+ svg.selectAll('[hoverId="' + getJQuerySelector(lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend").replace(/\s+/g, "-") + '"]').classed("highlight", true).classed("unhighlight", false);
21836
+ }).on("mouseleave", function(event2, d2) {
21856
21837
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
21857
- svg.selectAll(
21858
- `[hoverId="${getJQuerySelector(
21859
- d.key.split("~$~")[1].replace(/ /g, "-")
21860
- )}"]`
21861
- ).classed("highlight", false).classed("unhighlight", false);
21838
+ svg.selectAll('[hoverId="' + getJQuerySelector(lineData[d2.index]?.properties?.alias || d2[d2.index]?.properties?.name || "Legend").replace(/\s+/g, "-") + '"]').classed("highlight", false).classed("unhighlight", false);
21862
21839
  });
21863
21840
  });
21864
21841
  lineGroups.exit().remove();
@@ -22366,10 +22343,7 @@
22366
22343
  let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
22367
22344
  column = column.enter().append("g").attr("class", "column parentGroup").merge(column);
22368
22345
  let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
22369
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
22370
- "hoverId",
22371
- (d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
22372
- ).attr("transform", (d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`);
22346
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr("hoverId", (data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")).attr("transform", (d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`);
22373
22347
  columnGroups.attr("transform", (d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`);
22374
22348
  columnGroupsEnter.merge(columnGroups).attr("transform", (d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`);
22375
22349
  const bars = columnGroupsEnter.append("rect").attr("y", (d) => yScaleLegends(d.legend)).attr("height", yScaleLegends.bandwidth()).attr("x", (d) => {
@@ -22396,7 +22370,7 @@
22396
22370
  }
22397
22371
  });
22398
22372
  columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
22399
- const legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
22373
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
22400
22374
  gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "visible");
22401
22375
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
22402
22376
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
@@ -22427,7 +22401,7 @@
22427
22401
  data2.properties
22428
22402
  );
22429
22403
  }).on("mouseout", (event2, d) => {
22430
- const legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
22404
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
22431
22405
  gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "hidden");
22432
22406
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
22433
22407
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
@@ -22829,10 +22803,7 @@
22829
22803
  let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
22830
22804
  columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
22831
22805
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
22832
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
22833
- "hoverId",
22834
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
22835
- );
22806
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr("hoverId", (d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-"));
22836
22807
  columnGroups = columnGroupsEnter.merge(columnGroups);
22837
22808
  let rects = columnGroups.selectAll("rect").data((d) => d);
22838
22809
  const getPropsForRect = (nodes, i) => {
@@ -22878,13 +22849,13 @@
22878
22849
  event2,
22879
22850
  d.properties
22880
22851
  );
22881
- let legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
22852
+ let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
22882
22853
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
22883
22854
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
22884
22855
  }).on("mouseout", (event2, d) => {
22885
22856
  const dim = d.data.dimension;
22886
22857
  gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
22887
- let legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
22858
+ let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
22888
22859
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
22889
22860
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
22890
22861
  hideTooltipOnMouseOut();
@@ -23506,10 +23477,7 @@
23506
23477
  let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
23507
23478
  columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
23508
23479
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
23509
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
23510
- "hoverId",
23511
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
23512
- );
23480
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr("hoverId", (d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-"));
23513
23481
  columnGroups = columnGroupsEnter.merge(columnGroups);
23514
23482
  let rects = columnGroups.selectAll("rect").data((d) => d);
23515
23483
  const getPropsForRect = (nodes, i) => {
@@ -23552,11 +23520,11 @@
23552
23520
  event2,
23553
23521
  d.properties
23554
23522
  );
23555
- const legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
23523
+ let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
23556
23524
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
23557
23525
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
23558
23526
  }).on("mouseout", (event2, d) => {
23559
- const legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
23527
+ let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
23560
23528
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
23561
23529
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
23562
23530
  gTag.select(`#dim-background-${d.data.dimension}`).attr("visibility", "hidden");
@@ -23978,10 +23946,7 @@
23978
23946
  let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
23979
23947
  column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
23980
23948
  let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
23981
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
23982
- "hoverId",
23983
- (d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
23984
- ).attr(
23949
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr("hoverId", (data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")).attr(
23985
23950
  "transform",
23986
23951
  (d) => index2 === 0 ? `translate(0,${yScale(d.dimension) - columnWidth / 2})` : `translate(0,${yScale(d.dimension) - columnWidth / (2 + index2 * 2)})`
23987
23952
  );
@@ -24038,11 +24003,11 @@
24038
24003
  event2,
24039
24004
  data2.properties
24040
24005
  );
24041
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
24006
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
24042
24007
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
24043
24008
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
24044
24009
  }).on("mouseout", (e, d) => {
24045
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
24010
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
24046
24011
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
24047
24012
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
24048
24013
  hideTooltipOnMouseOut();
@@ -25168,10 +25133,10 @@
25168
25133
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
25169
25134
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
25170
25135
  let areaGroupsEnter = areaGroups.enter().append("g").attr("class", "area-group");
25171
- areaGroupsEnter.append("path").attr("hoverId", (d) => d.legend.replace(/ /g, "-")).attr("class", "area parentGroup").attr(
25136
+ areaGroupsEnter.append("path").attr("class", "area parentGroup").attr(
25172
25137
  "fill",
25173
25138
  (d) => d.properties.color !== "#ffffff" ? d.properties.color : "none"
25174
- ).style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => areaGeneratorStart(d.data)).each(function(d) {
25139
+ ).style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("hoverId", (d) => (d.properties?.alias || d.properties?.name || "Legend").replace(/\s+/g, "-")).attr("d", (d) => areaGeneratorStart(d.data)).each(function(d) {
25175
25140
  {
25176
25141
  select$2(this).attr("d", areaGenerator(d.data));
25177
25142
  }
@@ -25200,7 +25165,7 @@
25200
25165
  g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2.data)).attr("fill", "transparent").attr("stroke", "none").style("pointer-events", "all").raise().on("mouseenter", function(event2, d2) {
25201
25166
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true).attr("stroke-width", "2.5");
25202
25167
  svg.selectAll(
25203
- `[hoverId="${getJQuerySelector(d2.legend.replace(/ /g, "-"))}"]`
25168
+ '[hoverId="' + getJQuerySelector(d2.properties?.alias || d2.properties?.name || "Legend").replace(/\s+/g, "-") + '"]'
25204
25169
  ).classed("highlight", true).classed("unhighlight", false).attr("stroke-width", "3.5");
25205
25170
  }).on("mouseleave", function(event2, d2) {
25206
25171
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false).attr("stroke-width", "2.5");
@@ -25707,10 +25672,7 @@
25707
25672
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
25708
25673
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
25709
25674
  let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
25710
- areaGroupsEnter.append("path").attr(
25711
- "hoverId",
25712
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
25713
- ).attr("class", "area parentGroup").attr("fill", (d) => d.color !== "#ffffff" ? d.color : "none").style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => areaGeneratorStart(d)).each(function(d) {
25675
+ areaGroupsEnter.append("path").attr("hoverId", (d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")).attr("class", "area parentGroup").attr("fill", (d) => d.color !== "#ffffff" ? d.color : "none").style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => areaGeneratorStart(d)).each(function(d) {
25714
25676
  {
25715
25677
  select$2(this).attr("d", areaGenerator(d));
25716
25678
  }
@@ -25737,13 +25699,13 @@
25737
25699
  g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2)).attr("fill", "transparent").attr("stroke", "none").style("pointer-events", "all").raise().on("mouseenter", function(event2, d2) {
25738
25700
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
25739
25701
  svg.selectAll(
25740
- '[hoverId="' + getJQuerySelector(d2.key.split("~$~")[1].replace(/ /g, "-")) + '"]'
25702
+ '[hoverId="' + (seriesData[d2.index]?.properties?.alias || seriesData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-") + '"]'
25741
25703
  ).classed("highlight", true).classed("unhighlight", false);
25742
25704
  }).on("mouseleave", function() {
25743
25705
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
25744
25706
  });
25745
25707
  svg.selectAll(
25746
- '[hoverId="' + getJQuerySelector(d.key.split("~$~")[1].replace(/ /g, "-")) + '"]'
25708
+ '[hoverId="' + (seriesData[d.index].properties.alias || seriesData[d.index].properties.name || "Legend").replace(/ /g, "-") + '"]'
25747
25709
  ).classed("highlight", false).classed("unhighlight", false);
25748
25710
  });
25749
25711
  areaGroups.exit().remove();
@@ -26242,10 +26204,7 @@
26242
26204
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
26243
26205
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
26244
26206
  let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
26245
- areaGroupsEnter.append("path").attr(
26246
- "hoverId",
26247
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
26248
- ).attr("class", "area parentGroup").attr("fill", (d) => d.color !== "#ffffff" ? d.color : "none").style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => columnGeneratorStart(d)).each(function(d) {
26207
+ areaGroupsEnter.append("path").attr("hoverId", (d) => (lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/\s+/g, "-")).attr("class", "area parentGroup").attr("fill", (d) => d.color !== "#ffffff" ? d.color : "none").style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => columnGeneratorStart(d)).each(function(d) {
26249
26208
  const path2 = select$2(this);
26250
26209
  {
26251
26210
  path2.attr("d", columnGenerator(d));
@@ -26273,13 +26232,13 @@
26273
26232
  g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => columnGenerator(d2)).attr("fill", "transparent").style("pointer-events", "all").raise().on("mouseenter", function(event2, d2) {
26274
26233
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
26275
26234
  svg.selectAll(
26276
- '[hoverId="' + getJQuerySelector(d2.key.split("~$~")[1].replace(/ /g, "-")) + '"]'
26235
+ '[hoverId="' + getJQuerySelector((lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-")) + '"]'
26277
26236
  ).classed("highlight", true).classed("unhighlight", false);
26278
26237
  }).on("mouseleave", function() {
26279
26238
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
26280
26239
  });
26281
26240
  svg.selectAll(
26282
- '[hoverId="' + getJQuerySelector(d.key.split("~$~")[1].replace(/ /g, "-")) + '"]'
26241
+ '[hoverId="' + getJQuerySelector((lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/ /g, "-")) + '"]'
26283
26242
  ).classed("highlight", false).classed("unhighlight", false);
26284
26243
  });
26285
26244
  areaGroups.exit().remove();
@@ -26656,7 +26615,7 @@
26656
26615
  try {
26657
26616
  const arc2 = arc$1().innerRadius(0).outerRadius(radius);
26658
26617
  const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
26659
- chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`).selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr(
26618
+ chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`).selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr("hoverId", (d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")).attr(
26660
26619
  "fill",
26661
26620
  (d) => d.data.properties.color !== "#ffffff" ? d.data.properties.color : "none"
26662
26621
  ).attr("d", (d) => arc2(d)).on("mouseover.arc", function(d) {
@@ -26729,7 +26688,7 @@
26729
26688
  pieChartData.filter(
26730
26689
  (d) => d.data.properties.dataLabelPosition == "1"
26731
26690
  )
26732
- ).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr("fill", (d) => d.data.properties?.labelFontColor ?? "#000000").attr(
26691
+ ).enter().append("text").attr("hoverId", (d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr("fill", (d) => d.data.properties?.labelFontColor ?? "#000000").attr(
26733
26692
  "font-style",
26734
26693
  (d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
26735
26694
  ).attr(
@@ -26754,7 +26713,7 @@
26754
26713
  pieChartData.filter(
26755
26714
  (d) => d.data.properties.dataLabelPosition == "1"
26756
26715
  )
26757
- ).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr("fill", (d) => d.data.properties?.valueFontColor ?? "#000000").attr(
26716
+ ).enter().append("text").attr("hoverId", (d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr("fill", (d) => d.data.properties?.valueFontColor ?? "#000000").attr(
26758
26717
  "font-style",
26759
26718
  (d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
26760
26719
  ).attr(
@@ -26835,7 +26794,7 @@
26835
26794
  const textWidth = 80;
26836
26795
  const xOffset = midangle < Math.PI ? 0 : -textWidth;
26837
26796
  return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
26838
- }).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px").html((d) => {
26797
+ }).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr("hoverId", (d) => (d.data.properties.alias || d.data.properties.name || "Legend").replace(/\s+/g, "-")).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px").html((d) => {
26839
26798
  let value2 = d.data.data[0].value.toString();
26840
26799
  if (d.data.data[0].value !== void 0) {
26841
26800
  value2 = chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%" ? (Math.abs(d.data[0].value / pieTotalValue) * 100).toFixed(
@@ -26996,7 +26955,7 @@
26996
26955
  let rotationAngle = convertStringToNumber(
26997
26956
  chartFormatOptions.plotArea.rotation
26998
26957
  );
26999
- const pie$1 = pie().value((d) => d.data[0].value).startAngle((rotationAngle ?? 0) * (Math.PI / 180) % 360).endAngle(((rotationAngle ?? 0) + 360) * (Math.PI / 180) % 360);
26958
+ const pie$1 = pie().sort(null).value((d) => d.data[0].value).startAngle((rotationAngle ?? 0) * (Math.PI / 180) % 360).endAngle(((rotationAngle ?? 0) + 360) * (Math.PI / 180) % 360);
27000
26959
  let pieData = pie$1(seriesData);
27001
26960
  pieChartData = pieData?.map((d, i) => ({
27002
26961
  ...d,
@@ -27017,7 +26976,7 @@
27017
26976
  const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius);
27018
26977
  const arcOver = arc$1().innerRadius(innerRadius).outerRadius(radius + 10);
27019
26978
  const parentGroup = chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`);
27020
- const paths = parentGroup.selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr(
26979
+ const paths = parentGroup.selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr("hoverId", (d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")).attr(
27021
26980
  "fill",
27022
26981
  (d) => d.data.properties.color !== "#ffffff" ? d.data.properties.color : "none"
27023
26982
  ).each(function(d) {
@@ -27101,7 +27060,7 @@
27101
27060
  pieChartData.filter(
27102
27061
  (d) => d.data.properties.dataLabelPosition == "1"
27103
27062
  )
27104
- ).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr("fill", (d) => d.data.properties?.labelFontColor ?? "#000000").attr(
27063
+ ).enter().append("text").attr("hoverId", (d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr("fill", (d) => d.data.properties?.labelFontColor ?? "#000000").attr(
27105
27064
  "font-style",
27106
27065
  (d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
27107
27066
  ).attr(
@@ -27126,7 +27085,7 @@
27126
27085
  pieChartData.filter(
27127
27086
  (d) => d.data.properties.dataLabelPosition == "1"
27128
27087
  )
27129
- ).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr("fill", (d) => d.data.properties?.lableFontColor ?? "#000000").attr(
27088
+ ).enter().append("text").attr("hoverId", (d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr("fill", (d) => d.data.properties?.lableFontColor ?? "#000000").attr(
27130
27089
  "font-style",
27131
27090
  (d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
27132
27091
  ).attr(
@@ -27207,7 +27166,7 @@
27207
27166
  const textWidth = 80;
27208
27167
  const xOffset = midangle < Math.PI ? 0 : -textWidth;
27209
27168
  return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
27210
- }).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px");
27169
+ }).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr("hoverId", (d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px");
27211
27170
  }
27212
27171
  } catch (error) {
27213
27172
  logError$2(fileName$7, "drawDonutDataLabels", error);
@@ -27381,6 +27340,23 @@
27381
27340
  logError$2(fileName$6, "getColor", error);
27382
27341
  }
27383
27342
  };
27343
+ const getMarkerColorForTooltip = (d) => {
27344
+ try {
27345
+ const props = d?.currentTarget?.__data__?.data?.properties;
27346
+ if (!props) return;
27347
+ switch (chartFormatOptions.colorScale.showColor) {
27348
+ case colorThemeTypes.none:
27349
+ return { ...props, markerColor: defaultColor };
27350
+ case colorThemeTypes.colorTheme:
27351
+ return { ...props, markerColor: props.themeColor };
27352
+ case colorThemeTypes.discrete:
27353
+ default:
27354
+ return props;
27355
+ }
27356
+ } catch (error) {
27357
+ logError$2(fileName$6, "getMarkerColorForTooltip", error);
27358
+ }
27359
+ };
27384
27360
  const initChartRect = () => {
27385
27361
  try {
27386
27362
  const leaf = chartAreaTagG.selectAll("g").data(chartData).enter().append("g").attr("transform", (d) => `translate(${d.x0},${d.y0})`);
@@ -27395,19 +27371,11 @@
27395
27371
  chartFormatOptions.toolTip.toolTipDecimalPrecision
27396
27372
  )(data2.data.data[0].value)
27397
27373
  },
27398
- { key: "Legend", value: data2.data.data[0].legend },
27399
- data2.data.data[1] ? {
27400
- key: data2.data.data[1].legend,
27401
- value: getNumberWithFormatFunction(
27402
- chartFormatOptions.toolTip.toolTipDisplayUnits,
27403
- chartFormatOptions.toolTip.toolTipNumberFormat,
27404
- chartFormatOptions.toolTip.toolTipDecimalPrecision
27405
- )(data2.data.data[1].value)
27406
- } : ""
27374
+ { key: "Legend", value: data2.data.data[0].legend }
27407
27375
  ],
27408
27376
  chartFormatOptions,
27409
27377
  void 0,
27410
- d.currentTarget.__data__.data.properties
27378
+ getMarkerColorForTooltip(d)
27411
27379
  );
27412
27380
  }).on("mouseout", () => hideTooltipOnMouseOut());
27413
27381
  leaf.append("clipPath").attr("id", (d, i) => `clip-${i}-${chartId}`).append("rect").attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0);