pace-chart-lib 1.0.10 → 1.0.12

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.
@@ -11605,7 +11605,7 @@
11605
11605
  "Helvetica"
11606
11606
  )[1] : 0;
11607
11607
  yTitle = yTitle > width * 0.1 ? width * 0.1 : yTitle;
11608
- let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0);
11608
+ let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) + 10 : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0) + 10;
11609
11609
  yLabel += 8;
11610
11610
  let secondaryYLabel = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? responsiveYaxisMargin(
11611
11611
  maxNumberForSecondaryAxis,
@@ -15517,11 +15517,11 @@
15517
15517
  chartFormatOptions.chartTitle.chartTitleVisibility ? "visible" : "hidden"
15518
15518
  ).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", chartTitleWidth).attr("height", chartTitleHeight + "px");
15519
15519
  if (chartFormatOptions.chartTitle.dynamicTitleText.length !== 0) {
15520
- object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", chartFormatOptions.chartTitle.chartTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").html(
15520
+ object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", chartFormatOptions.chartTitle.chartTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").style("overflow", "visible").style("line-height", "1.3em").html(
15521
15521
  chartFormatOptions.chartTitle.chartTitleHTML ? chartFormatOptions.chartTitle.chartTitleHTML : chartFormatOptions.chartTitle.chartTitleText
15522
15522
  );
15523
15523
  } else {
15524
- object2.append("xhtml:div").style("white-space", "pre").style("user-select", "none").style("text-overflow", "ellipsis").style("overflow", "hidden").attr("class", "chartTiltle").attr("id", "chartTitleId").style("text-anchor", "start").style("color", "rgba(119,119,119)").style("font-size", "16px").style(
15524
+ object2.append("xhtml:div").style("white-space", "pre").style("user-select", "none").style("text-overflow", "ellipsis").style("overflow", "visible").style("line-height", "1.3em").attr("class", "chartTiltle").attr("id", "chartTitleId").style("text-anchor", "start").style("color", "rgba(119,119,119)").style("font-size", "16px").style(
15525
15525
  "font-family",
15526
15526
  chartFormatOptions.chartTitle.chartTitleFontFamily
15527
15527
  ).attr("title", chartFormatOptions.chartTitle.chartTitleText).html(chartFormatOptions.chartTitle.chartTitleText);
@@ -15567,14 +15567,14 @@
15567
15567
  if (chartFormatOptions.legends.onHoverEffect) {
15568
15568
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
15569
15569
  selectAll(
15570
- '[hoverId="' + this.textContent.replace(/ /g, "-") + '"]'
15570
+ '[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
15571
15571
  ).classed("highlight", true).classed("unhighlight", false);
15572
15572
  }
15573
15573
  }).on("mouseout", function(d2) {
15574
15574
  if (chartFormatOptions.legends.onHoverEffect) {
15575
15575
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
15576
15576
  selectAll(
15577
- '[hoverId="' + this.textContent.replace(/ /g, "-") + '"]'
15577
+ '[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
15578
15578
  ).classed("highlight", false).classed("unhighlight", false);
15579
15579
  }
15580
15580
  });
@@ -19908,7 +19908,7 @@
19908
19908
  function logError$1(fileName2, functionName, error) {
19909
19909
  console.error(`[${fileName2}] [${functionName}]`, error);
19910
19910
  }
19911
- const ColumnHistogramChart$1 = ({
19911
+ const ColumnHistogramChart = ({
19912
19912
  isDateType,
19913
19913
  formatOptions,
19914
19914
  data
@@ -24320,7 +24320,7 @@
24320
24320
  }
24321
24321
  ) });
24322
24322
  };
