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.
@@ -11879,14 +11879,14 @@ function initSvg$1(svg, width, height, formatOptions) {
11879
11879
  svg.attr("viewBox", "0 0 " + width + " " + height);
11880
11880
  const { chartAreaColor, chartAreaBorder } = formatOptions.chartArea;
11881
11881
  svg.style("background-color", chartAreaColor);
11882
- const isBorderEnable = chartAreaBorder;
11883
- if (isBorderEnable) {
11884
- let borderColor = formatOptions.chartArea.chartAreaBorderColor;
11885
- let borderWidth = formatOptions.chartArea.chartAreaBorderThickness + "px";
11886
- let borderStyle = formatOptions.chartArea.chartAreaBorderStyle;
11887
- let border = borderStyle == "1" ? "solid" : borderStyle == "2" ? "dashed" : "dotted";
11888
- svg.style("outline", `${borderWidth} ${border} ${borderColor}`);
11889
- svg.style("outlineOffset", `-${borderWidth}`);
11882
+ if (chartAreaBorder) {
11883
+ const borderColor = formatOptions.chartArea.chartAreaBorderColor;
11884
+ const borderWidth = formatOptions.chartArea.chartAreaBorderThickness;
11885
+ const borderStyle = formatOptions.chartArea.chartAreaBorderStyle;
11886
+ const border = borderStyle === "1" ? "solid" : borderStyle === "2" ? "dashed" : "dotted";
11887
+ svg.style("outline", `${borderWidth}px ${border} ${borderColor}`).style("outline-offset", `-${borderWidth}px`);
11888
+ } else {
11889
+ svg.style("outline", "none").style("outline-offset", null);
11890
11890
  }
11891
11891
  }
11892
11892
  const firstFunctionBeforeRender$1 = (svgRef, chartformatOptions) => {
@@ -15123,13 +15123,7 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
15123
15123
  )
15124
15124
  );
15125
15125
  let markerGroups = lines.selectAll(".lineGroup").data(chartData, (d) => d.legend);
