pace-chart-lib 1.0.36 → 1.0.39

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.
@@ -12235,9 +12235,9 @@ function responsiveYaxisMargin(maxNumber, yMax, formatOptions, isSecondaryAxis,
12235
12235
  throw error;
12236
12236
  }
12237
12237
  }
12238
- function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptions, chartJSON) {
12238
+ function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptions, innerHeight2) {
12239
12239
  try {
12240
- let autoLabelFlag = false;
12240
+ let autoLabelFlag = true;
12241
12241
  let secondaryCustomYaxisIntervalValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisIntervalText);
12242
12242
  let secondaryCustomYaxisMinValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMinText);
12243
12243
  let secondaryCustomYaxisMaxValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText);
@@ -12254,6 +12254,7 @@ function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptio
12254
12254
  let minRequiredTicks = 18;
12255
12255
  let tickvalue = secondaryCustomYaxisMinValue == 0 || secondaryCustomYaxisMinValue ? secondaryCustomYaxisMinValue : secondaryYmin < 0 ? Math.round(secondaryYmin) : 0;
12256
12256
  secondaryYAxisLabelArray.push(tickvalue);
12257
+ autoLabelFlag = false;
12257
12258
  if (secondaryCustomTickValue > 100) {
12258
12259
  let message = "Tick count cannot exceed more than 100.";
12259
12260
  if (minValue < 0) {
@@ -12279,17 +12280,16 @@ function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptio
12279
12280
  }
12280
12281
  }
12281
12282
  } else {
12282
- let autoLabelFlag2 = true;
12283
12283
  let labelWidthPx = calculateWidthHeightDynamically(
12284
- (parseFloat(formatOptions.yAxisLabel.yAxisMaxText) || chartJSON.yMaxRight).toString(),
12285
- formatOptions.yAxisLabel.yAxisLabelFontSize,
12286
- formatOptions.yAxisLabel.yAxisLabelFontFamily,
12284
+ (parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText) || secondaryYmax).toString(),
12285
+ formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontSize,
12286
+ formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontFamily,
12287
12287
  0
12288
12288
  );
12289
12289
  secondaryYAxisLabelArray = getLabelsFromAlgo(
12290
- parseFloat(formatOptions.yAxisLabel.yAxisMinText) || chartJSON.yMinRight,
12291
- parseFloat(formatOptions.yAxisLabel.yAxisMaxText) || chartJSON.yMaxRight,
12292
- innerHeight,
12290
+ parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMinText) || secondaryYmin,
12291
+ parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText) || secondaryYmax,
12292
+ innerHeight2,
12293
12293
  labelWidthPx[0]
12294
12294
  );
12295
12295
  }
@@ -12344,7 +12344,7 @@ function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJS
12344
12344
  if (isTornadoChart) {
12345
12345
  const maxAbs = Math.max(Math.abs(Ymin), Math.abs(Ymax));
12346
12346
  const finalMax = customYaxisMaxValue || maxAbs;
12347
- const finalMin = customYaxisMinValue || -finalMax;
12347
+ const finalMin = customYaxisMinValue || Ymin;
12348
12348
  if (customYaxisIntervalValue && customYaxisIntervalValue > 0) {
12349
12349
  for (let v = finalMin; v <= finalMax + 1e-6; v += customYaxisIntervalValue) {
12350
12350
  yAxisLabelArray.push(parseFloat(v.toFixed(6)));
@@ -12353,10 +12353,11 @@ function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJS
12353
12353
  } else {
12354
12354
  autoLabelFlag = true;
12355
12355
  const tickCount = 6;
12356
- for (let i = -tickCount; i <= tickCount; i++) {
12357
- yAxisLabelArray.push(
12358
- parseFloat((i * finalMax / tickCount).toFixed(6))
12359
- );
12356
+ const range2 = finalMax - finalMin;
12357
+ const step2 = range2 / tickCount;
12358
+ for (let i = 0; i <= tickCount; i++) {
12359
+ const v = finalMin + i * step2;
12360
+ yAxisLabelArray.push(parseFloat(v.toFixed(6)));
12360
12361
  }
12361
12362
  customTickValue = barChart ? innerWidth2 / 80 : innerHeight2 / 80;
12362
12363
  }
@@ -12682,7 +12683,7 @@ function initXaxis$1(gTag, chartJSON, xLabel, formatOptions, dataTableHeight, yS
12682
12683
  XaxisG.select(".domain").style("stroke", formatOptions.xAxisLabel.xAxisColor).attr(
12683
12684
  "stroke-width",
12684
12685
  formatOptions.xAxisLabel.xAxisWidth ? formatOptions.xAxisLabel.xAxisWidth : formatOptions.plotArea.plotAreaBorderThickness
12685
- ).style("shape-rendering", "crispEdges");
12686
+ ).style("shape-rendering", "crispEdges").raise();
12686
12687
  return gTag;
12687
12688
  } catch (error) {
12688
12689
  throw error;
@@ -12843,9 +12844,6 @@ function getTransformStringForXaxisLabelPosition(barChart, margin, formatOptions
12843
12844
  }
12844
12845
  function setXaxistitle$1(formatOptions, barChart, svg, margin, xLabel, height, xTitle, chartType, yLabel, innerWidth2, innerHeight2) {
12845
12846
  try {
12846
- let xAxisLabelPosition = formatOptions.xAxisLabel.xAxisPosition;
12847
- let chartsWithXScrollFlag = true;
12848
- let chartsWithYScrollFlag = false;
12849
12847
  let object2 = svg.append("foreignObject").attr(
12850
12848
  "visibility",
12851
12849
  formatOptions.xAxisTitle.xAxisTitleVisibility ? "visible" : "hidden"
@@ -13214,7 +13212,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
13214
13212
  width: 15
13215
13213
  },
13216
13214
  color: d.Labelcolor,
13217
- type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
13215
+ type: annotationTypeforCharts$1(d3Annotation2, parseFloat(annotationType)),
13218
13216
  height,
13219
13217
  width
13220
13218
  };
@@ -13226,7 +13224,9 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
13226
13224
  }
13227
13225
  });
13228
13226
  if (formatOptions.annotation.annotationHideZeroValues) {
13229
- annotationsList = annotationsList.filter((d) => d.data.y.measure != 0);
13227
+ annotationsList = annotationsList.filter(
13228
+ (d) => barChart ? d.data.x.measure !== 0 : d.data.y.measure !== 0
13229
+ );
13230
13230
  }
13231
13231
  if (oldAnnotationList.length === 0) {
13232
13232
  oldAnnotationList = annotationsList;
@@ -13742,7 +13742,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
13742
13742
  width: 15
13743
13743
  },
13744
13744
  color: d.labelColor || d.data.labelColor,
13745
- type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
13745
+ type: annotationTypeforCharts$1(d3Annotation2, parseFloat(annotationType)),
13746
13746
  height,
13747
13747
  width
13748
13748
  };