24323
- const ColumnHistogramChart = ({
24323
+ const HorizontalHistogramChart = ({
24324
24324
  isDateType,
24325
24325
  formatOptions,
24326
24326
  data
@@ -24393,12 +24393,12 @@
24393
24393
  };
24394
24394
  require$$0$1.useEffect(() => {
24395
24395
  try {
24396
- createColumnChart();
24396
+ createHorizontalChart();
24397
24397
  } catch (error) {
24398
- logError$2("Columnchart", "createColumnChart", error);
24398
+ logError$2("HorizontalHistogramChart", "createHorizontalChart", error);
24399
24399
  }
24400
24400
  }, [formatOptions]);
24401
- const createColumnChart = () => {
24401
+ const createHorizontalChart = () => {
24402
24402
  ({ formatOptions, svg, width, height } = firstFunctionBeforeRender$1(
24403
24403
  svgRef,
24404
24404
  formatOptions
@@ -24447,25 +24447,28 @@
24447
24447
  seriesData,
24448
24448
  chartJSON.dimensionList
24449
24449
  ));
24450
- initSvg$1(
24451
- // for svg creation
24452
- svg,
24453
- width,
24454
- height,
24455
- formatOptions
24456
- );
24450
+ initSvg$1(svg, width, height, formatOptions);
24457
24451
  gTag = initChartArea$1(svg, margin);
24458
- initPlotArea(
24452
+ initPlotArea(gTag, formatOptions, dataTableHeight, innerWidth2, innerHeight2, chartType);
24453
+ binsCalculation();
24454
+ initScale();
24455
+ initAxis();
24456
+ initXaxis$1(
24459
24457
  gTag,
24458
+ chartJSON,
24459
+ xLabel,
24460
24460
  formatOptions,
24461
24461
  dataTableHeight,
24462
+ yScaleLeft,
24463
+ xAxis,
24464
+ dimensionHeightWidthArray,
24465
+ height,
24466
+ columnWidth,
24467
+ isDateType,
24462
24468
  innerWidth2,
24463
24469
  innerHeight2,
24464
- chartType
24470
+ filteredDimension
24465
24471
  );
24466
- binsCalculation();
24467
- initScale();
24468
- initAxis();
24469
24472
  initYaxis$1(
24470
24473
  gTag,
24471
24474
  formatOptions,
@@ -24582,7 +24585,7 @@
24582
24585
  const binsCalculation = () => {
24583
24586
  switch (formatOptions.bins.binsCalculation) {
24584
24587
  case "Automatic":
24585
- thresholds = innerWidth2 / 50;
24588
+ thresholds = innerHeight2 / 50;
24586
24589
  break;
24587
24590
  case "Number of Bins":
24588
24591
  calculatingPeriodsWithBins(false);
@@ -24592,11 +24595,7 @@
24592
24595
  }
24593
24596
  };
24594
24597
  const calculatingPeriodsWithBins = (isWithWidth) => {
24595
- filteredData.forEach(
24596
- (d) => d.data.sort(function(a2, b) {
24597
- return a2.value - b.value;
24598
- })
24599
- );
24598
+ filteredData.forEach((d) => d.data.sort((a2, b) => a2.value - b.value));
24600
24599
  let range2 = chartJSON.xMax - chartJSON.xMin;
24601
24600
  let tempPeriod;
24602
24601
  if (isWithWidth) {
@@ -24622,9 +24621,9 @@
24622
24621
  }
24623
24622
  };
24624
24623
  const initScale = () => {
24625
- xScale = linear$1().domain([chartJSON.xMin, chartJSON.xMax]).range([0, innerWidth2]);
24626
- const numberOfBins = periods.length > 0 ? periods : xScale.ticks(thresholds);
24627
- let histogram = bin().value((d) => d).domain(xScale.domain()).thresholds(numberOfBins);
24624
+ yScaleLeft = linear$1().domain([chartJSON.xMin, chartJSON.xMax]).range([innerHeight2, 0]);
24625
+ const numberOfBins = periods.length > 0 ? periods : yScaleLeft.ticks(thresholds);
24626
+ let histogram = bin().value((d) => d).domain(yScaleLeft.domain()).thresholds(numberOfBins);
24628
24627
  filteredData.forEach((d) => {
24629
24628
  let tempArray = histogram(d.data.map((val) => val.value));
24630
24629
  bins.push(tempArray);
@@ -24640,23 +24639,26 @@
24640
24639
  bins.forEach((d) => d.forEach((j) => cumulativeLength.push(j.length)));
24641
24640
  chartJSON.yMaxLeft = max$2(cumulativeLength);
24642
24641
  chartJSON.yMinLeft = min$2(cumulativeLength);
24643
- yScaleLeft = linear$1().range([innerHeight2, 0]).domain([customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : 0, customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : chartJSON.yMaxLeft + 0.2 * chartJSON.yMaxLeft]);
24642
+ xScale = linear$1().domain([
24643
+ customXaxisMinValue || customXaxisMinValue == 0 ? customXaxisMinValue : 0,
24644
+ customXaxisMaxValue || customXaxisMaxValue == 0 ? customXaxisMaxValue : chartJSON.yMaxLeft + 0.2 * chartJSON.yMaxLeft
24645
+ ]).range([0, innerWidth2]);
24644
24646
  };
24645
24647
  const initAxis = () => {
24646
- getXAxis();
24648
+ getYAxis();
24647
24649
  {
24648
- let responsiveLablesObj = responsiveYaxisLabel$1(
24650
+ let responsiveLabelsObj = responsiveYaxisLabel$1(
24649
24651
  chartJSON.yMaxLeft,
24650
24652
  chartJSON.yMinLeft,
24651
- innerHeight2,
24653
+ innerWidth2,
24652
24654
  formatOptions,
24653
24655
  chartJSON,
24654
24656
  customYaxisMinValue,
24655
24657
  customYaxisMaxValue,
24656
24658
  false,
24657
- innerWidth2
24659
+ innerHeight2
24658
24660
  );
24659
- yAxisLeft = axisLeft(yScaleLeft).tickFormat(
24661
+ xAxis = axisBottom(xScale).tickFormat(
24660
24662
  (d) => getNumberWithFormat(
24661
24663
  d,
24662
24664
  formatOptions.yAxisLabel.yAxisDisplayUnits,
@@ -24664,15 +24666,14 @@
24664
24666
  formatOptions.yAxisLabel.yAxisLabelDecimalPrecision
24665
24667
  )
24666
24668
  ).tickSize(
24667
- formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
24668
- ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
24669
+ formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 + 0 : 0 : 0
24670
+ ).tickValues(responsiveLabelsObj.autoLabelFlag ? void 0 : responsiveLabelsObj.yAxisLabelArray).ticks(responsiveLabelsObj.customTickValue).tickPadding(8).tickSizeOuter(0);
24669
24671
  }
24670
24672
  };
24671
- const getXAxis = () => {
24672
- let xaxisLabelPosition = parseInt(formatOptions.xAxisLabel.xAxisPosition);
24673
- let labelArray = responsiveXaxisLabelForNumericValue(chartJSON.xMax, chartJSON.xMin, innerWidth2, formatOptions, customXaxisMinValue, customXaxisMaxValue, innerHeight2, false).xAxisLabelArray;
24673
+ const getYAxis = () => {
24674
+ let labelArray = responsiveXaxisLabelForNumericValue(chartJSON.xMax, chartJSON.xMin, innerHeight2, formatOptions, customXaxisMinValue, customXaxisMaxValue, innerWidth2, false).xAxisLabelArray;
24674
24675
  labelArray.shift();
24675
- xAxis = (xaxisLabelPosition == 1 ? axisTop(xScale) : axisBottom(xScale)).tickFormat(
24676
+ yAxisLeft = axisLeft(yScaleLeft).tickFormat(
24676
24677
  (d) => getNumberWithFormat(
24677
24678
  d,
24678
24679
  formatOptions.xAxisLabel.xAxisDisplayUnits,
@@ -24681,32 +24682,29 @@
24681
24682
  false
24682
24683
  )
24683
24684
  ).tickSize(
24684
- formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? formatOptions.plotArea.gridLinesVertical ? -(dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2) : parseFloat(formatOptions.plotArea.ticksHeight) * ((dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2) / 100) * (formatOptions.xAxisLabel.xAxisPosition == "1" ? 1 : -1) : 0 : 0
24685
+ formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerWidth2 : 0 : 0
24685
24686
  ).tickSizeOuter(0);
24686
- formatOptions.bins.binsCalculation === "Automatic" ? xAxis.ticks(thresholds) : xAxis.tickValues(periods).ticks(innerWidth2 / 50);
24687
+ formatOptions.bins.binsCalculation === "Automatic" ? yAxisLeft.ticks(thresholds) : yAxisLeft.tickValues(periods).ticks(innerHeight2 / 50);
24687
24688
  };
24688
24689
  const getChartType = (lineData) => {
24689
- gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(bins).enter().append("g").selectAll("rect").data((d) => d).enter().append("rect").attr("class", "rect").attr("stroke", formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderColor).attr(
24690
- "stroke-width",
24691
- formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderThickness
24692
- ).attr(
24693
- "stroke-opacity",
24694
- formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderOpacity
24695
- ).attr("x", 1).attr("transform", function(d) {
24696
- return "translate(" + xScale(d.x0) + "," + (yScaleLeft(d.length) > 0 ? yScaleLeft(d.length) : 0) + ")";
24697
- }).attr("width", function(d) {
24698
- return xScale(d.x1) - xScale(d.x0) - parseFloat(formatOptions.bins.binsGapWidth) < 0 ? 0 : xScale(d.x1) - xScale(d.x0) - parseFloat(formatOptions.bins.binsGapWidth);
24699
- }).attr("height", function(d) {
24700
- return innerHeight2 - yScaleLeft(d.length);
24701
- }).style("fill", (d) => d.color !== "#ffffff" ? d.color : "none").style("opacity", formatOptions.bins.binsFillOpacity).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
24690
+ gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(bins).enter().append("g").selectAll("rect").data((d) => d).enter().append("rect").attr("class", "rect").attr("stroke", formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderColor).attr("stroke-width", formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderThickness).attr("stroke-opacity", formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderOpacity).attr("x", 0).attr("y", (d) => {
24691
+ const y02 = yScaleLeft(d.x0);
24692
+ const y12 = yScaleLeft(d.x1);
24693
+ return Math.min(y02, y12);
24694
+ }).attr("height", (d) => {
24695
+ const y02 = yScaleLeft(d.x0);
24696
+ const y12 = yScaleLeft(d.x1);
24697
+ const gap = parseFloat(formatOptions.bins.binsGapWidth) || 0;
24698
+ return Math.max(1, Math.abs(y12 - y02) - gap);
24699
+ }).attr("width", (d) => xScale(d.length)).style("fill", (d) => d.color !== "#ffffff" ? d.color : "none").style("opacity", formatOptions.bins.binsFillOpacity).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
24702
24700
  showTooltipOnMouseMove(
24703
24701
  [
24704
24702
  {
24705
- key: formatOptions.xAxisTitle.xAxisTitleText.includes("~$~") ? formatOptions.xAxisTitle.xAxisTitleText.split("~$~")[1] : formatOptions.xAxisTitle.xAxisTitleText,
24703
+ key: formatOptions.yAxisTitle.yAxisTitleText,
24706
24704
  value: `${d["x0"]}-${d["x1"]}`
24707
24705
  },
24708
24706
  {
24709
- key: formatOptions.yAxisTitle.yAxisTitleText,
24707
+ key: formatOptions.xAxisTitle.xAxisTitleText,
24710
24708
  value: getNumberWithFormat(formatOptions.toolTip.toolTipNumberFormat == ",.0%" ? Math.abs(d.length / filteredData[0].data.length) : d.length, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, false)
24711
24709
  }
24712
24710
  ],
@@ -24756,7 +24754,7 @@
24756
24754
  (d) => filteredDimension.includes(d.dimension)
24757
24755
  )
24758
24756
  );
24759
- getXAxis();
24757
+ getYAxis();
24760
24758
  drawColumnChart();
24761
24759
  })
24762
24760
  );
@@ -24773,35 +24771,20 @@
24773
24771
  (d) => filteredDimension.includes(d.dimension)
24774
24772
  )
24775
24773
  );
24776
- getXAxis();
24774
+ getYAxis();
24777
24775
  drawColumnChart();
24778
24776
  });
24779
24777
  }
24780
24778
  drawColumnChart();
24781
24779
  };
24782
24780
  const drawColumnChart = () => {
24783
- initXaxis$1(
24784
- gTag,
24785
- chartJSON,
24786
- xLabel,
24787
- formatOptions,
24788
- dataTableHeight,
24789
- yScaleLeft,
24790
- xAxis,
24791
- dimensionHeightWidthArray,
24792
- height,
24793
- columnWidth,
24794
- isDateType,
24795
- innerWidth2,
24796
- innerHeight2,
24797
- filteredDimension
24798
- );
24781
+ initYaxis$1(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, innerHeight2);
24799
24782
  getChartType();
24800
24783
  };
24801
24784
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24802
24785
  "svg",
24803
24786
  {
24804
- className: "chartSVG",
24787
+ className: "className",
24805
24788
  ref: svgRef,
24806
24789
  id: chartId,
24807
24790
  style: { width: "100%", height: "100%" }
@@ -26673,7 +26656,9 @@
26673
26656
  },
26674
26657
  { key: "Legend", value: d.currentTarget.__data__.data.legend }
26675
26658
  ],
26676
- chartFormatOptions
26659
+ chartFormatOptions,
26660
+ void 0,
26661
+ d.currentTarget.__data__.data.properties
26677
26662
  );
26678
26663
  }).on("mouseout.text", () => {
26679
26664
  hideTooltipOnMouseOut();
@@ -27037,7 +27022,9 @@
27037
27022
  },
27038
27023
  { key: "Legend", value: d.currentTarget.__data__.data.legend }
27039
27024
  ],