15126
- let markerGroupsEnter = markerGroups.enter().append("g").attr("class", "parentGroup").attr("hoverId", (d) => {
15127
- if (Array.isArray(d.legend) && d.legend.length > 0) {
15128
- return d.legend.includes("~$~") ? d.legend.split("~$~")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
15129
- } else {
15130
- return d.legend.replace(/ /g, "-");
15131
- }
15132
- });
15126
+ let markerGroupsEnter = markerGroups.enter().append("g").attr("class", "parentGroup").attr("hoverId", (d) => (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-"));
15133
15127
  let mergedMarkerGroups = markerGroupsEnter.merge(markerGroups);
15134
15128
  mergedMarkerGroups.each(function(groupData) {
15135
15129
  const group = select$2(this);
@@ -15426,11 +15420,18 @@ function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
15426
15420
  try {
15427
15421
  const markerColor = prop?.markerColor ?? "blue";
15428
15422
  const markerShape = prop?.markerShape.toLowerCase() ?? "circle";
15423
+ const isLightTheme = chartFormatOptions.toolTip.toolTipTheme === "Light";
15424
+ const bgColor = isLightTheme ? "rgba(255, 255, 255)" : "#272729ff";
15425
+ const textColor = isLightTheme ? "black" : "#ffffff";
15426
+ const subTextColor = isLightTheme ? "gray" : "#d1d5db";
15429
15427
  selectAll(".chartTooltip").style("visibility", "hidden");
15430
15428
  const tooltip = select$2("#chartTooltipDiv").html("").append("div").attr(
15431
15429
  "class",
15432
- chartFormatOptions.toolTip.toolTipTheme === "Light" ? "tooltipParentLight chartTooltip" : "tooltipParentDark chartTooltip"
15433
- ).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");
15430
+ isLightTheme ? "tooltipParentLight chartTooltip" : "tooltipParentDark chartTooltip"
15431
+ ).style("color", textColor).style("background", bgColor).style("border", "0px solid #d4d4d4").style("border-radius", "4px").style("padding", "8px 12px").style("position", "absolute").style(
15432
+ "box-shadow",
15433
+ isLightTheme ? "0px 4px 10px #240808ff" : "0px 4px 12px rgba(0,0,0,0.6)"
15434
+ ).style("transition", "transform 0.1s ease, opacity 0.2s ease");
15434
15435
  const e = event2 || window.event;
15435
15436
  const mouseX = e.pageX;
15436
15437
  const mouseY = e.pageY;
@@ -15467,17 +15468,16 @@ function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
15467
15468
  ${shapeStyle}
15468
15469
  "></span>
15469
15470
  <span style="
15470
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
15471
- font-size: 11px;
15472
- color: gray;
15473
- text-align:left;
15471
+ font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
15472
+ font-size:11px;
15473
+ color:${subTextColor};
15474
15474
  flex:1;
15475
15475
  ">${c2.key || ""}</span>
15476
15476
  <span style="
15477
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
15478
- font-size: 11px;
15479
- color: black;
15480
- font-weight: bold;
15477
+ font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
15478
+ font-size:11px;
15479
+ color:${textColor};
15480
+ font-weight:bold;
15481
15481
  margin-left:6px;
15482
15482
  ">${c2.value || ""}</span>
15483
15483
  </div>`;
@@ -15514,7 +15514,10 @@ function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
15514
15514
  top2 = mouseY - tooltipHeight + 10;
15515
15515
  arrow = "right-bottom";
15516
15516
  }
15517
- tooltip.style("left", `${left2}px`).style("top", `${top2}px`).style("visibility", chartFormatOptions.toolTip.toolTipVisibility ? "visible" : "hidden").style("transform", "scale(1)").style("opacity", "1");
15517
+ tooltip.style("left", `${left2}px`).style("top", `${top2}px`).style(
15518
+ "visibility",
15519
+ chartFormatOptions.toolTip.toolTipVisibility ? "visible" : "hidden"
15520
+ ).style("transform", "scale(1)").style("opacity", "1");
15518
15521
  tooltip.select(".arrow-placeholder").attr("class", `arrow-${arrow}`);
15519
15522
  } catch (error) {
15520
15523
  logError$2(fileName$b, "showTooltipOnMouseMove", error);
@@ -15581,19 +15584,17 @@ const legendsWithScroll = (svg, seriesData, x2, y2, width, height, legendPositio
15581
15584
  if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom)
15582
15585
  div.style("flex-direction", "row");
15583
15586
  seriesData.forEach((d, i) => {
15584
- 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) {
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() {
15585
15588
  if (chartFormatOptions.legends.onHoverEffect) {
15586
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
15587
- selectAll(
15588
- '[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
15589
- ).classed("highlight", true).classed("unhighlight", false);
15589
+ const hoverId = this.textContent.replace(/\s+/g, "-");
15590
+ svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
15591
+ svg.selectAll(`[hoverId="${hoverId}"]`).classed("highlight", true).classed("unhighlight", false);
15590
15592
  }
15591
- }).on("mouseout", function(d2) {
15593
+ }).on("mouseout", function() {
15592
15594
  if (chartFormatOptions.legends.onHoverEffect) {
15593
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
15594
- selectAll(
15595
- '[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
15596
- ).classed("highlight", false).classed("unhighlight", false);
15595
+ const hoverId = this.textContent.replace(/\s+/g, "-");
15596
+ svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
15597
+ svg.selectAll(`[hoverId="${hoverId}"]`).classed("highlight", false).classed("unhighlight", false);
15597
15598
  }
15598
15599
  });
15599
15600
  if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom) {
@@ -16117,7 +16118,7 @@ const connectorNumberFormat = (numerator, denominator, decimalValues, numberForm
16117
16118
  };
16118
16119
  const getHoverId = (inputText) => {
16119
16120
  try {
16120
- return inputText.includes("~$~") ? inputText.split("~$~")[1].replace(/ /g, "-") : inputText.replace(/ /g, "-");
16121
+ return inputText.includes("~$~") ? inputText.split("~$~")[1].replace(/ /g, "-") : inputText.replace(/\s+/g, "-");
16121
16122
  } catch (error) {
16122
16123
  return inputText;
16123
16124
  }
@@ -16517,10 +16518,7 @@ const ColumnChart = ({
16517
16518
  let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
16518
16519
  column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
16519
16520
  let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
16520
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
16521
- "hoverId",
16522
- (d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
16523
- ).attr(
16521
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr("hoverId", (data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")).attr(
16524
16522
  "transform",
16525
16523
  (d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
16526
16524
  );
@@ -16551,7 +16549,7 @@ const ColumnChart = ({
16551
16549
  return Math.abs(yScale(d.value) - yScale(0));
16552
16550
  });
16553
16551
  columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
16554
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
16552
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
16555
16553
  gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "visible");
16556
16554
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
16557
16555
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
@@ -16586,7 +16584,7 @@ const ColumnChart = ({
16586
16584
  data2.properties
16587
16585
  );
16588
16586
  }).on("mouseout", (event2, d) => {
16589
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
16587
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
16590
16588
  gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "hidden");
16591
16589
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
16592
16590
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
@@ -18005,10 +18003,7 @@ const LayeredColumnChart = ({
18005
18003
  let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
18006
18004
  column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
18007
18005
  let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
18008
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
18009
- "hoverId",
18010
- (d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
18011
- ).attr(
18006
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr("hoverId", (data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")).attr(
18012
18007
  "transform",
18013
18008
  (d) => index2 === 0 ? `translate(${xScale(d.dimension) - columnWidth / 2}, 0)` : `translate(${xScale(d.dimension) - columnWidth / (2 + index2 * 2)}, 0)`
18014
18009
  );
@@ -18066,13 +18061,14 @@ const LayeredColumnChart = ({
18066
18061
  event2,
18067
18062
  d.properties
18068
18063
  );
18069
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
18064
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
18070
18065
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
18071
18066
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
18072
18067
  }).on("mouseout", (e, d) => {
18073
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
18068
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
18074
18069
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
18075
18070
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
18071
+ hideTooltipOnMouseOut();
18076
18072
  });
18077
18073
  columnGroups.exit().remove();
18078
18074
  });
@@ -19230,10 +19226,7 @@ const NormalizedStackColumnChart = ({
19230
19226
  let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
19231
19227
  columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
19232
19228
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
19233
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
19234
- "hoverId",
19235
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
19236
- );
19229
+ 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, "-"));
19237
19230
  columnGroups = columnGroupsEnter.merge(columnGroups);
19238
19231
  let rects = columnGroups.selectAll("rect").data((d) => d);
19239
19232
  const getPropsForRect = (nodes, i) => {
@@ -19287,14 +19280,14 @@ const NormalizedStackColumnChart = ({
19287
19280
  );
19288
19281
  const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
19289
19282
  gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
19290
- const legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
19283
+ const legend = (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-");
19291
19284
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
19292
19285
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
19293
19286
  }).on("mouseout", (event2, d) => {
19294
19287
  hideTooltipOnMouseOut();
19295
19288
  const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
19296
19289
  gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
19297
- const legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
19290
+ const legend = (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-");
19298
19291
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
19299
19292
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
19300
19293
  });
@@ -20816,7 +20809,7 @@ const LineChart = ({
20816
20809
  lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
20817
20810
  let lineGroups = lines.selectAll(".line-group").data((d) => d);
20818
20811
  let lineGroupsEnter = lineGroups.enter().append("g").attr("class", "line-group");
20819
- lineGroupsEnter.attr("hoverId", (d) => d.legend.replace(/ /g, "-")).append("path").attr("class", "visibleLine").attr("fill", "none");
20812
+ lineGroupsEnter.append("path").attr("class", "visibleLine").attr("fill", "none");
20820
20813
  lineGroupsEnter.merge(lineGroups).each(function(d) {
20821
20814
  const g = select$2(this);
20822
20815
  g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", (d2) => lineGenerator(d2.data)).attr(
@@ -20837,16 +20830,16 @@ const LineChart = ({
20837
20830
  ).attr(
20838
20831
  "stroke-width",
20839
20832
  (d2) => d2.properties.lineStyle !== "None" ? 2.5 : 0
20840
- ).attr("d", (d2) => lineGenerator(d2.data));
20833
+ ).attr("hoverId", (d.properties.alias || lineGroups.properties.name || "Legend").replace(/\s+/g, "-")).attr("d", (d2) => lineGenerator(d2.data));
20841
20834
  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) {
20842
20835
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
20843
20836
  svg.selectAll(
20844
- '[hoverId="' + getJQuerySelector(d2.legend.replace(/ /g, "-")) + '"]'
20837
+ '[hoverId="' + getJQuerySelector(d2.properties.alias || d2.properties.name || "Legend").replace(/\s+/g, "-") + '"]'
20845
20838
  ).classed("highlight", true).classed("unhighlight", false);
20846
20839
  }).on("mouseleave", function(event2, d2) {
20847
20840
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
20848
20841
  svg.selectAll(
20849
- '[hoverId="' + getJQuerySelector(d2.legend.replace(/ /g, "-")) + '"]'
20842
+ '[hoverId="' + getJQuerySelector(d2.properties?.alias || d2.properties?.name || "Legend").replace(/\s+/g, "-") + '"]'
20850
20843
  ).classed("highlight", false).classed("unhighlight", false);
20851
20844
  });
20852
20845
  });
@@ -21325,13 +21318,10 @@ const StackLineChart = ({
21325
21318
  lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
21326
21319
  let lineGroups = lines.selectAll(".line-group").data((d) => d);
21327
21320
  const lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
21328
- lineGroupsEnter.attr(
21329
- "hoverId",
21330
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
21331
- ).append("path").attr("class", "line").attr("fill", "none");
21321
+ lineGroupsEnter.append("path").attr("class", "line").attr("fill", "none");
21332
21322
  lineGroupsEnter.merge(lineGroups).each(function(d, i) {
21333
21323
  const g = select$2(this);
21334
- 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(
21324
+ 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(
21335
21325
  "stroke-dasharray",
21336
21326
  seriesData[i].properties.lineStyle === "dotted" ? "0,3" : seriesData[i].properties.lineStyle === "dashed" ? "20,10,5,5,5,10" : ""
21337
21327
  ).attr(
@@ -21348,9 +21338,7 @@ const StackLineChart = ({
21348
21338
  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() {
21349
21339
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
21350
21340
  svg.selectAll(
21351
- `[hoverId="${getJQuerySelector(
21352
- d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
21353
- )}"]`
21341
+ '[hoverId="' + getJQuerySelector(seriesData[i].properties.alias || seriesData[i].properties.name || "Legend").replace(/\s+/g, "-") + '"]'
21354
21342
  ).classed("highlight", true).classed("unhighlight", false);
21355
21343
  }).on("mouseleave", function() {
21356
21344
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
@@ -21822,10 +21810,7 @@ const NormalisedStackLineChart = ({
21822
21810
  lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
21823
21811
  let lineGroups = lines.selectAll(".line-group").data((d) => d);
21824
21812
  let lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
21825
- lineGroupsEnter.attr(
21826
- "hoverId",
21827
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
21828
- ).append("path").attr("class", "line").attr("fill", "none");
21813
+ 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");
21829
21814
  lineGroupsEnter.merge(lineGroups).each(function(d, i) {
21830
21815
  const g = select$2(this);
21831
21816
  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(
@@ -21842,20 +21827,12 @@ const NormalisedStackLineChart = ({
21842
21827
  {
21843
21828
  pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", 0);
21844
21829
  }
21845
- 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() {
21830
+ 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) {
21846
21831
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
21847
- svg.selectAll(
21848
- `[hoverId="${getJQuerySelector(
21849
- d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
21850
- )}"]`
21851
- ).classed("highlight", true).classed("unhighlight", false);
21852
- }).on("mouseleave", function() {
21832
+ svg.selectAll('[hoverId="' + getJQuerySelector(lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend").replace(/\s+/g, "-") + '"]').classed("highlight", true).classed("unhighlight", false);
21833
+ }).on("mouseleave", function(event2, d2) {
21853
21834
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
21854
- svg.selectAll(
21855
- `[hoverId="${getJQuerySelector(
21856
- d.key.split("~$~")[1].replace(/ /g, "-")
21857
- )}"]`
21858
- ).classed("highlight", false).classed("unhighlight", false);
21835
+ svg.selectAll('[hoverId="' + getJQuerySelector(lineData[d2.index]?.properties?.alias || d2[d2.index]?.properties?.name || "Legend").replace(/\s+/g, "-") + '"]').classed("highlight", false).classed("unhighlight", false);
21859
21836
  });
21860
21837
  });
21861
21838
  lineGroups.exit().remove();
@@ -22363,10 +22340,7 @@ const HorizontalBarChart = ({
22363
22340
  let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
22364
22341
  column = column.enter().append("g").attr("class", "column parentGroup").merge(column);
22365
22342
  let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
22366
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
22367
- "hoverId",
22368
- (d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
22369
- ).attr("transform", (d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`);
22343
+ 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})`);
22370
22344
  columnGroups.attr("transform", (d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`);
22371
22345
  columnGroupsEnter.merge(columnGroups).attr("transform", (d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`);
22372
22346
  const bars = columnGroupsEnter.append("rect").attr("y", (d) => yScaleLegends(d.legend)).attr("height", yScaleLegends.bandwidth()).attr("x", (d) => {
@@ -22393,7 +22367,7 @@ const HorizontalBarChart = ({
22393
22367
  }
22394
22368
  });
22395
22369
  columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
22396
- const legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
22370
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
22397
22371
  gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "visible");
22398
22372
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
22399
22373
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
@@ -22424,7 +22398,7 @@ const HorizontalBarChart = ({
22424
22398
  data2.properties
22425
22399
  );
22426
22400
  }).on("mouseout", (event2, d) => {
22427
- const legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
22401
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
22428
22402
  gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "hidden");
22429
22403
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
22430
22404
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
@@ -22826,10 +22800,7 @@ const StackHorizontalChart = ({
22826
22800
  let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
22827
22801
  columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
22828
22802
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
22829
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
22830
- "hoverId",
22831
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
22832
- );
22803
+ 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, "-"));
22833
22804
  columnGroups = columnGroupsEnter.merge(columnGroups);
22834
22805
  let rects = columnGroups.selectAll("rect").data((d) => d);
22835
22806
  const getPropsForRect = (nodes, i) => {
@@ -22875,13 +22846,13 @@ const StackHorizontalChart = ({
22875
22846
  event2,
22876
22847
  d.properties
22877
22848
  );
22878
- let legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
22849
+ let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
22879
22850
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
22880
22851
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
22881
22852
  }).on("mouseout", (event2, d) => {
22882
22853
  const dim = d.data.dimension;
22883
22854
  gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
22884
- let legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
22855
+ let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
22885
22856
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
22886
22857
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
22887
22858
  hideTooltipOnMouseOut();
@@ -23503,10 +23474,7 @@ const NormalizedStackHorizontalBarChart = ({
23503
23474
  let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
23504
23475
  columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
23505
23476
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
23506
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
23507
- "hoverId",
23508
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
23509
- );
23477
+ 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, "-"));
23510
23478
  columnGroups = columnGroupsEnter.merge(columnGroups);
23511
23479
  let rects = columnGroups.selectAll("rect").data((d) => d);
23512
23480
  const getPropsForRect = (nodes, i) => {
@@ -23549,11 +23517,11 @@ const NormalizedStackHorizontalBarChart = ({
23549
23517
  event2,
23550
23518
  d.properties
23551
23519
  );
23552
- const legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
23520
+ let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
23553
23521
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
23554
23522
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
23555
23523
  }).on("mouseout", (event2, d) => {
23556
- const legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
23524
+ let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
23557
23525
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
23558
23526
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
23559
23527
  gTag.select(`#dim-background-${d.data.dimension}`).attr("visibility", "hidden");
@@ -23975,10 +23943,7 @@ const LayeredHorizontalBarChart = ({
23975
23943
  let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
23976
23944
  column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
23977
23945
  let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
23978
- let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
23979
- "hoverId",
23980
- (d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
23981
- ).attr(
23946
+ let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr("hoverId", (data2.properties.alias || data2.properties.name || "Legend").replace(/\s+/g, "-")).attr(
23982
23947
  "transform",
23983
23948
  (d) => index2 === 0 ? `translate(0,${yScale(d.dimension) - columnWidth / 2})` : `translate(0,${yScale(d.dimension) - columnWidth / (2 + index2 * 2)})`
23984
23949
  );
@@ -24035,11 +24000,11 @@ const LayeredHorizontalBarChart = ({
24035
24000
  event2,
24036
24001
  data2.properties
24037
24002
  );
24038
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
24003
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
24039
24004
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
24040
24005
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
24041
24006
  }).on("mouseout", (e, d) => {
24042
- let legend = d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-");
24007
+ let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
24043
24008
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
24044
24009
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
24045
24010
  hideTooltipOnMouseOut();
@@ -25165,10 +25130,10 @@ const AreaChart = ({
25165
25130
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
25166
25131
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
25167
25132
  let areaGroupsEnter = areaGroups.enter().append("g").attr("class", "area-group");
25168
- areaGroupsEnter.append("path").attr("hoverId", (d) => d.legend.replace(/ /g, "-")).attr("class", "area parentGroup").attr(
25133
+ areaGroupsEnter.append("path").attr("class", "area parentGroup").attr(
25169
25134
  "fill",
25170
25135
  (d) => d.properties.color !== "#ffffff" ? d.properties.color : "none"
25171
- ).style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => areaGeneratorStart(d.data)).each(function(d) {
25136
+ ).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) {
25172
25137
  {
25173
25138
  select$2(this).attr("d", areaGenerator(d.data));
25174
25139
  }
@@ -25197,7 +25162,7 @@ const AreaChart = ({
25197
25162
  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) {
25198
25163
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true).attr("stroke-width", "2.5");
25199
25164
  svg.selectAll(
25200
- `[hoverId="${getJQuerySelector(d2.legend.replace(/ /g, "-"))}"]`
25165
+ '[hoverId="' + getJQuerySelector(d2.properties?.alias || d2.properties?.name || "Legend").replace(/\s+/g, "-") + '"]'
25201
25166
  ).classed("highlight", true).classed("unhighlight", false).attr("stroke-width", "3.5");
25202
25167
  }).on("mouseleave", function(event2, d2) {
25203
25168
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false).attr("stroke-width", "2.5");
@@ -25704,10 +25669,7 @@ const StackAreaChart = ({
25704
25669
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
25705
25670
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
25706
25671
  let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
25707
- areaGroupsEnter.append("path").attr(
25708
- "hoverId",
25709
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
25710
- ).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) {
25672
+ 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) {
25711
25673
  {
25712
25674
  select$2(this).attr("d", areaGenerator(d));
25713
25675
  }
@@ -25734,13 +25696,13 @@ const StackAreaChart = ({
25734
25696
  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) {
25735
25697
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
25736
25698
  svg.selectAll(
25737
- '[hoverId="' + getJQuerySelector(d2.key.split("~$~")[1].replace(/ /g, "-")) + '"]'
25699
+ '[hoverId="' + (seriesData[d2.index]?.properties?.alias || seriesData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-") + '"]'
25738
25700
  ).classed("highlight", true).classed("unhighlight", false);
25739
25701
  }).on("mouseleave", function() {
25740
25702
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
25741
25703
  });
25742
25704
  svg.selectAll(
25743
- '[hoverId="' + getJQuerySelector(d.key.split("~$~")[1].replace(/ /g, "-")) + '"]'
25705
+ '[hoverId="' + (seriesData[d.index].properties.alias || seriesData[d.index].properties.name || "Legend").replace(/ /g, "-") + '"]'
25744
25706
  ).classed("highlight", false).classed("unhighlight", false);
25745
25707
  });
25746
25708
  areaGroups.exit().remove();
@@ -26239,10 +26201,7 @@ const NormalizedStackAreaChart = ({
26239
26201
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
26240
26202
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
26241
26203
  let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
26242
- areaGroupsEnter.append("path").attr(
26243
- "hoverId",
26244
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
26245
- ).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) {
26204
+ 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) {
26246
26205
  const path2 = select$2(this);
26247
26206
  {
26248
26207
  path2.attr("d", columnGenerator(d));
@@ -26270,13 +26229,13 @@ const NormalizedStackAreaChart = ({
26270
26229
  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) {
26271
26230
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
26272
26231
  svg.selectAll(
26273
- '[hoverId="' + getJQuerySelector(d2.key.split("~$~")[1].replace(/ /g, "-")) + '"]'
26232
+ '[hoverId="' + getJQuerySelector((lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-")) + '"]'
26274
26233
  ).classed("highlight", true).classed("unhighlight", false);
26275
26234
  }).on("mouseleave", function() {
26276
26235
  svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
26277
26236
  });
26278
26237
  svg.selectAll(
26279
- '[hoverId="' + getJQuerySelector(d.key.split("~$~")[1].replace(/ /g, "-")) + '"]'
26238
+ '[hoverId="' + getJQuerySelector((lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/ /g, "-")) + '"]'
26280
26239
  ).classed("highlight", false).classed("unhighlight", false);
26281
26240
  });
26282
26241
  areaGroups.exit().remove();
@@ -26653,7 +26612,7 @@ const PieChart = ({ data, formatOptions, chartId }) => {
26653
26612
  try {
26654
26613
  const arc2 = arc$1().innerRadius(0).outerRadius(radius);
26655
26614
  const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
26656
- 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(
26615
+ 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(
26657
26616
  "fill",
26658
26617
  (d) => d.data.properties.color !== "#ffffff" ? d.data.properties.color : "none"
26659
26618
  ).attr("d", (d) => arc2(d)).on("mouseover.arc", function(d) {
@@ -26726,7 +26685,7 @@ const PieChart = ({ data, formatOptions, chartId }) => {
26726
26685
  pieChartData.filter(
26727
26686
  (d) => d.data.properties.dataLabelPosition == "1"
26728
26687
  )
26729
- ).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(
26688
+ ).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(
26730
26689
  "font-style",
26731
26690
  (d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
26732
26691
  ).attr(
@@ -26751,7 +26710,7 @@ const PieChart = ({ data, formatOptions, chartId }) => {
26751
26710
  pieChartData.filter(
26752
26711
  (d) => d.data.properties.dataLabelPosition == "1"
26753
26712
  )
26754
- ).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(
26713
+ ).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(
26755
26714
  "font-style",
26756
26715
  (d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
26757
26716
  ).attr(
@@ -26832,7 +26791,7 @@ const PieChart = ({ data, formatOptions, chartId }) => {
26832
26791
  const textWidth = 80;
26833
26792
  const xOffset = midangle < Math.PI ? 0 : -textWidth;
26834
26793
  return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
26835
- }).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) => {
26794
+ }).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) => {
26836
26795
  let value2 = d.data.data[0].value.toString();
26837
26796
  if (d.data.data[0].value !== void 0) {
26838
26797
  value2 = chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%" ? (Math.abs(d.data[0].value / pieTotalValue) * 100).toFixed(
@@ -26993,7 +26952,7 @@ const DonutChart = ({
26993
26952
  let rotationAngle = convertStringToNumber(
26994
26953
  chartFormatOptions.plotArea.rotation
26995
26954
  );
26996
- 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);
26955
+ 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);
26997
26956
  let pieData = pie$1(seriesData);
26998
26957
  pieChartData = pieData?.map((d, i) => ({
26999
26958
  ...d,
@@ -27014,7 +26973,7 @@ const DonutChart = ({
27014
26973
  const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius);
27015
26974
  const arcOver = arc$1().innerRadius(innerRadius).outerRadius(radius + 10);
27016
26975
  const parentGroup = chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`);
27017
- 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(
26976
+ 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(
27018
26977
  "fill",
27019
26978
  (d) => d.data.properties.color !== "#ffffff" ? d.data.properties.color : "none"
27020
26979
  ).each(function(d) {
@@ -27098,7 +27057,7 @@ const DonutChart = ({
27098
27057
  pieChartData.filter(
27099
27058
  (d) => d.data.properties.dataLabelPosition == "1"
27100
27059
  )
27101
- ).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(
27060
+ ).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(
27102
27061
  "font-style",
27103
27062
  (d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
27104
27063
  ).attr(
@@ -27123,7 +27082,7 @@ const DonutChart = ({
27123
27082
  pieChartData.filter(
27124
27083
  (d) => d.data.properties.dataLabelPosition == "1"
27125
27084
  )
27126
- ).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(
27085
+ ).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(
27127
27086
  "font-style",
27128
27087
  (d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
27129
27088
  ).attr(
@@ -27204,7 +27163,7 @@ const DonutChart = ({
27204
27163
  const textWidth = 80;
27205
27164
  const xOffset = midangle < Math.PI ? 0 : -textWidth;
27206
27165
  return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
27207
- }).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");
27166
+ }).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");
27208
27167
  }
27209
27168
  } catch (error) {
27210
27169
  logError$2(fileName$7, "drawDonutDataLabels", error);
@@ -27378,6 +27337,23 @@ const Treemap = ({ data, formatOptions, chartId }) => {
27378
27337
  logError$2(fileName$6, "getColor", error);
27379
27338
  }
27380
27339
  };
27340
+ const getMarkerColorForTooltip = (d) => {
27341
+ try {
27342
+ const props = d?.currentTarget?.__data__?.data?.properties;
27343
+ if (!props) return;
27344
+ switch (chartFormatOptions.colorScale.showColor) {
27345
+ case colorThemeTypes.none:
27346
+ return { ...props, markerColor: defaultColor };
27347
+ case colorThemeTypes.colorTheme:
27348
+ return { ...props, markerColor: props.themeColor };
27349
+ case colorThemeTypes.discrete:
27350
+ default:
27351
+ return props;
27352
+ }
27353
+ } catch (error) {
27354
+ logError$2(fileName$6, "getMarkerColorForTooltip", error);
27355
+ }
27356
+ };
27381
27357
  const initChartRect = () => {
27382
27358
  try {
27383
27359
  const leaf = chartAreaTagG.selectAll("g").data(chartData).enter().append("g").attr("transform", (d) => `translate(${d.x0},${d.y0})`);
@@ -27392,19 +27368,11 @@ const Treemap = ({ data, formatOptions, chartId }) => {
27392
27368
  chartFormatOptions.toolTip.toolTipDecimalPrecision
27393
27369
  )(data2.data.data[0].value)
27394
27370
  },
27395
- { key: "Legend", value: data2.data.data[0].legend },
27396
- data2.data.data[1] ? {
27397
- key: data2.data.data[1].legend,
27398
- value: getNumberWithFormatFunction(
27399
- chartFormatOptions.toolTip.toolTipDisplayUnits,
27400
- chartFormatOptions.toolTip.toolTipNumberFormat,
27401
- chartFormatOptions.toolTip.toolTipDecimalPrecision
27402
- )(data2.data.data[1].value)
27403
- } : ""
27371
+ { key: "Legend", value: data2.data.data[0].legend }
27404
27372
  ],
27405
27373
  chartFormatOptions,
27406
27374
  void 0,
27407
- d.currentTarget.__data__.data.properties
27375
+ getMarkerColorForTooltip(d)
27408
27376
  );
27409
27377
  }).on("mouseout", () => hideTooltipOnMouseOut());
27410
27378
  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);