@@ -13799,7 +13799,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
13799
13799
  }
13800
13800
  }
13801
13801
  }
13802
- finalAnnotationList.push(newAnnotation);
13802
+ newAnnotation.data.labelPosition != 4 && finalAnnotationList.push(newAnnotation);
13803
13803
  });
13804
13804
  makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
13805
13805
  x: function(d) {
@@ -13898,7 +13898,7 @@ const conditionallyResetOldAnnotations = (oldAnnotationList, formatOptions, char
13898
13898
  throw error;
13899
13899
  }
13900
13900
  };
13901
- const annotationTypeforCharts = (d3Annotation2, type) => {
13901
+ const annotationTypeforCharts$1 = (d3Annotation2, type) => {
13902
13902
  try {
13903
13903
  let annotationTypeMap = {
13904
13904
  1: d3Annotation2.annotationLabel,
@@ -15124,7 +15124,7 @@ function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin
15124
15124
  width: 15
15125
15125
  },
15126
15126
  color: d.properties && d.properties[dataLabelColor] ? d.properties[dataLabelColor] : d.data.labelColor,
15127
- type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
15127
+ type: annotationTypeforCharts$1(d3Annotation2, parseFloat(annotationType)),
15128
15128
  height,
15129
15129
  width
15130
15130
  };
@@ -15318,7 +15318,7 @@ function getTransformStringForYaxisLabels(isTornadoChart, xaxisLabelPosition, fo
15318
15318
  translate(${-(xScaleBottom(yMaxLeft * 0.01) + xLabelMargin)} ,${-dimHeight / 2})` : `rotate(${90 - formatOptions.xAxisLabel.xAxisLabelRotation})
15319
15319
  translate(${formatOptions.xAxisLabel.xAxisLabelRotation != 0 ? `${xaxisLabelPosition === 1 ? 10 : -xLabelMargin},${-dimHeight / 2}` : -labelWidth / 2 + " ,2"})`;
15320
15320
  }
15321
- const initYaxisBar = (formatOptions, gTag, xLabel, innerHeight2, innerWidth2, yAxis, xAxisTop, xScaleBottom, yMaxLeft, dimensionList, chartType, isDateType, width, dimensionHeightWidthArray, columnWidth, xScale) => {
15321
+ const initYaxisBar = (formatOptions, gTag, xLabel, innerHeight2, innerWidth2, yAxis, xAxisTop, xScaleBottom, yMaxLeft, dimensionList, chartType, isDateType, width, dimensionHeightWidthArray, columnWidth, xScale, xLabelSecondaryAxis) => {
15322
15322
  try {
15323
15323
  const isTornadoChart = chartType === chartTypes.TornadoChart;
15324
15324
  let fontStyle = formatOptions.xAxisLabel.xAxisLabelFontStyle;
@@ -15356,7 +15356,7 @@ const initYaxisBar = (formatOptions, gTag, xLabel, innerHeight2, innerWidth2, yA
15356
15356
  );
15357
15357
  const YaxisG = gTag.append("g").attr("id", "yAxisG").attr(
15358
15358
  "transform",
15359
- isTornadoChart ? `translate(${xScaleBottom(0)},0)` : `translate(${xaxisLabelPosition === 0 ? 0 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0)},0)`
15359
+ isTornadoChart ? `translate(${xScaleBottom(0)},0)` : `translate(${xaxisLabelPosition === 0 ? 0 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0)},${xAxisTop ? xLabelSecondaryAxis : 0})`
15360
15360
  ).call(yAxis);
15361
15361
  let foreignObject = YaxisG.selectAll("g").append("foreignObject").attr("class", "testingoverflowing").style("align-content", "center").attr("width", xLabelMargin).attr("height", dimHeight + "px").attr(
15362
15362
  "transform",
@@ -15473,14 +15473,14 @@ const dataLabelsPositionForBarChartFamily = (formatOptions, xCordinate, position
15473
15473
  throw e;
15474
15474
  }
15475
15475
  };
15476
- const initXaxisTop = (formatOptions, gTag, xLabelSecondary, xAxisTop) => {
15476
+ const initXaxisTop = (formatOptions, gTag, xLabelSecondary, xAxisTop, innerWidth2) => {
15477
15477
  try {
15478
15478
  let fontStyle = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontStyle;
15479
- gTag.append("rect").attr("transform", `translate(0,-${xLabelSecondary})`).attr("height", xLabelSecondary).attr("width", innerWidth).attr(
15479
+ gTag.append("rect").attr("transform", `translate(0,0)`).attr("height", xLabelSecondary).attr("width", innerWidth2).attr(
15480
15480
  "fill",
15481
15481
  formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor !== commonColors.white ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor : "none" : formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor : formatOptions.chartArea.chartAreaColor
15482
15482
  );
15483
- const XaxisG = gTag.append("g").call(xAxisTop).attr("transform", `translate(0,0)`);
15483
+ const XaxisG = gTag.append("g").call(xAxisTop).attr("transform", `translate(0,${xLabelSecondary})`);
15484
15484
  XaxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em").attr("stroke-opacity", formatOptions.plotArea.fitChart ? "1" : "0");
15485
15485
  XaxisG.selectAll("text").attr("transform", "rotate(270) translate(5,5)").style("text-anchor", "start").style("fill", formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor !== commonColors.white ? formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor : "none").style("font-size", formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontSize).style("font-family", formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontFamily).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
15486
15486
  "text-decoration",
@@ -15678,7 +15678,7 @@ function addTotalValue(totalValueMap, xScale, yScale, margin, d3Annotation2, old
15678
15678
  width: 15
15679
15679
  },
15680
15680
  color: formatOptions.total.totalColor,
15681
- type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
15681
+ type: annotationTypeforCharts$1(d3Annotation2, parseFloat(annotationType)),
15682
15682
  height,
15683
15683
  width
15684
15684
  };
@@ -15757,6 +15757,13 @@ function createTotalMeasureValueMap(data, totalValueMap, filteredDimension) {
15757
15757
  });
15758
15758
  }
15759
15759
  }
15760
+ function getVerticalGridLinesTickSize(formatOptions, innerHeight2, dataTableHeight, shouldAdjustForAxisPosition = false) {
15761
+ const axisPositionMultiplier = shouldAdjustForAxisPosition ? formatOptions.xAxisLabel.xAxisPosition == "1" ? -1 : 1 : 1;
15762
+ const dataTableHeightIfPreset = dataTableHeight > 0 ? dataTableHeight : 0;
15763
+ const tickHeightPercentage = parseFloat(formatOptions.plotArea.ticksHeight) || 100;
15764
+ const actualTickHeight = (innerHeight2 - dataTableHeightIfPreset) * tickHeightPercentage / 100;
15765
+ return formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -actualTickHeight * axisPositionMultiplier : 0 : 0;
15766
+ }
15760
15767
  const chartProperties = {
15761
15768
  color: "defaultColor",
15762
15769
  name: "",
@@ -17339,6 +17346,12 @@ const ColumnChart = ({
17339
17346
  ).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
17340
17347
  }
17341
17348
  if (isSecondaryAxisDrawn) {
17349
+ let seondaryResponsiveLablesObj = responsiveSecondaryYaxisLabel(
17350
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : yScaleRight.domain()[1],
17351
+ yScaleRight.domain()[0],
17352
+ formatOptions,
17353
+ innerHeight2
17354
+ );
17342
17355
  yAxisRight = axisRight(yScaleRight).tickFormat(
17343
17356
  (d) => getNumberWithFormat(
17344
17357
  d,
@@ -17347,19 +17360,9 @@ const ColumnChart = ({
17347
17360
  formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
17348
17361
  )
17349
17362
  ).tickValues(
17350
- responsiveSecondaryYaxisLabel(
17351
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
17352
- chartJSON.yMinRight,
17353
- formatOptions,
17354
- chartJSON
17355
- ).secondaryYAxisLabelArray
17363
+ seondaryResponsiveLablesObj.autoLabelFlag ? void 0 : seondaryResponsiveLablesObj.secondaryYAxisLabelArray
17356
17364
  ).ticks(
17357
- responsiveSecondaryYaxisLabel(
17358
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
17359
- chartJSON.yMinRight,
17360
- formatOptions,
17361
- chartJSON
17362
- ).secondaryCustomTickValue ?? innerHeight2 / 30
17365
+ seondaryResponsiveLablesObj.secondaryCustomTickValue ?? innerHeight2 / 30
17363
17366
  ).tickSize(
17364
17367
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
17365
17368
  ).tickPadding(8).tickSizeOuter(0);
@@ -17368,7 +17371,7 @@ const ColumnChart = ({
17368
17371
  const getXAxis = () => {
17369
17372
  let xaxisLabelPosition = parseInt(formatOptions.xAxisLabel.xAxisPosition);
17370
17373
  xAxis = (xaxisLabelPosition == 1 ? axisTop(xScale) : axisBottom(xScale)).tickSize(
17371
- formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? formatOptions.plotArea.gridLinesVertical ? -(dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2) : -formatOptions.plotArea.ticksHeight * ((dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2) / 100) : 0 : 0
17374
+ getVerticalGridLinesTickSize(formatOptions, innerHeight2, dataTableHeight)
17372
17375
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
17373
17376
  };
17374
17377
  const getChartType = (lineData) => {
@@ -17849,7 +17852,7 @@ const CustomColumnChart = ({
17849
17852
  ...point2,
17850
17853
  type: series.properties.type,
17851
17854
  axis: series.properties.axis,
17852
- labelPosition: formatOptions?.annotation?.annotationPosition.toString() === "4" ? series.properties.dataLabelPosition.toString() : formatOptions?.annotation?.annotationPosition.toString(),
17855
+ labelPosition: formatOptions?.annotation?.annotationPosition.toString() === "4" ? series.properties.annotationPosition.toString() : formatOptions?.annotation?.annotationPosition.toString(),
17853
17856
  labelColor: series.properties.labelColor,
17854
17857
  legendUniqueId: series.properties.legendUniqueId
17855
17858
  };
@@ -18002,7 +18005,7 @@ const CustomColumnChart = ({
18002
18005
  secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
18003
18006
  secondaryCustomYaxisMinValue ? secondaryCustomYaxisMinValue : chartJSON.yMinRight,
18004
18007
  formatOptions,
18005
- chartJSON
18008
+ innerHeight2
18006
18009
  ).secondaryYAxisLabelArray;
18007
18010
  chartJSON.yMaxRight = secondaryYAxisLabelArray[secondaryYAxisLabelArray.length - 1];
18008
18011
  chartJSON.yMinRight = secondaryYAxisLabelArray[0];
@@ -18572,7 +18575,7 @@ const CustomColumnChart = ({
18572
18575
  stackData["individualAnnotationVisibility"] = JSON.parse(
18573
18576
  JSON.stringify(requiredStackChatData.data[j].properties.annotation)
18574
18577
  );
18575
- d.data.labelPosition = formatOptions?.annotation?.annotationPosition.toString() === "4" ? requiredStackChatData.data[j].properties.dataLabelPosition.toString() : formatOptions?.annotation?.annotationPosition.toString();
18578
+ d.data.labelPosition = formatOptions?.annotation?.annotationPosition.toString() === "4" ? requiredStackChatData.data[j].properties.annotationPosition.toString() : formatOptions?.annotation?.annotationPosition.toString();
18576
18579
  d.data["labelColor"] = seriesColor == "2" ? JSON.parse(
18577
18580
  JSON.stringify(requiredStackChatData.data[j].properties.color)
18578
18581
  ) : JSON.parse(
@@ -19459,7 +19462,7 @@ const StackColumnChart = ({
19459
19462
  };
19460
19463
  const getXAxis = () => {
19461
19464
  xAxis = axisBottom(xScale).tickSize(
19462
- 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
19465
+ getVerticalGridLinesTickSize(formatOptions, innerHeight2, dataTableHeight, true)
19463
19466
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
19464
19467
  };
19465
19468
  const getChartType = (lineData) => {
@@ -20884,6 +20887,137 @@ function initXaxis(gTag, formatOptions, dataTableHeight, xLabel, xAxis, innerHei
20884
20887
  logError$1(fileName$a, "initXaxis", error);
20885
20888
  }
20886
20889
  }
20890
+ function pieFamilyAnnotation(d3Annotation2, chartData, formatOptions, getPiePosition, chartType, width, height, svg, radius) {
20891
+ try {
20892
+ if (!formatOptions.annotation.annotationVisibility) return;
20893
+ const AnnotationType = formatOptions.plotArea.annotationType ?? "1";
20894
+ const Disable = [AnnotationType === "1" ? "connector" : ""];
20895
+ const ConnectorType = formatOptions.plotArea.connectorType?.toLowerCase() ?? "none";
20896
+ const rotationAngle = formatOptions.plotArea.rotation ?? 0;
20897
+ const multiplicationFactor = chartType === chartTypes.PieChart ? 1.06 : 1.1;
20898
+ const connecterCurve2 = {
20899
+ "1": "",
20900
+ "2": curveLinear$1,
20901
+ "3": step
20902
+ };
20903
+ const connectedStyle2 = {
20904
+ solid: "unset",
20905
+ Dotted: 2,
20906
+ Dashed: 7
20907
+ };
20908
+ let makeAnnotations = d3Annotation2.annotation();
20909
+ let oldAnnotationList = JSON.parse(
20910
+ JSON.stringify(formatOptions.plotArea.dataLabelsCoordinates || [])
20911
+ );
20912
+ oldAnnotationList.forEach((d) => {
20913
+ d.dx = d.dx * width / d.width;
20914
+ d.dy = d.dy * height / d.height;
20915
+ d.width = width;
20916
+ d.height = height;
20917
+ });
20918
+ const sum2 = chartData.reduce(
20919
+ (a2, b) => a2 + (b?.data?.data?.[0]?.value ?? 0),
20920
+ 0
20921
+ );
20922
+ const safeSum = sum2 === 0 ? 1 : sum2;
20923
+ const createAnnotation = (data, index2) => {
20924
+ const value2 = data.data.data[0].value;
20925
+ const midAngle = (data.x0 + data.x1) / 2;
20926
+ const angleSize = data.x1 - data.x0;
20927
+ return {
20928
+ note: {
20929
+ title: formatOptions.plotArea.dataLabelName ? data.data.legend : "",
20930
+ label: formatOptions.plotArea.dataLabelValue && value2 !== 0 ? formatOptions.plotArea.dataLabelNumberFormat === ",.0%" ? (Math.abs(value2 / safeSum) * 100).toFixed(
20931
+ convertStringToNumber(
20932
+ formatOptions.plotArea.dataLabelDecimalPrecision
20933
+ )
20934
+ ) + "%" : getNumberWithFormatFunction(
20935
+ formatOptions.plotArea.plotAreaDisplayUnits,
20936
+ formatOptions.plotArea.dataLabelNumberFormat,
20937
+ formatOptions.plotArea.dataLabelDecimalPrecision
20938
+ )(value2) : "",
20939
+ align: "middle",
20940
+ wrap: 1e3
20941
+ },
20942
+ data: {
20943
+ x: { legend: data.data.legend },
20944
+ y: { value: value2 },
20945
+ x0: data.x0,
20946
+ x1: data.x1,
20947
+ y0: data.y0,
20948
+ y1: data.y1,
20949
+ midAngle,
20950
+ isVisible: true,
20951
+ Data: data.data.properties
20952
+ },
20953
+ connector: {
20954
+ end: ConnectorType,
20955
+ curve: connecterCurve2[formatOptions.plotArea.connectorCurve]
20956
+ },
20957
+ disable: Disable,
20958
+ subject: { radius: 3 },
20959
+ type: annotationTypeforCharts(d3Annotation2, AnnotationType),
20960
+ color: formatOptions.plotArea.dataLabelNameColor ?? "#000",
20961
+ width,
20962
+ height,
20963
+ index: index2
20964
+ };
20965
+ };
20966
+ let AnnotationsList = chartData.filter((d) => d.x1 - d.x0 > 1e-4).map(createAnnotation);
20967
+ const visibleFilter = (d) => (d.data.y0 + d.data.y1) / 2 * (d.data.x1 - d.data.x0) > 0.17;
20968
+ AnnotationsList = AnnotationsList.filter(visibleFilter);
20969
+ oldAnnotationList = oldAnnotationList.filter(visibleFilter);
20970
+ oldAnnotationList.forEach((oldA) => {
20971
+ const match = AnnotationsList.find(
20972
+ (a2) => a2.data.x.legend === oldA.data.x.legend
20973
+ );
20974
+ if (match) {
20975
+ match.dx = oldA.dx;
20976
+ match.dy = oldA.dy;
20977
+ match.data.isVisible = oldA.data.isVisible ?? true;
20978
+ match.connector.points = oldA.connector?.points;
20979
+ }
20980
+ });
20981
+ makeAnnotations.editMode(formatOptions.plotArea.annotationDraggable).accessors({
20982
+ x(d) {
20983
+ const r = radius;
20984
+ const a2 = d.midAngle + rotationAngle * Math.PI / 180;
20985
+ return Math.cos(d.midAngle - Math.PI / 2) * (radius * 0.65);
20986
+ },
20987
+ y(d) {
20988
+ const r = radius;
20989
+ const a2 = d.midAngle + rotationAngle * Math.PI / 180;
20990
+ return Math.sin(d.midAngle - Math.PI / 2) * (radius * 0.65);
20991
+ }
20992
+ }).annotations(AnnotationsList);
20993
+ const annotations = svg.append("g").attr("class", "annotation-group parentGroup").attr("transform", getPiePosition).call(makeAnnotations);
20994
+ annotations.selectAll("rect,.annotation-subject,.handle").remove();
20995
+ annotations.selectAll(".connector").style("stroke", formatOptions.plotArea.connectorColor ?? "#ccc").attr(
20996
+ "stroke-dasharray",
20997
+ connectedStyle2[formatOptions.plotArea.connectorStyle]
20998
+ );
20999
+ annotations.selectAll(".annotation-note-label").filter((d) => !d.data.isVisible).style("display", "none");
21000
+ annotations.selectAll(".annotation-note-label").filter((d) => formatOptions.plotArea.hideInsignificantValue && d.data.x1 - d.data.x0 < 0.09).style("visibility", "hidden");
21001
+ formatOptions.plotArea.dataLabelsCoordinates = AnnotationsList;
21002
+ } catch (error) {
21003
+ throw error;
21004
+ }
21005
+ }
21006
+ const annotationTypeforCharts = (d3Annotation2, type) => {
21007
+ try {
21008
+ let annotationTypeMap = {
21009
+ 1: d3Annotation2.annotationLabel,
21010
+ 2: d3Annotation2.annotationLabel,
21011
+ 3: d3Annotation2.annotationCallout,
21012
+ 4: d3Annotation2.annotationCalloutElbow,
21013
+ 5: d3Annotation2.annotationCalloutCurve
21014
+ };
21015
+ let annotationType = annotationTypeMap[type];
21016
+ return annotationType;
21017
+ } catch (error) {
21018
+ throw error;
21019
+ }
21020
+ };
20887
21021
  const setnumberOfBubbles = (svg, legendPosition, chartFormatOptions, height, width, margins, innnerHeight, xTitleHeight, XLabelHeight, bubbleCount) => {
20888
21022
  try {
20889
21023
  if (chartFormatOptions.plotArea.numberOfBubbles) {
@@ -21602,17 +21736,19 @@ const LineChart = ({
21602
21736
  yTitle,
21603
21737
  yLabel
21604
21738
  );
21605
- yAxistitleRight(
21606
- svg,
21607
- isSecondaryAxisDrawn,
21608
- margin,
21609
- formatOptions,
21610
- dataTableHeight,
21611
- innerHeight2,
21612
- innerWidth2,
21613
- secondaryYLabel,
21614
- secondaryAxisTitleWidth
21615
- );
21739
+ if (isSecondaryAxisDrawn) {
21740
+ yAxistitleRight(
21741
+ svg,
21742
+ isSecondaryAxisDrawn,
21743
+ margin,
21744
+ formatOptions,
21745
+ dataTableHeight,
21746
+ innerHeight2,
21747
+ innerWidth2,
21748
+ secondaryYLabel,
21749
+ secondaryAxisTitleWidth
21750
+ );
21751
+ }
21616
21752
  setChartTitle(svg, formatOptions, width, chartTitleHeight);
21617
21753
  drawLegends(
21618
21754
  height,
@@ -21771,10 +21907,10 @@ const LineChart = ({
21771
21907
  }
21772
21908
  if (isSecondaryAxisDrawn) {
21773
21909
  let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
21774
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
21775
- chartJSON.yMinRight,
21910
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : yScaleRight.domain()[1],
21911
+ yScaleRight.domain()[0],
21776
21912
  formatOptions,
21777
- chartJSON
21913
+ innerHeight2
21778
21914
  );
21779
21915
  yAxisRight = axisRight(yScaleRight).tickFormat(
21780
21916
  (d) => getNumberWithFormat(
@@ -23206,7 +23342,7 @@ const HorizontalBarChart = ({
23206
23342
  xAxisBottom
23207
23343
  );
23208
23344
  if (isSecondaryAxisDrawn) {
23209
- initXaxisTop(formatOptions, gTag, secondaryYLabel, xAxisTop);
23345
+ initXaxisTop(formatOptions, gTag, secondaryYLabel, xAxisTop, innerWidth2);
23210
23346
  }
23211
23347
  setXaxistitle$1(
23212
23348
  formatOptions,
@@ -23232,7 +23368,7 @@ const HorizontalBarChart = ({
23232
23368
  yLabel,
23233
23369
  innerWidth2
23234
23370
  );
23235
- yAxistitleRight(
23371
+ formatOptions.xAxisLabel.xAxisPosition == "2" && yAxistitleRight(
23236
23372
  svg,
23237
23373
  isSecondaryAxisDrawn,
23238
23374
  margin,
@@ -23381,10 +23517,10 @@ const HorizontalBarChart = ({
23381
23517
  }
23382
23518
  if (isSecondaryAxisDrawn) {
23383
23519
  let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
23384
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
23385
- chartJSON.yMinRight,
23520
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : xScaleTop.domain()[1],
23521
+ xScaleTop.domain()[0],
23386
23522
  formatOptions,
23387
- chartJSON
23523
+ innerWidth2
23388
23524
  );
23389
23525
  xAxisTop = axisTop(xScaleTop).tickFormat(
23390
23526
  (d) => getNumberWithFormat(
@@ -23396,7 +23532,7 @@ const HorizontalBarChart = ({
23396
23532
  ).tickValues(
23397
23533
  responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray
23398
23534
  ).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
23399
- formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
23535
+ formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 : 0 : 0
23400
23536
  ).tickPadding(8).tickSizeOuter(0);
23401
23537
  }
23402
23538
  };
@@ -23446,10 +23582,10 @@ const HorizontalBarChart = ({
23446
23582
  return d.value >= 0 ? xScaleUsed(0) : xScaleUsed(0);
23447
23583
  }).attr("width", 0).attr("fill", data2.properties.color).attr(
23448
23584
  "stroke-dasharray",
23449
- (d) => d.stackBorderStyle === 2 ? "5,3" : "0"
23450
- ).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
23585
+ (d) => d.properties.stackBorderStyle == 2 ? "5,3" : "0"
23586
+ ).attr("stroke-width", (d) => `${d.properties.stackBorderWidth}px`).attr(
23451
23587
  "stroke",
23452
- (d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
23588
+ (d) => data2.properties.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderColor : "none"
23453
23589
  ).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
23454
23590
  "visibility",
23455
23591
  (d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
@@ -23540,7 +23676,8 @@ const HorizontalBarChart = ({
23540
23676
  width,
23541
23677
  dimensionHeightWidthArray,
23542
23678
  columnWidth,
23543
- yScale
23679
+ yScale,
23680
+ secondaryYLabel
23544
23681
  );
23545
23682
  getChartType(filteredData);
23546
23683
  commonAnnotations(
@@ -24450,7 +24587,7 @@ const NormalizedStackHorizontalBarChart = ({
24450
24587
  margin,
24451
24588
  yTitle,
24452
24589
  yLabel,
24453
- void 0
24590
+ innerWidth2
24454
24591
  );
24455
24592
  setChartTitle(svg, formatOptions, width, chartTitleHeight);
24456
24593
  drawLegends(
@@ -25056,6 +25193,7 @@ const LayeredHorizontalBarChart = ({
25056
25193
  lData.data.forEach((cData) => {
25057
25194
  cData.hideZero = lData.properties.hideZeroValues;
25058
25195
  cData.axis = lData.properties.axis;
25196
+ cData["properties"] = lData.properties;
25059
25197
  });
25060
25198
  });
25061
25199
  lineData.forEach((data2, index2) => {
@@ -25959,7 +26097,7 @@ const AreaChart = ({
25959
26097
  );
25960
26098
  const dimensionList = data.DimensionList;
25961
26099
  const barChart = false;
25962
- const isSecondaryAxisDrawn = false;
26100
+ let isSecondaryAxisDrawn = false;
25963
26101
  const isNormalizedChart = false;
25964
26102
  let customYaxisMinValue = formatOptions.yAxisLabel.yAxisIntervalsVisibility ? parseFloat(formatOptions.yAxisLabel.yAxisMinText) : void 0;
25965
26103
  let customYaxisMaxValue = formatOptions.yAxisLabel.yAxisIntervalsVisibility ? parseFloat(formatOptions.yAxisLabel.yAxisMaxText) : void 0;
@@ -25990,11 +26128,13 @@ const AreaChart = ({
25990
26128
  let svg;
25991
26129
  let gTag;
25992
26130
  let yScaleLeft;
26131
+ let yScaleRight;
25993
26132
  let xScale;
25994
26133
  let calculatedRange;
25995
26134
  let seriesLabelWidth;
25996
26135
  let yAxisLeft;
25997
26136
  let xAxis;
26137
+ let yAxisRight;
25998
26138
  let filteredDimension;
25999
26139
  let filteredData = [];
26000
26140
  let scrollPosition = 0;
@@ -26102,6 +26242,17 @@ const AreaChart = ({
26102
26242
  yAxisLeft,
26103
26243
  innerHeight2
26104
26244
  );
26245
+ if (isSecondaryAxisDrawn) {
26246
+ initYaxisRight(
26247
+ gTag,
26248
+ formatOptions,
26249
+ dataTableHeight,
26250
+ secondaryYLabel,
26251
+ yAxisRight,
26252
+ innerHeight2,
26253
+ innerWidth2
26254
+ );
26255
+ }
26105
26256
  setXaxistitle$1(
26106
26257
  formatOptions,
26107
26258
  barChart,
@@ -26184,7 +26335,11 @@ const AreaChart = ({
26184
26335
  );
26185
26336
  series.data.forEach((point2) => {
26186
26337
  allChartData.push(point2);
26187
- {
26338
+ if (series.properties.axis === "Secondary") {
26339
+ isSecondaryAxisDrawn = true;
26340
+ yMaxRight = Math.max(yMaxRight, point2.value);
26341
+ yMinRight = Math.min(yMinRight, point2.value);
26342
+ } else {
26188
26343
  yMaxLeft = Math.max(yMaxLeft, point2.value);
26189
26344
  yMinLeft = Math.min(yMinLeft, point2.value);
26190
26345
  }
@@ -26234,6 +26389,15 @@ const AreaChart = ({
26234
26389
  0
26235
26390
  ]);
26236
26391
  }
26392
+ if (isSecondaryAxisDrawn) {
26393
+ yScaleRight = linear$1().domain([
26394
+ chartJSON.yMinRight >= 0 ? (secondaryCustomYaxisMinValue || secondaryCustomYaxisMinValue == 0) && !Number.isNaN(secondaryCustomYaxisMinValue) ? secondaryCustomYaxisMinValue : 0 : (secondaryCustomYaxisMinValue || secondaryCustomYaxisMinValue == 0) && !Number.isNaN(secondaryCustomYaxisMinValue) ? secondaryCustomYaxisMinValue : chartJSON.yMinRight * 1.1,
26395
+ chartJSON.yMaxRight <= 0 ? secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : 0 : secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight * 1.1
26396
+ ]).range([
26397
+ dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2,
26398
+ 0
26399
+ ]);
26400
+ }
26237
26401
  calculatedRange = [0, innerWidth2];
26238
26402
  if (formatOptions.seriesLabel.seriesLabelVisibility) {
26239
26403
  let labelObj = prepareDataForSeriesLabel(
@@ -26279,6 +26443,28 @@ const AreaChart = ({
26279
26443
  responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
26280
26444
  ).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
26281
26445
  }
26446
+ if (isSecondaryAxisDrawn) {
26447
+ let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
26448
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : yScaleRight.domain()[1],
26449
+ yScaleRight.domain()[0],
26450
+ formatOptions,
26451
+ innerHeight2
26452
+ );
26453
+ yAxisRight = axisRight(yScaleRight).tickFormat(
26454
+ (d) => getNumberWithFormat(
26455
+ d,
26456
+ formatOptions.secondaryYAxisLabel.secondaryYAxisDisplayUnits,
26457
+ formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
26458
+ formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
26459
+ )
26460
+ ).tickValues(
26461
+ responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray
26462
+ ).ticks(
26463
+ responsiveSecondaryLablesObj.secondaryCustomTickValue ?? innerHeight2 / 30
26464
+ ).tickSize(
26465
+ formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
26466
+ ).tickSizeOuter(0);
26467
+ }
26282
26468
  };
26283
26469
  const getXAxis = () => {
26284
26470
  xAxis = axisBottom(xScale).tickSize(
@@ -26295,7 +26481,7 @@ const AreaChart = ({
26295
26481
  });
26296
26482
  const areaGenerator = area().x(
26297
26483
  (d) => xScale(d.dimension) ? xScale(d.dimension) : null
26298
- ).y0(() => yScaleLeft(0)).y1((d) => yScaleLeft(d.value)).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
26484
+ ).y0((d) => d.axis === axisTypes.primary ? yScaleLeft(0) : yScaleRight(0)).y1((d) => d.axis === axisTypes.primary ? yScaleLeft(d.value) : yScaleRight(d.value)).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
26299
26485
  const areaGeneratorStart = area().x(
26300
26486
  (d) => xScale(d.dimension) ? xScale(d.dimension) : null
26301
26487
  ).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
@@ -26359,7 +26545,7 @@ const AreaChart = ({
26359
26545
  chartType,
26360
26546
  xScale,
26361
26547
  yScaleLeft,
26362
- void 0,
26548
+ yScaleRight,
26363
26549
  null,
26364
26550
  formatOptions,
26365
26551
  chartJSON,
@@ -26384,29 +26570,11 @@ const AreaChart = ({
26384
26570
  const drawAreaChart = () => {
26385
26571
  getXScale();
26386
26572
  getXAxis();
26387
- initXaxis$1(
26388
- gTag,
26389
- chartJSON,
26390
- xLabel,
26391
- formatOptions,
26392
- dataTableHeight,
26393
- yScaleLeft,
26394
- xAxis,
26395
- dimensionHeightWidthArray,
26396
- height,
26397
- barWidth,
26398
- isDateType,
26399
- innerWidth2,
26400
- innerHeight2,
26401
- filteredDimension,
26402
- xScale
26403
- );
26404
26573
  commonAnnotations(
26405
26574
  seriesData,
26406
26575
  xScale,
26407
26576
  yScaleLeft,
26408
- void 0,
26409
- // need to pass secondary axis scale if secondary axis is drawn
26577
+ yScaleRight,
26410
26578
  margin,
26411
26579
  d3Annotation,
26412
26580
  [],
@@ -26437,6 +26605,23 @@ const AreaChart = ({
26437
26605
  isSecondaryAxisDrawn
26438
26606
  ).labelArray;
26439
26607
  getChartType(filteredData);
26608
+ initXaxis$1(
26609
+ gTag,
26610
+ chartJSON,
26611
+ xLabel,
26612
+ formatOptions,
26613
+ dataTableHeight,
26614
+ yScaleLeft,
26615
+ xAxis,
26616
+ dimensionHeightWidthArray,
26617
+ height,
26618
+ barWidth,
26619
+ isDateType,
26620
+ innerWidth2,
26621
+ innerHeight2,
26622
+ filteredDimension,
26623
+ xScale
26624
+ );
26440
26625
  drawSeriesLabels(formatOptions, gTag, newSeriesLabelArray);
26441
26626
  if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
26442
26627
  if (formatOptions.xAxisLabel.xAxisPosition != "1")
@@ -26935,6 +27120,7 @@ const StackAreaChart = ({
26935
27120
  const drawLineChart = () => {
26936
27121
  getXScale();
26937
27122
  getXAxis();
27123
+ getChartType(filteredData);
26938
27124
  initXaxis$1(
26939
27125
  gTag,
26940
27126
  chartJSON,
@@ -26952,7 +27138,6 @@ const StackAreaChart = ({
26952
27138
  filteredDimension,
26953
27139
  xScale
26954
27140
  );
26955
- getChartType(filteredData);
26956
27141
  stacklineAnnotations(
26957
27142
  stackChartData,
26958
27143
  xScale,
@@ -27780,7 +27965,22 @@ const PieChart = ({ data, formatOptions, chartId }) => {
27780
27965
  );
27781
27966
  initPieChartData();
27782
27967
  drawPieChart();
27783
- drawPieDataLabels();
27968
+ if (chartFormatOptions.plotArea.annotationDraggable && chartFormatOptions.plotArea.dataLabels) {
27969
+ pieFamilyAnnotation.call(
27970
+ void 0,
27971
+ d3Annotation,
27972
+ pieChartData,
27973
+ chartFormatOptions,
27974
+ getPiePosition(),
27975
+ chartTypes.PieChart,
27976
+ width,
27977
+ height,
27978
+ chartAreaTagG,
27979
+ Math.min(innerHeight2 * 0.5, innerWidth2 * 0.5)
27980
+ );
27981
+ } else {
27982
+ drawPieDataLabels();
27983
+ }
27784
27984
  drawTotalValue(
27785
27985
  chartFormatOptions,
27786
27986
  pieTotalValue,
@@ -27934,7 +28134,7 @@ const PieChart = ({ data, formatOptions, chartId }) => {
27934
28134
  (d) => getDataLabelTransformString(d, isSingleDataLabel)
27935
28135
  ).attr(
27936
28136
  "visibility",
27937
- (d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible"
28137
+ (d) => d.endAngle - d.startAngle < 0.09 && formatOptions.plotArea.hideInsignificantValue ? "hidden" : "visible"
27938
28138
  ).attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
27939
28139
  const { plotArea } = chartFormatOptions;
27940
28140
  if (plotArea.dataLabelName) {
@@ -28175,7 +28375,22 @@ const DonutChart = ({
28175
28375
  );
28176
28376
  initPieChartData();
28177
28377
  drawDonutChart();
28178
- drawDonutDataLabels();
28378
+ if (chartFormatOptions.plotArea.annotationDraggable && chartFormatOptions.plotArea.dataLabels) {
28379
+ pieFamilyAnnotation.call(
28380
+ void 0,
28381
+ d3Annotation,
28382
+ pieChartData,
28383
+ chartFormatOptions,
28384
+ getPiePosition(),
28385
+ chartTypes.DonutChart,
28386
+ width,
28387
+ height,
28388
+ chartAreaTagG,
28389
+ Math.min(innerHeight2 * 0.5, innerWidth2 * 0.5)
28390
+ );
28391
+ } else {
28392
+ drawDonutDataLabels();
28393
+ }
28179
28394
  drawTotalValue2();
28180
28395
  };
28181
28396
  const loopOverSeriesData = () => {
@@ -30272,7 +30487,7 @@ const Speedometer = ({
30272
30487
  "font-family",
30273
30488
  chartFormatOptions.pointerValue.pointerValueFontFamily
30274
30489
  ).text(
30275
- (d) => `${KPIName}: ${!chartFormatOptions.pointerValue.pointerValueAlias || d != 0 ? getNumberWithFormatFunction(
30490
+ (d) => `${KPIName}: ${!chartFormatOptions.pointerValue.pointerValueAlias && d != 0 ? getNumberWithFormatFunction(
30276
30491
  "None",
30277
30492
  chartFormatOptions.pointerValue.pointerValueNumberFormat,
30278
30493
  chartFormatOptions.pointerValue.pointerValueDecimalPrecision
@@ -54742,7 +54957,8 @@ const WaterfallChart = ({
54742
54957
  };
54743
54958
  const preProcessChartData = () => {
54744
54959
  if (isAdvancedWaterfall) {
54745
- const tempWaterfallChartData2 = mapAdvancedWaterfallData(data);
54960
+ let tempWaterfallChartData2 = mapAdvancedWaterfallData(data);
54961
+ tempWaterfallChartData2 = tempWaterfallChartData2.filter((d) => d.up + d.down + d.base != 0);
54746
54962
  chartJSON.dimensionList = tempWaterfallChartData2.map((d) => d.xKey);
54747
54963
  chartJSON.legendList = chartJSON.dimensionList;
54748
54964
  waterFallData = stack().keys(["base", "dimensionTotal", "up", "down"])(
@@ -55734,8 +55950,8 @@ const TornadoChart = ({
55734
55950
  drawColumnChart();
55735
55951
  };
55736
55952
  const drawColumnChart = () => {
55737
- getChartType();
55738
55953
  initXaxisBar(formatOptions, gTag, xLabel, innerHeight2, innerWidth2, xAxis);
55954
+ getChartType();
55739
55955
  commonAnnotations(
55740
55956
  filteredData,
55741
55957
  yScaleLeft,