27040
- chartFormatOptions
27025
+ chartFormatOptions,
27026
+ void 0,
27027
+ d.currentTarget.__data__.data.properties
27041
27028
  );
27042
27029
  }).on("mouseout.text", () => hideTooltipOnMouseOut()).on("mouseout.arc", function() {
27043
27030
  if (enableTransition) ;
@@ -27114,7 +27101,7 @@
27114
27101
  pieChartData.filter(
27115
27102
  (d) => d.data.properties.dataLabelPosition == "1"
27116
27103
  )
27117
- ).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(
27104
+ ).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(
27118
27105
  "font-style",
27119
27106
  (d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
27120
27107
  ).attr(
@@ -27195,69 +27182,7 @@
27195
27182
  const textWidth = 80;
27196
27183
  const xOffset = midangle < Math.PI ? 0 : -textWidth;
27197
27184
  return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
27198
- }).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) => {
27199
- try {
27200
- let value2 = d.data.data[0].value.toString();
27201
- if (d.data.data[0].value !== void 0) {
27202
- value2 = chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%" ? (Math.abs(d.data.data[0].value / pieTotalValue) * 100).toFixed(
27203
- convertStringToNumber(
27204
- chartFormatOptions.plotArea.dataLabelDecimalPrecision
27205
- )
27206
- ) + "%" : getNumberWithFormatFunction(
27207
- chartFormatOptions.plotArea.plotAreaDisplayUnits,
27208
- chartFormatOptions.plotArea.dataLabelNumberFormat,
27209
- chartFormatOptions.plotArea.dataLabelDecimalPrecision
27210
- )(d.data.data[0].value);
27211
- }
27212
- let htmlString = "";
27213
- if (chartFormatOptions.plotArea.dataLabelName) {
27214
- htmlString += `<span style="
27215
- font-size: ${d.data.properties.labelFontSize}px;
27216
- color: ${d.data.properties.labelFontColor};
27217
- font-style: ${d.data.properties.labelFontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""};
27218
- text-decoration: ${d.data.properties.labelFontStyle.includes(
27219
- fontStyleOptions.underline
27220
- ) ? fontStyleOptions.underline : ""};
27221
- font-weight: ${d.data.properties.labelFontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : ""};
27222
- font-family: ${d.data.properties.labelFont};
27223
- display: block; white-space: nowrap; width:80px; overflow:hidden; text-overflow:ellipsis; text-align: center;">
27224
- ${d.data.legend}
27225
- </span>`;
27226
- }
27227
- if (chartFormatOptions.plotArea.dataLabelValue && d.data.data[0].value !== void 0) {
27228
- htmlString += `<span style="
27229
- font-size: ${d.data.properties.valueFontSize}px;
27230
- color: ${d.data.properties.valueFontColor};
27231
- font-style: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""};
27232
- text-decoration: ${d.data.properties.valueFontStyle.includes(
27233
- fontStyleOptions.underline
27234
- ) ? fontStyleOptions.underline : ""};
27235
- font-weight: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : "300"};
27236
- font-family: ${d.data.properties.valueFont};
27237
- display: block;">
27238
- ${value2}
27239
- </span>`;
27240
- }
27241
- if (chartFormatOptions.plotArea.plotAreaAbsoluteValue && d.data[0].value !== void 0) {
27242
- htmlString += `<span style="
27243
- font-size: ${d.data.properties.valueFontSize}px;
27244
- color: ${d.data.properties.valueFontColor};
27245
- font-style: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""};
27246
- text-decoration: ${d.data.properties.valueFontStyle.includes(
27247
- fontStyleOptions.underline
27248
- ) ? fontStyleOptions.underline : ""};
27249
- font-weight: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : "300"};
27250
- font-family: ${d.data.properties.valueFont};
27251
- display: block;">
27252
- ${format(".2s")(d.data[0].value)}
27253
- </span>`;
27254
- }
27255
- return htmlString;
27256
- } catch (error) {
27257
- logError$2(fileName$7, "drawDonutDataLabels", error);
27258
- return "";
27259
- }
27260
- });
27185
+ }).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");
27261
27186
  }
27262
27187
  } catch (error) {
27263
27188
  logError$2(fileName$7, "drawDonutDataLabels", error);
@@ -27455,7 +27380,9 @@
27455
27380
  )(data2.data.data[1].value)
27456
27381
  } : ""
27457
27382
  ],
27458
- chartFormatOptions
27383
+ chartFormatOptions,
27384
+ void 0,
27385
+ d.currentTarget.__data__.data.properties
27459
27386
  );
27460
27387
  }).on("mouseout", () => hideTooltipOnMouseOut());
27461
27388
  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);
@@ -27638,7 +27565,9 @@
27638
27565
  },
27639
27566
  { key: "Legend", value: d.currentTarget.__data__.data.legend }
27640
27567
  ],
27641
- chartFormatOptions
27568
+ chartFormatOptions,
27569
+ void 0,
27570
+ d.currentTarget.__data__.data.properties
27642
27571
  );
27643
27572
  }).on("mouseout.text", () => {
27644
27573
  hideTooltipOnMouseOut();
@@ -27704,7 +27633,9 @@
27704
27633
  },
27705
27634
  { key: "Legend", value: d.currentTarget.__data__.data.legend }
27706
27635
  ],
27707
- chartFormatOptions
27636
+ chartFormatOptions,
27637
+ void 0,
27638
+ d.currentTarget.__data__.data.properties
27708
27639
  );
27709
27640
  }).on("mouseout.text", () => {
27710
27641
  hideTooltipOnMouseOut();
@@ -28040,13 +27971,13 @@
28040
27971
  ${centerX + bottomWidth / 2},${yBottom}
28041
27972
  ${centerX - bottomWidth / 2},${yBottom}
28042
27973
  `
28043
- ).attr("fill", d.properties.color || "#4cb2ff").on("mousemove", function() {
27974
+ ).attr("fill", d.properties.color || "#4cb2ff").on("mousemove", function(d2) {
28044
27975
  try {
28045
27976
  showTooltipOnMouseMove(
28046
27977
  [
28047
27978
  {
28048
- key: d.legend,
28049
- value: chartFormatOptions.toolTip.toolTipNumberFormat == ",.0%" ? d.data[0].value ? (Math.abs(d.data[0].value / pyramidTotalValue) * 100).toFixed(
27979
+ key: d2.legend,
27980
+ value: chartFormatOptions.toolTip.toolTipNumberFormat == ",.0%" ? d2.data[0].value ? (Math.abs(d2.data[0].value / pyramidTotalValue) * 100).toFixed(
28050
27981
  convertStringToNumber(
28051
27982
  chartFormatOptions.toolTip.toolTipDecimalPrecision
28052
27983
  )
@@ -28054,10 +27985,12 @@
28054
27985
  "None",
28055
27986
  chartFormatOptions.toolTip.toolTipNumberFormat,
28056
27987
  chartFormatOptions.toolTip.toolTipDecimalPrecision
28057
- )(d.data[0].value)
27988
+ )(d2.data[0].value)
28058
27989
  }
28059
27990
  ],
28060
- chartFormatOptions
27991
+ chartFormatOptions,
27992
+ void 0,
27993
+ d2.currentTarget.__data__.data.properties
28061
27994
  );
28062
27995
  select$2(this).style("opacity", 0.8).style("stroke", chartFormatOptions.chartArea.chartAreaColor).style("stroke-width", "3px");
28063
27996
  } catch (error) {
@@ -28389,7 +28322,9 @@
28389
28322
  )(maxValue)
28390
28323
  }
28391
28324
  ],
28392
- chartFormatOptions
28325
+ chartFormatOptions,
28326
+ void 0,
28327
+ d.currentTarget.__data__.data.properties
28393
28328
  );
28394
28329
  } catch (error) {
28395
28330
  logError$2(
@@ -28842,7 +28777,9 @@
28842
28777
  )(data[index2].data[0].value)
28843
28778
  }
28844
28779
  ],
28845
- chartFormatOptions
28780
+ chartFormatOptions,
28781
+ void 0,
28782
+ d.currentTarget.__data__.data.properties
28846
28783
  );
28847
28784
  }).on("mouseout", () => {
28848
28785
  hideTooltipOnMouseOut();
@@ -29207,7 +29144,9 @@
29207
29144
  },
29208
29145
  { key: "Legend", value: d.properties.alias }
29209
29146
  ],
29210
- chartFormatOptions
29147
+ chartFormatOptions,
29148
+ void 0,
29149
+ d.properties
29211
29150
  );
29212
29151
  }).on("mouseout", () => {
29213
29152
  hideTooltipOnMouseOut();
@@ -29768,7 +29707,9 @@
29768
29707
  value: totalMeasureValue
29769
29708
  }
29770
29709
  ],
29771
- chartFormatOptions
29710
+ chartFormatOptions,
29711
+ void 0,
29712
+ d.properties
29772
29713
  );
29773
29714
  } catch (error) {
29774
29715
  logError$2(fileName$2, "draw-mousemove", error);
@@ -33237,7 +33178,9 @@
33237
33178
  )(d.size)
33238
33179
  }
33239
33180
  ],
33240
- chartFormatOptions
33181
+ chartFormatOptions,
33182
+ void 0,
33183
+ d.properties
33241
33184
  );
33242
33185
  let selection2 = select$2(this).transition("tooltip").duration(10);
33243
33186
  selection2.selectAll("path").style("stroke-dasharray", "5,5").style("stroke-opacity", 1).style("stroke", "black");
@@ -33986,7 +33929,9 @@
33986
33929
  )(d.value)
33987
33930
  }
33988
33931
  ],
33989
- chartFormatOptions
33932
+ chartFormatOptions,
33933
+ void 0,
33934
+ d.currentTarget.__data__.data.properties
33990
33935
  );
33991
33936
  }
33992
33937
  chartAreaTagG.selectAll(".sankey-nodes").style("fill-opacity", 0.1).style("stroke", "none");
@@ -34055,7 +34000,7 @@
34055
34000
  showTooltipOnMouseMove(
34056
34001
  [
34057
34002
  {
34058
- key: d.source.name + "→" + d.target.name,
34003
+ key: d.source.name.split("~$~")[1] + "→" + d.target.name.split("~$~")[1],
34059
34004
  value: getNumberWithFormatFunction(
34060
34005
  "None",
34061
34006
  chartFormatOptions.toolTip.toolTipNumberFormat,
@@ -34063,7 +34008,9 @@
34063
34008
  )(d.value)
34064
34009
  }
34065
34010
  ],
34066
- chartFormatOptions
34011
+ chartFormatOptions,
34012
+ void 0,
34013
+ { markerColor: d.source.color, markerShape: "circle" }
34067
34014
  );
34068
34015
  }
34069
34016
  } catch (error) {
@@ -49521,7 +49468,9 @@
49521
49468
  },
49522
49469
  ...keyValueObject
49523
49470
  ],
49524
- chartFormatOptions
49471
+ chartFormatOptions,
49472
+ void 0,
49473
+ d.currentTarget.__data__.data.properties
49525
49474
  );
49526
49475
  }
49527
49476
  }).on("mouseout", (event2, d) => {
@@ -49631,7 +49580,9 @@
49631
49580
  )(d.properties.data?.data[1]?.value)
49632
49581
  }
49633
49582
  ],
49634
- chartFormatOptions
49583
+ chartFormatOptions,
49584
+ void 0,
49585
+ d.currentTarget.__data__.data.properties
49635
49586
  );
49636
49587
  select$2(this).style(
49637
49588
  "r",
@@ -53605,25 +53556,30 @@
53605
53556
  barGroups = barGroupsEnter.merge(barGroups);
53606
53557
  let rects = barGroups.selectAll("rect").data((d) => d, (d) => d.key || d.Key);
53607
53558
  const rectsEnter = rects.enter().append("rect").attr("class", "rect").attr("class", (d) => d.key ? d.key.replace(/ /g, "-") : d.Key.replace(/ /g, "-")).attr("x", (d) => xScale(d.data.dimension || d.data.legend)).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr("height", (d) => d[1] ? yScaleLeft(d[0]) - yScaleLeft(d[1]) : 0).attr("width", xScale.bandwidth()).attr("visibility", (d) => k2 === 0 && d.data.dimension && stackTotalData ? "hidden" : "visible").style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
53608
- showTooltipOnMouseMove([
53609
- {
53610
- key: d.key === "dimensionTotal" ? "Dimension" : formatOptions.xAxisTitle.xAxisTitleText,
53611
- value: chartJSON.formattedDimensionListMap.get(d.data.dimension)
53612
- },
53613
- {
53614
- key: formatOptions.yAxisTitle.yAxisTitleText,
53615
- value: (d.key === "up" ? "+" : d.key === "down" ? "-" : "") + getNumberWithFormat(
53616
- d.key === "dimensionTotal" ? d.data.dimensionTotal : d[1] - d[0],
53617
- formatOptions.toolTip.toolTipDisplayUnits,
53618
- formatOptions.toolTip.toolTipNumberFormat,
53619
- formatOptions.toolTip.toolTipDecimalPrecision
53620
- )
53621
- },
53622
- {
53623
- key: "Legend",
53624
- value: d.Key ? d.Key.includes("~$~") ? d.Key.split("~$~")[1] : d.Key : d.data.legend ? d.data.legend.includes("~$~") ? d.data.legend.split("~$~")[1] : d.data.legend : "Total"
53625
- }
53626
- ], formatOptions);
53559
+ showTooltipOnMouseMove(
53560
+ [
53561
+ {
53562
+ key: d.key === "dimensionTotal" ? "Dimension" : formatOptions.xAxisTitle.xAxisTitleText,
53563
+ value: chartJSON.formattedDimensionListMap.get(d.data.dimension)
53564
+ },
53565
+ {
53566
+ key: formatOptions.yAxisTitle.yAxisTitleText,
53567
+ value: (d.key === "up" ? "+" : d.key === "down" ? "-" : "") + getNumberWithFormat(
53568
+ d.key === "dimensionTotal" ? d.data.dimensionTotal : d[1] - d[0],
53569
+ formatOptions.toolTip.toolTipDisplayUnits,
53570
+ formatOptions.toolTip.toolTipNumberFormat,
53571
+ formatOptions.toolTip.toolTipDecimalPrecision
53572
+ )
53573
+ },
53574
+ {
53575
+ key: "Legend",
53576
+ value: d.Key ? d.Key.includes("~$~") ? d.Key.split("~$~")[1] : d.Key : d.data.legend ? d.data.legend.includes("~$~") ? d.data.legend.split("~$~")[1] : d.data.legend : "Total"
53577
+ }
53578
+ ],
53579
+ formatOptions,
53580
+ void 0,
53581
+ d.currentTarget.__data__.data.properties
53582
+ );
53627
53583
  }).on("mouseout", () => {
53628
53584
  hideTooltipOnMouseOut();
53629
53585
  });
@@ -54188,14 +54144,19 @@
54188
54144
  ...child,
54189
54145
  parentProperties: d.properties
54190
54146
  }))).enter().append("rect").attr("class", "rect").attr("y", (d) => d.dimension ? yScaleLeft(d.dimension) : yScaleLeft("defaultEntry")).attr("x", (d) => xScale(Math.min(0, d.value))).attr("stroke-dasharray", (d) => d.stackBorderStyle == 2 ? "5,3" : "0").attr("stroke-width", (d) => d.stackBorderWidth + "px").attr("stroke", (d) => d.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? d.stackBorderColor : "none").style("shape-rendering", "crispEdges").attr("width", (d) => d.value ? Math.abs(xScale(d.value) - xScale(0)) : 0).attr("height", yScaleLeft.bandwidth()).style("fill", (d) => d.parentProperties.color).attr("opacity", 1).on("mousemove", (event2, d) => {
54191
- showTooltipOnMouseMove([
54192
- { key: "Measure", value: d.legend },
54193
- { key: "Legend", value: d.dimension },
54194
- {
54195
- key: "Value",
54196
- value: d.value < 0 ? getNumberWithFormat(-d.value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, true) : getNumberWithFormat(d.value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, true)
54197
- }
54198
- ], formatOptions);
54147
+ showTooltipOnMouseMove(
54148
+ [
54149
+ { key: "Measure", value: d.legend },
54150
+ { key: "Legend", value: d.dimension },
54151
+ {
54152
+ key: "Value",
54153
+ value: d.value < 0 ? getNumberWithFormat(-d.value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, true) : getNumberWithFormat(d.value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, true)
54154
+ }
54155
+ ],
54156
+ formatOptions,
54157
+ void 0,
54158
+ d.currentTarget.__data__.data.properties
54159
+ );
54199
54160
  }).on("mouseout", () => {
54200
54161
  hideTooltipOnMouseOut();
54201
54162
  });
@@ -54319,11 +54280,11 @@
54319
54280
  exports2.AreaChart = AreaChart;
54320
54281
  exports2.BubbleChart = BubbleChart;
54321
54282
  exports2.ColumnChart = ColumnChart;
54322
- exports2.ColumnHistogramChart = ColumnHistogramChart$1;
54283
+ exports2.ColumnHistogramChart = ColumnHistogramChart;
54323
54284
  exports2.CustomColumnChart = CustomColumnChart;
54324
54285
  exports2.DonutChart = DonutChart;
54325
54286
  exports2.HorizontalBarChart = HorizontalBarChart;
54326
- exports2.HorizontalHistogramChart = ColumnHistogramChart;
54287
+ exports2.HorizontalHistogramChart = HorizontalHistogramChart;
54327
54288
  exports2.LayeredColumnChart = LayeredColumnChart;
54328
54289
  exports2.LayeredHorizontalBarChart = LayeredHorizontalBarChart;
54329
54290
  exports2.LineChart = LineChart;