pace-chart-lib 1.0.7 → 1.0.9

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.
@@ -11404,7 +11404,8 @@ const defaultChartFormatOptions = {
11404
11404
  dataTableFontStyle: [],
11405
11405
  dataTableNumberFormat: ",",
11406
11406
  dataTableDecimalPrecision: "2",
11407
- dataTableDisplayUnits: "None"
11407
+ dataTableDisplayUnits: "None",
11408
+ dataTableLabelColor: "#000000"
11408
11409
  },
11409
11410
  dataTableOuterBorder: {
11410
11411
  borderButtonVisibility: true,
@@ -11602,6 +11603,7 @@ function computeMarginMetrics(windowWidth, windowHeight, maxNumberForPrimaryAxis
11602
11603
  )[1] : 0;
11603
11604
  yTitle = yTitle > width * 0.1 ? width * 0.1 : yTitle;
11604
11605
  let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0);
11606
+ yLabel += 8;
11605
11607
  let secondaryYLabel = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? responsiveYaxisMargin(
11606
11608
  maxNumberForSecondaryAxis,
11607
11609
  yMaxRight,
@@ -11729,8 +11731,8 @@ function calculateVerticalMargins(windowWidth, windowHeight, maxNumberForPrimary
11729
11731
  xAxisObject,
11730
11732
  isBarChart
11731
11733
  );
11732
- const legendPosition = formatOptions.legends.legendPosition;
11733
11734
  const legendVisibility = formatOptions.legends.legendVisibility;
11735
+ const legendPosition = legendVisibility ? formatOptions.legends.legendPosition : staticLegendPosition.none;
11734
11736
  const scrollHeightConstant = isScrollbarVisible ? 12 : 0;
11735
11737
  const xAxisRelatedMargin = isBarChart ? metrics.yTitle + metrics.yLabel : metrics.xTitle + metrics.xLabel;
11736
11738
  let top2 = 0;
@@ -12045,20 +12047,7 @@ function getNumberWithFormat(measureValue, displayUnits, numberFormat, decimalPr
12045
12047
  let decimalValues = decimalPrescision;
12046
12048
  let formatter;
12047
12049
  if (displayUnits === "Auto") {
12048
- if (Math.abs(measureValue) >= 1e9) {
12049
- Unit = 1e9;
12050
- displayUnitsPostFix = "B";
12051
- } else if (Math.abs(measureValue) >= 1e6) {
12052
- Unit = 1e6;
12053
- displayUnitsPostFix = "M";
12054
- } else if (Math.abs(measureValue) >= 1e3) {
12055
- Unit = 1e3;
12056
- displayUnitsPostFix = "K";
12057
- } else {
12058
- Unit = 1;
12059
- displayUnitsPostFix = "";
12060
- }
12061
- measureValue = measureValue / Unit;
12050
+ return getAutoNumberWithFormat(measureValue);
12062
12051
  } else if (displayUnits != staticDisplayUnits.none) {
12063
12052
  displayUnits == staticDisplayUnits.thousands ? (Unit = 1e3, displayUnitsPostFix = "K") : null;
12064
12053
  displayUnits == staticDisplayUnits.millions ? (Unit = 1e6, displayUnitsPostFix = "M") : null;
@@ -12107,6 +12096,26 @@ function getNumberWithFormat(measureValue, displayUnits, numberFormat, decimalPr
12107
12096
  throw error;
12108
12097
  }
12109
12098
  }
12099
+ function getAutoNumberWithFormat(value2) {
12100
+ if (value2 === null || value2 === void 0 || isNaN(value2)) return "-";
12101
+ const absValue = Math.abs(value2);
12102
+ if (absValue >= 1e9) {
12103
+ return format(".2s")(value2).replace("G", "B");
12104
+ } else if (absValue >= 1e6) {
12105
+ return format(".2s")(value2);
12106
+ } else if (absValue >= 1e3) {
12107
+ return format(".2s")(value2);
12108
+ } else if (absValue >= 1) {
12109
+ const formatted = format(".2f")(value2);
12110
+ return +formatted === Math.floor(value2) ? format(".0f")(value2) : formatted;
12111
+ } else if (absValue >= 0.01) {
12112
+ return format(".2f")(value2);
12113
+ } else if (absValue > 0) {
12114
+ return format(".2e")(value2);
12115
+ } else {
12116
+ return "0";
12117
+ }
12118
+ }
12110
12119
  function responsiveYaxisMargin(maxNumber, yMax, formatOptions, isSecondaryAxis, isNormalizedChart) {
12111
12120
  try {
12112
12121
  {
@@ -12120,8 +12129,7 @@ function responsiveYaxisMargin(maxNumber, yMax, formatOptions, isSecondaryAxis,
12120
12129
  if (displayUnits != "None") {
12121
12130
  yMaxNumber = getNumberWithFormat(
12122
12131
  Math.floor(maxNumber) || Math.floor(yMax),
12123
- "Auto",
12124
- //displayUnits,
12132
+ displayUnits,
12125
12133
  numberFormat,
12126
12134
  decimalPrecision ?? "2"
12127
12135
  ).toString();
@@ -12156,6 +12164,7 @@ function responsiveYaxisMargin(maxNumber, yMax, formatOptions, isSecondaryAxis,
12156
12164
  }
12157
12165
  function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptions, chartJSON) {
12158
12166
  try {
12167
+ let autoLabelFlag = false;
12159
12168
  let secondaryCustomYaxisIntervalValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisIntervalText);
12160
12169
  let secondaryCustomYaxisMinValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMinText);
12161
12170
  let secondaryCustomYaxisMaxValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText);
@@ -12197,6 +12206,7 @@ function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptio
12197
12206
  }
12198
12207
  }
12199
12208
  } else {
12209
+ let autoLabelFlag2 = true;
12200
12210
  let labelWidthPx = calculateWidthHeightDynamically(
12201
12211
  (parseFloat(formatOptions.yAxisLabel.yAxisMaxText) || chartJSON.yMaxRight).toString(),
12202
12212
  formatOptions.yAxisLabel.yAxisLabelFontSize,
@@ -12210,7 +12220,7 @@ function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptio
12210
12220
  labelWidthPx[0]
12211
12221
  );
12212
12222
  }
12213
- return { secondaryYAxisLabelArray, secondaryCustomTickValue };
12223
+ return { secondaryYAxisLabelArray, secondaryCustomTickValue, autoLabelFlag };
12214
12224
  } catch (e) {
12215
12225
  }
12216
12226
  }
@@ -12252,11 +12262,17 @@ function isVerticallyOverlapping(obj1, obj2) {
12252
12262
  }
12253
12263
  function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJSON, customYaxisMinValue, customYaxisMaxValue, barChart, innerWidth2) {
12254
12264
  try {
12265
+ let autoLabelFlag = false;
12255
12266
  let customYaxisIntervalValue = parseFloat(
12256
12267
  formatOptions.yAxisLabel.yAxisIntervalText
12257
12268
  );
12258
12269
  let yAxisLabelArray = [];
12259
12270
  let customTickValue;
12271
+ if (!customYaxisMaxValue && Ymax > 0) {
12272
+ const range2 = Ymax - Ymin;
12273
+ const padding = range2 * 0.05;
12274
+ Ymax = Ymax + padding;
12275
+ }
12260
12276
  if (customYaxisIntervalValue && customYaxisIntervalValue !== 0 && customYaxisIntervalValue !== void 0) {
12261
12277
  let minValue = customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : Ymin;
12262
12278
  let maxValue = customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : Ymax;
@@ -12296,6 +12312,7 @@ function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJS
12296
12312
  }
12297
12313
  }
12298
12314
  } else {
12315
+ autoLabelFlag = true;
12299
12316
  let labelWidthPx = calculateWidthHeightDynamically(
12300
12317
  (customYaxisMaxValue || chartJSON.yMaxLeft).toString(),
12301
12318
  formatOptions.yAxisLabel.yAxisLabelFontSize,
@@ -12304,13 +12321,14 @@ function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJS
12304
12321
  );
12305
12322
  yAxisLabelArray = getLabelsFromAlgo(
12306
12323
  customYaxisMinValue || chartJSON.yMinLeft,
12307
- customYaxisMaxValue || chartJSON.yMaxLeft,
12324
+ Ymax,
12325
+ //Use updated Ymax with padding
12308
12326
  barChart ? innerWidth2 : innerHeight2,
12309
12327
  barChart ? labelWidthPx[1] : labelWidthPx[0]
12310
12328
  );
12311
- customTickValue = barChart ? innerWidth2 / 30 : innerHeight2 / 30;
12329
+ customTickValue = barChart ? innerWidth2 / 80 : innerHeight2 / 80;
12312
12330
  }
12313
- return { yAxisLabelArray, customTickValue };
12331
+ return { yAxisLabelArray, customTickValue, autoLabelFlag };
12314
12332
  } catch (e) {
12315
12333
  throw e;
12316
12334
  }
@@ -12343,9 +12361,7 @@ function getLabelsFromAlgo(dataMin, dataMax, axisLengthPx, labelWidthPx = 80) {
12343
12361
  labels.push(parseFloat(current.toFixed(10)));
12344
12362
  current += interval2;
12345
12363
  }
12346
- const reductionFactor = 4;
12347
- const reducedLabels = labels.filter((i) => i % reductionFactor === 0);
12348
- return reducedLabels;
12364
+ return labels;
12349
12365
  }
12350
12366
  function initYaxis$1(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, innerHeight2) {
12351
12367
  try {
@@ -13029,7 +13045,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
13029
13045
  let axis2 = d.x.axis;
13030
13046
  return dataLabelsPositionForBarChartFamily(formatOptions, d.x.measure ? d.x.measure : 0, d.position, requiredXScale, minValue, void 0, chartType, isSensitivityChart, axis2);
13031
13047
  } else if (chartType === actualChartTypes.column) {
13032
- return xScale(d.x) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2;
13048
+ return xScaleForLegends(d.currentLegend) ? xScale(d.x) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 : xScale(d.x);
13033
13049
  } else {
13034
13050
  return xScale(d.x);
13035
13051
  }
@@ -13047,7 +13063,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
13047
13063
  } else {
13048
13064
  if (barChart) {
13049
13065
  let actualColWidth = chartType === actualChartTypes.tornadoChart || chartType === actualChartTypes.layeredBarChart ? xScaleForLegends.bandwidth() : -columnWidth;
13050
- return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) : 0) + xScale(d.y) + (actualColWidth - 3) / 2;
13066
+ return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) + xScaleForLegends.bandwidth() / 2 : 0) + xScale(d.y) - 5;
13051
13067
  } else
13052
13068
  return dataLabelsPosition(
13053
13069
  d.y.measure,
@@ -13597,7 +13613,7 @@ function addDataTable(isFitChart, svg, currentTag, dataTable, colWidth, yAxis, x
13597
13613
  parentTag.append("foreignObject").attr("x", (d) => 0).attr("y", tableStartY + yCordinate).attr("width", (d, index2) => index2 === 0 ? cellWidth + outerPadding + calWidthForSeriesNames / 2 : index2 === dimensionCount - 1 ? cellWidth + outerPadding - calWidthForSeriesNames / 2 : cellWidth).attr("height", cellHeight).style("justify-content", "center").append("xhtml:div").attr("class", "middlepart").style("width", (d, index2) => index2 === 0 ? cellWidth + outerPadding + calWidthForSeriesNames / 2 : index2 === dimensionCount - 1 ? cellWidth + outerPadding - calWidthForSeriesNames / 2 : cellWidth).style("height", `${cellHeight}px`).style("line-height", `${cellHeight}px`).style("border-width", (d, pos) => getBorderStyle(formatOptions, i, pos, dimensionCount, legendsCount, "width")).style("border-style", (d, pos) => getBorderStyle(formatOptions, i, pos, dimensionCount, legendsCount, "style")).style("border-color", (d, pos) => getBorderStyle(formatOptions, i, pos, dimensionCount, legendsCount, "color")).style("text-align", "center").style("white-space", "nowrap").style("text-overflow", "ellipsis").style("overflow", "hidden").style("padding-inline", "3px").style("font-size", formatOptions.dataTableProperties.dataTableFontSize + "px").style("font-family", formatOptions.dataTableProperties.dataTableFontFamily).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
13598
13614
  "text-decoration",
13599
13615
  fontStyle.includes("Underline") ? "Underline" : ""
13600
- ).style("color", "black").style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr("title", (d) => getNumberWithFormat(
13616
+ ).style("color", formatOptions.dataTableProperties.dataTableLabelColor).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr("title", (d) => getNumberWithFormat(
13601
13617
  chartType.includes("100stack") ? d.TooltipMeasure / d.TotalMeasure : d.TooltipMeasure || d.value,
13602
13618
  formatOptions.dataTableProperties.dataTableDisplayUnits,
13603
13619
  formatOptions.dataTableProperties.dataTableNumberFormat,
@@ -14446,16 +14462,18 @@ function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin
14446
14462
  y: d.data.dimension,
14447
14463
  x: d[1] > 0 ? d[1] : d[0],
14448
14464
  prevValue: d[0] >= 0 ? d[0] : d[1],
14449
- position: d.data.labelPosition,
14465
+ position: formatOptions.annotation.annotationPosition == "4" ? d.data.labelPosition : JSON.parse(formatOptions.annotation.annotationPosition),
14450
14466
  currentLegend: d.key.includes("~$~") ? d.key.split("~$~")[1] : d.key,
14451
- isVisible: true
14467
+ isVisible: true,
14468
+ hoverId: d.properties.alias ? getHoverId(d.properties.alias) : getHoverId(d.key)
14452
14469
  } : {
14453
14470
  x: d.data.dimension,
14454
14471
  y: d[1] > 0 ? d[1] : d[0],
14455
14472
  prevValue: d[0] >= 0 ? d[0] : d[1],
14456
- position: d.data.labelPosition,
14473
+ position: formatOptions.annotation.annotationPosition == "4" ? d.data.labelPosition : JSON.parse(formatOptions.annotation.annotationPosition),
14457
14474
  currentLegend: d.key.includes("~$~") ? d.key.split("~$~")[1] : d.key,
14458
- isVisible: true
14475
+ isVisible: true,
14476
+ hoverId: d.properties.alias ? getHoverId(d.properties.alias) : getHoverId(d.key)
14459
14477
  },
14460
14478
  dx: 0,
14461
14479
  dy: 0,
@@ -14577,7 +14595,7 @@ const appendAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotation
14577
14595
  }
14578
14596
  });
14579
14597
  annotations.selectAll("text").append("text").style("fill", formatOptions.annotation.annotationColor !== "#ffffff" ? formatOptions.annotation.annotationColor : "none");
14580
- annotations.selectAll("tspan").attr("hoverId", (d) => d.data.currentLegend.replaceAll(" ", "-")).style("visibility", (d) => parseFloat(d.data.y) == 0 && formatOptions.annotation.annotationHideZeroValues ? "hidden" : "visible");
14598
+ annotations.selectAll("tspan").attr("hoverId", (d) => d.data.hoverId ? d.data.hoverId : d.data.currentLegend.replaceAll(" ", "-")).style("visibility", (d) => parseFloat(d.data.y) == 0 && formatOptions.annotation.annotationHideZeroValues ? "hidden" : "visible");
14581
14599
  return annotations;
14582
14600
  };
14583
14601
  const initXaxisBar = (formatOptions, gTag, yLabel, innerHeight2, innerWidth2, xAxisBottom) => {
@@ -14598,7 +14616,10 @@ const initXaxisBar = (formatOptions, gTag, yLabel, innerHeight2, innerWidth2, xA
14598
14616
  "visibility",
14599
14617
  formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
14600
14618
  );
14601
- xAxisG.select(".domain").style("shape-rendering", "crispEdges").style(
14619
+ xAxisG.select(".domain").attr(
14620
+ "visibility",
14621
+ formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
14622
+ ).style("shape-rendering", "crispEdges").style(
14602
14623
  "stroke",
14603
14624
  formatOptions.yAxisLabel.yAxisColorInverted
14604
14625
  ).attr("stroke-width", formatOptions.yAxisLabel.yAxisWidth ? formatOptions.yAxisLabel.yAxisWidth : formatOptions.plotArea.plotAreaBorderThickness);
@@ -14610,7 +14631,7 @@ const initYaxisBar = (formatOptions, gTag, xLabel, innerHeight2, innerWidth2, yA
14610
14631
  try {
14611
14632
  let fontStyle = formatOptions.xAxisLabel.xAxisLabelFontStyle;
14612
14633
  let xaxisLabelPosition = parseInt(formatOptions.xAxisLabel.xAxisPosition);
14613
- let responsiveDimList = responsiveXaxisLabel(dimensionList, innerWidth2);
14634
+ let responsiveDimList = responsiveXaxisLabel(dimensionList, innerHeight2);
14614
14635
  let labelWidth = formatOptions.xAxisLabel.labelTextWrap ? dimensionHeightWidthArray[3] + 10 < width * 0.1 ? dimensionHeightWidthArray[3] + 10 : width * 0.1 : formatOptions.xAxisLabel.xAxisLabelRotation == 0 ? columnWidth : dimensionHeightWidthArray[0] + 5;
14615
14636
  let xLabelMargin = formatOptions.xAxisLabel.labelTextWrap ? xLabel : labelWidth;
14616
14637
  let formatedResponsiveDimList = isDateType ? setDateFormats(
@@ -14981,8 +15002,9 @@ const fileName$b = "CommonFunctions.ts";
14981
15002
  actualChartTypes.speedometerChart,
14982
15003
  actualChartTypes.radialBarChart
14983
15004
  ];
14984
- function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, seriesData, chartId, legendShape) {
15005
+ function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, inputSeries, chartId, legendShape) {
14985
15006
  try {
15007
+ let seriesData = [...inputSeries].reverse();
14986
15008
  let position = formatOptions.legends.legendPosition;
14987
15009
  let horizontalLegendAlignment = formatOptions.legends.legendAlignmentTopBottom;
14988
15010
  let verticalLegendAlignment = formatOptions.legends.legendAlignment;
@@ -16071,6 +16093,13 @@ const connectorNumberFormat = (numerator, denominator, decimalValues, numberForm
16071
16093
  } catch (e) {
16072
16094
  }
16073
16095
  };
16096
+ const getHoverId = (inputText) => {
16097
+ try {
16098
+ return inputText.includes("~$~") ? inputText.split("~$~")[1].replace(/ /g, "-") : inputText.replace(/ /g, "-");
16099
+ } catch (error) {
16100
+ return inputText;
16101
+ }
16102
+ };
16074
16103
  const ColumnChart = ({
16075
16104
  isDateType,
16076
16105
  formatOptions,
@@ -16399,6 +16428,15 @@ const ColumnChart = ({
16399
16428
  };
16400
16429
  const initAxis = () => {
16401
16430
  {
16431
+ let responsiveLablesObj = responsiveYaxisLabel$1(
16432
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
16433
+ chartJSON.yMinLeft,
16434
+ innerHeight2,
16435
+ formatOptions,
16436
+ chartJSON,
16437
+ customYaxisMinValue,
16438
+ customYaxisMaxValue
16439
+ );
16402
16440
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
16403
16441
  (d) => getNumberWithFormat(
16404
16442
  d,
@@ -16408,27 +16446,7 @@ const ColumnChart = ({
16408
16446
  )
16409
16447
  ).tickSize(
16410
16448
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
16411
- ).tickValues(
16412
- responsiveYaxisLabel$1(
16413
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
16414
- chartJSON.yMinLeft,
16415
- innerHeight2,
16416
- formatOptions,
16417
- chartJSON,
16418
- customYaxisMinValue,
16419
- customYaxisMaxValue
16420
- ).yAxisLabelArray
16421
- ).ticks(
16422
- responsiveYaxisLabel$1(
16423
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
16424
- chartJSON.yMinLeft,
16425
- innerHeight2,
16426
- formatOptions,
16427
- chartJSON,
16428
- customYaxisMinValue,
16429
- customYaxisMaxValue
16430
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
16431
- ).tickPadding(8).tickSizeOuter(0);
16449
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
16432
16450
  }
16433
16451
  if (isSecondaryAxisDrawn) {
16434
16452
  yAxisRight = axisRight(yScaleRight).tickFormat(
@@ -17133,6 +17151,15 @@ const CustomColumnChart = ({
17133
17151
  };
17134
17152
  const initAxis = () => {
17135
17153
  {
17154
+ let responsiveLablesObj = responsiveYaxisLabel$1(
17155
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17156
+ chartJSON.yMinLeft,
17157
+ innerHeight2,
17158
+ formatOptions,
17159
+ chartJSON,
17160
+ customYaxisMinValue,
17161
+ customYaxisMaxValue
17162
+ );
17136
17163
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
17137
17164
  (d) => getNumberWithFormat(
17138
17165
  d,
@@ -17142,27 +17169,7 @@ const CustomColumnChart = ({
17142
17169
  )
17143
17170
  ).tickSize(
17144
17171
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
17145
- ).tickValues(
17146
- responsiveYaxisLabel$1(
17147
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17148
- chartJSON.yMinLeft,
17149
- innerHeight2,
17150
- formatOptions,
17151
- chartJSON,
17152
- customYaxisMinValue,
17153
- customYaxisMaxValue
17154
- ).yAxisLabelArray
17155
- ).ticks(
17156
- responsiveYaxisLabel$1(
17157
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17158
- chartJSON.yMinLeft,
17159
- innerHeight2,
17160
- formatOptions,
17161
- chartJSON,
17162
- customYaxisMinValue,
17163
- customYaxisMaxValue
17164
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
17165
- ).tickPadding(8).tickSizeOuter(0);
17172
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
17166
17173
  }
17167
17174
  if (isSecondaryAxisDrawn) {
17168
17175
  yAxisRight = axisRight(yScaleRight).tickFormat(
@@ -17931,6 +17938,15 @@ const LayeredColumnChart = ({
17931
17938
  const initAxis = () => {
17932
17939
  getXAxis();
17933
17940
  {
17941
+ let responsiveLablesObj = responsiveYaxisLabel$1(
17942
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17943
+ chartJSON.yMinLeft,
17944
+ innerHeight2,
17945
+ formatOptions,
17946
+ chartJSON,
17947
+ customYaxisMinValue,
17948
+ customYaxisMaxValue
17949
+ );
17934
17950
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
17935
17951
  (d) => getNumberWithFormat(
17936
17952
  d,
@@ -17940,27 +17956,7 @@ const LayeredColumnChart = ({
17940
17956
  )
17941
17957
  ).tickSize(
17942
17958
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
17943
- ).tickValues(
17944
- responsiveYaxisLabel$1(
17945
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17946
- chartJSON.yMinLeft,
17947
- innerHeight2,
17948
- formatOptions,
17949
- chartJSON,
17950
- customYaxisMinValue,
17951
- customYaxisMaxValue
17952
- ).yAxisLabelArray
17953
- ).ticks(
17954
- responsiveYaxisLabel$1(
17955
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17956
- chartJSON.yMinLeft,
17957
- innerHeight2,
17958
- formatOptions,
17959
- chartJSON,
17960
- customYaxisMinValue,
17961
- customYaxisMaxValue
17962
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
17963
- ).tickPadding(8).tickSizeOuter(0);
17959
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
17964
17960
  }
17965
17961
  };
17966
17962
  const getXAxis = () => {
@@ -18160,7 +18156,7 @@ const StackColumnChart = ({
18160
18156
  const seriesData = generalizedChartData(
18161
18157
  data.ChartData,
18162
18158
  data.DimensionList
18163
- );
18159
+ )?.reverse();
18164
18160
  const dimensionList = data.DimensionList;
18165
18161
  const barChart = false;
18166
18162
  const isSecondaryAxisDrawn = false;
@@ -18458,9 +18454,7 @@ const StackColumnChart = ({
18458
18454
  )
18459
18455
  ).tickSize(
18460
18456
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
18461
- ).tickValues(respParams.yAxisLabelArray).ticks(
18462
- respParams.customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
18463
- ).tickPadding(8).tickSizeOuter(0);
18457
+ ).tickValues(respParams.autoLabelFlag ? void 0 : respParams.yAxisLabelArray).ticks(respParams.customTickValue).tickPadding(8).tickSizeOuter(0);
18464
18458
  }
18465
18459
  };
18466
18460
  const getXAxis = () => {
@@ -18483,7 +18477,7 @@ const StackColumnChart = ({
18483
18477
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
18484
18478
  let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
18485
18479
  "hoverId",
18486
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
18480
+ (d) => d[0]?.properties.alias ? getHoverId(d[0]?.properties.alias) : getHoverId(d.key)
18487
18481
  );
18488
18482
  columnGroups = columnGroupsEnter.merge(columnGroups);
18489
18483
  let rects = columnGroups.selectAll("rect").data((d) => d);
@@ -18535,14 +18529,14 @@ const StackColumnChart = ({
18535
18529
  );
18536
18530
  const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
18537
18531
  gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
18538
- let legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
18532
+ let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
18539
18533
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
18540
18534
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
18541
18535
  }).on("mouseout", (event2, d) => {
18542
18536
  hideTooltipOnMouseOut();
18543
18537
  const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
18544
18538
  gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
18545
- let legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
18539
+ let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
18546
18540
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
18547
18541
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
18548
18542
  });
@@ -18882,7 +18876,7 @@ const NormalizedStackColumnChart = ({
18882
18876
  const seriesData = generalizedChartData(
18883
18877
  data.ChartData,
18884
18878
  data.DimensionList
18885
- );
18879
+ ).reverse();
18886
18880
  const dimensionList = data.DimensionList;
18887
18881
  const barChart = false;
18888
18882
  const isSecondaryAxisDrawn = false;
@@ -19178,7 +19172,7 @@ const NormalizedStackColumnChart = ({
19178
19172
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
19179
19173
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
19180
19174
  ).ticks(
19181
- dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30,
19175
+ dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 80 : innerHeight2 / 80,
19182
19176
  "%"
19183
19177
  ).tickPadding(8).tickSizeOuter(0);
19184
19178
  }
@@ -20229,6 +20223,17 @@ const ColumnHistogramChart = ({
20229
20223
  const initAxis = () => {
20230
20224
  getXAxis();
20231
20225
  {
20226
+ let responsiveLablesObj = responsiveYaxisLabel$1(
20227
+ chartJSON.yMaxLeft,
20228
+ chartJSON.yMinLeft,
20229
+ innerHeight2,
20230
+ formatOptions,
20231
+ chartJSON,
20232
+ customYaxisMinValue,
20233
+ customYaxisMaxValue,
20234
+ false,
20235
+ innerWidth2
20236
+ );
20232
20237
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
20233
20238
  (d) => getNumberWithFormat(
20234
20239
  d,
@@ -20238,19 +20243,7 @@ const ColumnHistogramChart = ({
20238
20243
  )
20239
20244
  ).tickSize(
20240
20245
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
20241
- ).tickValues(
20242
- responsiveYaxisLabel$1(
20243
- chartJSON.yMaxLeft,
20244
- chartJSON.yMinLeft,
20245
- innerHeight2,
20246
- formatOptions,
20247
- chartJSON,
20248
- customYaxisMinValue,
20249
- customYaxisMaxValue,
20250
- false,
20251
- innerWidth2
20252
- ).yAxisLabelArray
20253
- ).ticks(innerHeight2 / 50).tickPadding(8).tickSizeOuter(0);
20246
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
20254
20247
  }
20255
20248
  };
20256
20249
  const getXAxis = () => {
@@ -20732,6 +20725,15 @@ const LineChart = ({
20732
20725
  };
20733
20726
  const initAxis = () => {
20734
20727
  {
20728
+ let responsiveLablesObj = responsiveYaxisLabel$1(
20729
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
20730
+ chartJSON.yMinLeft,
20731
+ innerHeight2,
20732
+ formatOptions,
20733
+ chartJSON,
20734
+ customYaxisMinValue,
20735
+ customYaxisMaxValue
20736
+ );
20735
20737
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
20736
20738
  (d) => getNumberWithFormat(
20737
20739
  d,
@@ -20741,29 +20743,15 @@ const LineChart = ({
20741
20743
  )
20742
20744
  ).tickSize(
20743
20745
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
20744
- ).tickValues(
20745
- responsiveYaxisLabel$1(
20746
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
20747
- chartJSON.yMinLeft,
20748
- innerHeight2,
20749
- formatOptions,
20750
- chartJSON,
20751
- customYaxisMinValue,
20752
- customYaxisMaxValue
20753
- ).yAxisLabelArray
20754
- ).ticks(
20755
- responsiveYaxisLabel$1(
20756
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
20757
- chartJSON.yMinLeft,
20758
- innerHeight2,
20759
- formatOptions,
20760
- chartJSON,
20761
- customYaxisMinValue,
20762
- customYaxisMaxValue
20763
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
20764
- ).tickPadding(8).tickSizeOuter(0);
20746
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
20765
20747
  }
20766
20748
  if (isSecondaryAxisDrawn) {
20749
+ let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
20750
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
20751
+ chartJSON.yMinRight,
20752
+ formatOptions,
20753
+ chartJSON
20754
+ );
20767
20755
  yAxisRight = axisRight(yScaleRight).tickFormat(
20768
20756
  (d) => getNumberWithFormat(
20769
20757
  d,
@@ -20771,21 +20759,7 @@ const LineChart = ({
20771
20759
  formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
20772
20760
  formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
20773
20761
  )
20774
- ).tickValues(
20775
- responsiveSecondaryYaxisLabel(
20776
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
20777
- chartJSON.yMinRight,
20778
- formatOptions,
20779
- chartJSON
20780
- ).secondaryYAxisLabelArray
20781
- ).ticks(
20782
- responsiveSecondaryYaxisLabel(
20783
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
20784
- chartJSON.yMinRight,
20785
- formatOptions,
20786
- chartJSON
20787
- ).secondaryCustomTickValue ?? innerHeight2 / 30
20788
- ).tickSize(
20762
+ ).tickValues(responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
20789
20763
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
20790
20764
  ).tickPadding(8).tickSizeOuter(0);
20791
20765
  }
@@ -20972,7 +20946,7 @@ const StackLineChart = ({
20972
20946
  const seriesData = generalizedChartData(
20973
20947
  data.ChartData,
20974
20948
  data.DimensionList
20975
- );
20949
+ )?.reverse() || [];
20976
20950
  const dimensionList = data.DimensionList;
20977
20951
  const barChart = false;
20978
20952
  const isSecondaryAxisDrawn = false;
@@ -21281,6 +21255,15 @@ const StackLineChart = ({
21281
21255
  const initAxis = () => {
21282
21256
  getXAxis();
21283
21257
  {
21258
+ let responsiveLablesObj = responsiveYaxisLabel$1(
21259
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
21260
+ chartJSON.yMinLeft,
21261
+ innerHeight2,
21262
+ formatOptions,
21263
+ chartJSON,
21264
+ customYaxisMinValue,
21265
+ customYaxisMaxValue
21266
+ );
21284
21267
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
21285
21268
  (d) => getNumberWithFormat(
21286
21269
  d,
@@ -21290,27 +21273,7 @@ const StackLineChart = ({
21290
21273
  )
21291
21274
  ).tickSize(
21292
21275
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
21293
- ).tickValues(
21294
- responsiveYaxisLabel$1(
21295
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
21296
- chartJSON.yMinLeft,
21297
- innerHeight2,
21298
- formatOptions,
21299
- chartJSON,
21300
- customYaxisMinValue,
21301
- customYaxisMaxValue
21302
- ).yAxisLabelArray
21303
- ).ticks(
21304
- responsiveYaxisLabel$1(
21305
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
21306
- chartJSON.yMinLeft,
21307
- innerHeight2,
21308
- formatOptions,
21309
- chartJSON,
21310
- customYaxisMinValue,
21311
- customYaxisMaxValue
21312
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
21313
- ).tickPadding(8).tickSizeOuter(0);
21276
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
21314
21277
  }
21315
21278
  };
21316
21279
  const getXAxis = () => {
@@ -21523,7 +21486,7 @@ const NormalisedStackLineChart = ({
21523
21486
  const seriesData = generalizedChartData(
21524
21487
  data.ChartData,
21525
21488
  data.DimensionList
21526
- );
21489
+ )?.reverse() || [];
21527
21490
  const dimensionList = data.DimensionList;
21528
21491
  const barChart = false;
21529
21492
  const isSecondaryAxisDrawn = false;
@@ -21797,7 +21760,7 @@ const NormalisedStackLineChart = ({
21797
21760
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
21798
21761
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
21799
21762
  ).ticks(
21800
- dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30,
21763
+ dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 80 : innerHeight2 / 80,
21801
21764
  "%"
21802
21765
  ).tickPadding(8).tickSizeOuter(0);
21803
21766
  }
@@ -21825,7 +21788,7 @@ const NormalisedStackLineChart = ({
21825
21788
  const lineGenerator = line$1().x(
21826
21789
  (d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
21827
21790
  ).y((d) => d[1] > 0 ? yScaleLeft(d[1]) : yScaleLeft(d[0])).curve(getCurveType(formatOptions));
21828
- let lines = gTag.selectAll(".parentGroup").data([stackChartData.reverse()]);
21791
+ let lines = gTag.selectAll(".parentGroup").data([stackChartData]);
21829
21792
  lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
21830
21793
  let lineGroups = lines.selectAll(".line-group").data((d) => d);
21831
21794
  let lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
@@ -22312,6 +22275,15 @@ const HorizontalBarChart = ({
22312
22275
  };
22313
22276
  const initAxis = () => {
22314
22277
  {
22278
+ let responsiveLablesObj = responsiveYaxisLabel$1(
22279
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22280
+ chartJSON.yMinLeft,
22281
+ innerHeight2,
22282
+ formatOptions,
22283
+ chartJSON,
22284
+ customYaxisMinValue,
22285
+ customYaxisMaxValue
22286
+ );
22315
22287
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
22316
22288
  (d) => getNumberWithFormat(
22317
22289
  d,
@@ -22321,29 +22293,15 @@ const HorizontalBarChart = ({
22321
22293
  )
22322
22294
  ).tickSize(
22323
22295
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
22324
- ).tickValues(
22325
- responsiveYaxisLabel$1(
22326
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22327
- chartJSON.yMinLeft,
22328
- innerHeight2,
22329
- formatOptions,
22330
- chartJSON,
22331
- customYaxisMinValue,
22332
- customYaxisMaxValue
22333
- ).yAxisLabelArray
22334
- ).ticks(
22335
- responsiveYaxisLabel$1(
22336
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22337
- chartJSON.yMinLeft,
22338
- innerHeight2,
22339
- formatOptions,
22340
- chartJSON,
22341
- customYaxisMinValue,
22342
- customYaxisMaxValue
22343
- ).customTickValue ?? innerHeight2 / 30
22344
- ).tickPadding(8).tickSizeOuter(0);
22296
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
22345
22297
  }
22346
22298
  if (isSecondaryAxisDrawn) {
22299
+ let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
22300
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
22301
+ chartJSON.yMinRight,
22302
+ formatOptions,
22303
+ chartJSON
22304
+ );
22347
22305
  xAxisTop = axisTop(xScaleTop).tickFormat(
22348
22306
  (d) => getNumberWithFormat(
22349
22307
  d,
@@ -22351,21 +22309,7 @@ const HorizontalBarChart = ({
22351
22309
  formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
22352
22310
  formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
22353
22311
  )
22354
- ).tickValues(
22355
- responsiveSecondaryYaxisLabel(
22356
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
22357
- chartJSON.yMinRight,
22358
- formatOptions,
22359
- chartJSON
22360
- ).secondaryYAxisLabelArray
22361
- ).ticks(
22362
- responsiveSecondaryYaxisLabel(
22363
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
22364
- chartJSON.yMinRight,
22365
- formatOptions,
22366
- chartJSON
22367
- ).secondaryCustomTickValue ?? innerHeight2 / 30
22368
- ).tickSize(
22312
+ ).tickValues(responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
22369
22313
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
22370
22314
  ).tickPadding(8).tickSizeOuter(0);
22371
22315
  }
@@ -22542,7 +22486,7 @@ const StackHorizontalChart = ({
22542
22486
  const seriesData = generalizedChartData(
22543
22487
  data.ChartData,
22544
22488
  data.DimensionList
22545
- );
22489
+ )?.reverse();
22546
22490
  const dimensionList = data.DimensionList;
22547
22491
  const barChart = true;
22548
22492
  const isSecondaryAxisDrawn = false;
@@ -22811,6 +22755,17 @@ const StackHorizontalChart = ({
22811
22755
  };
22812
22756
  const initAxis = () => {
22813
22757
  {
22758
+ let responsiveLablesObj = responsiveYaxisLabel$1(
22759
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22760
+ chartJSON.yMinLeft,
22761
+ innerHeight2,
22762
+ formatOptions,
22763
+ chartJSON,
22764
+ customYaxisMinValue,
22765
+ customYaxisMaxValue,
22766
+ barChart,
22767
+ innerWidth2
22768
+ );
22814
22769
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
22815
22770
  (d) => getNumberWithFormat(
22816
22771
  d,
@@ -22820,31 +22775,7 @@ const StackHorizontalChart = ({
22820
22775
  )
22821
22776
  ).tickSize(
22822
22777
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
22823
- ).tickValues(
22824
- responsiveYaxisLabel$1(
22825
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22826
- chartJSON.yMinLeft,
22827
- innerHeight2,
22828
- formatOptions,
22829
- chartJSON,
22830
- customYaxisMinValue,
22831
- customYaxisMaxValue,
22832
- barChart,
22833
- innerWidth2
22834
- ).yAxisLabelArray
22835
- ).ticks(
22836
- responsiveYaxisLabel$1(
22837
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22838
- chartJSON.yMinLeft,
22839
- innerHeight2,
22840
- formatOptions,
22841
- chartJSON,
22842
- customYaxisMinValue,
22843
- customYaxisMaxValue,
22844
- barChart,
22845
- innerWidth2
22846
- ).customTickValue ?? innerHeight2 / 30
22847
- ).tickPadding(8).tickSizeOuter(0);
22778
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
22848
22779
  }
22849
22780
  };
22850
22781
  const getYAxis = () => {
@@ -23245,7 +23176,7 @@ const NormalizedStackHorizontalBarChart = ({
23245
23176
  let columnWidth = 0;
23246
23177
  const chartType = actualChartTypes.stackBar100;
23247
23178
  const svgRef = useRef();
23248
- const seriesData = generalizedChartData(data.ChartData, data.DimensionList);
23179
+ const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse();
23249
23180
  const dimensionList = data.DimensionList;
23250
23181
  const barChart = true;
23251
23182
  const isSecondaryAxisDrawn = false;
@@ -23399,6 +23330,7 @@ const NormalizedStackHorizontalBarChart = ({
23399
23330
  margin,
23400
23331
  yTitle,
23401
23332
  yLabel,
23333
+ void 0,
23402
23334
  xTitle,
23403
23335
  xLabel
23404
23336
  );
@@ -23514,7 +23446,7 @@ const NormalizedStackHorizontalBarChart = ({
23514
23446
  {
23515
23447
  xAxisBottom = axisBottom(xScaleBottom).tickSize(
23516
23448
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
23517
- ).ticks(innerWidth2 / 30, "%").tickPadding(8).tickSizeOuter(0);
23449
+ ).ticks(innerWidth2 / 80, "%").tickPadding(8).tickSizeOuter(0);
23518
23450
  }
23519
23451
  };
23520
23452
  const getYAxis = () => {
@@ -23538,7 +23470,7 @@ const NormalizedStackHorizontalBarChart = ({
23538
23470
  filteredDimension.forEach((dim) => {
23539
23471
  gTag.append("rect").attr("id", `dim-background-${dim}`).attr("class", "dimension-background").attr("y", yScale(dim) - yScale.bandwidth() / 2).attr("height", yScale.bandwidth()).attr("x", 0).attr("width", innerWidth2).attr("fill", "#E5E5E5").attr("visibility", "hidden").lower();
23540
23472
  });
23541
- let columns = gTag.selectAll(".parentGroup").data([stackChartData.reverse()]);
23473
+ let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
23542
23474
  columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
23543
23475
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
23544
23476
  let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
@@ -23974,6 +23906,17 @@ const LayeredHorizontalBarChart = ({
23974
23906
  const initAxis = () => {
23975
23907
  getYAxis();
23976
23908
  {
23909
+ let responsiveLablesObj = responsiveYaxisLabel$1(
23910
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
23911
+ chartJSON.yMinLeft,
23912
+ innerHeight2,
23913
+ formatOptions,
23914
+ chartJSON,
23915
+ customYaxisMinValue,
23916
+ customYaxisMaxValue,
23917
+ barChart,
23918
+ innerWidth2
23919
+ );
23977
23920
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
23978
23921
  (d) => getNumberWithFormat(
23979
23922
  d,
@@ -23983,31 +23926,7 @@ const LayeredHorizontalBarChart = ({
23983
23926
  )
23984
23927
  ).tickSize(
23985
23928
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 : 0 : 0
23986
- ).tickValues(
23987
- responsiveYaxisLabel$1(
23988
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
23989
- chartJSON.yMinLeft,
23990
- innerHeight2,
23991
- formatOptions,
23992
- chartJSON,
23993
- customYaxisMinValue,
23994
- customYaxisMaxValue,
23995
- barChart,
23996
- innerWidth2
23997
- ).yAxisLabelArray
23998
- ).ticks(
23999
- responsiveYaxisLabel$1(
24000
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
24001
- chartJSON.yMinLeft,
24002
- innerHeight2,
24003
- formatOptions,
24004
- chartJSON,
24005
- customYaxisMinValue,
24006
- customYaxisMaxValue,
24007
- barChart,
24008
- innerWidth2
24009
- ).customTickValue ?? innerHeight2 / 30
24010
- ).tickPadding(8).tickSizeOuter(0);
23929
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
24011
23930
  }
24012
23931
  };
24013
23932
  const getYAxis = () => {
@@ -24741,6 +24660,15 @@ const HorizontalHistogramChart = ({
24741
24660
  const initAxis = () => {
24742
24661
  getYAxis();
24743
24662
  {
24663
+ let responsiveLablesObj = responsiveYaxisLabel$1(
24664
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
24665
+ chartJSON.yMinLeft,
24666
+ innerHeight2,
24667
+ formatOptions,
24668
+ chartJSON,
24669
+ customYaxisMinValue,
24670
+ customYaxisMaxValue
24671
+ );
24744
24672
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
24745
24673
  (d) => getNumberWithFormat(
24746
24674
  d,
@@ -24750,27 +24678,7 @@ const HorizontalHistogramChart = ({
24750
24678
  )
24751
24679
  ).tickSize(
24752
24680
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
24753
- ).tickValues(
24754
- responsiveYaxisLabel$1(
24755
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
24756
- chartJSON.yMinLeft,
24757
- innerHeight2,
24758
- formatOptions,
24759
- chartJSON,
24760
- customYaxisMinValue,
24761
- customYaxisMaxValue
24762
- ).yAxisLabelArray
24763
- ).ticks(
24764
- responsiveYaxisLabel$1(
24765
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
24766
- chartJSON.yMinLeft,
24767
- innerHeight2,
24768
- formatOptions,
24769
- chartJSON,
24770
- customYaxisMinValue,
24771
- customYaxisMaxValue
24772
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
24773
- ).tickPadding(8).tickSizeOuter(0);
24681
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
24774
24682
  }
24775
24683
  if (isSecondaryAxisDrawn) {
24776
24684
  xAxisTop = axisTop(xScaleTop).tickFormat(
@@ -25306,6 +25214,15 @@ const AreaChart = ({
25306
25214
  const initAxis = () => {
25307
25215
  getXAxis();
25308
25216
  {
25217
+ let responsiveLablesObj = responsiveYaxisLabel$1(
25218
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25219
+ chartJSON.yMinLeft,
25220
+ innerHeight2,
25221
+ formatOptions,
25222
+ chartJSON,
25223
+ customYaxisMinValue,
25224
+ customYaxisMaxValue
25225
+ );
25309
25226
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
25310
25227
  (d) => getNumberWithFormat(
25311
25228
  d,
@@ -25315,27 +25232,7 @@ const AreaChart = ({
25315
25232
  )
25316
25233
  ).tickSize(
25317
25234
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
25318
- ).tickValues(
25319
- responsiveYaxisLabel$1(
25320
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25321
- chartJSON.yMinLeft,
25322
- innerHeight2,
25323
- formatOptions,
25324
- chartJSON,
25325
- customYaxisMinValue,
25326
- customYaxisMaxValue
25327
- ).yAxisLabelArray
25328
- ).ticks(
25329
- responsiveYaxisLabel$1(
25330
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25331
- chartJSON.yMinLeft,
25332
- innerHeight2,
25333
- formatOptions,
25334
- chartJSON,
25335
- customYaxisMinValue,
25336
- customYaxisMaxValue
25337
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
25338
- ).tickPadding(8).tickSizeOuter(0);
25235
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
25339
25236
  }
25340
25237
  };
25341
25238
  const getXAxis = () => {
@@ -25542,7 +25439,7 @@ const StackAreaChart = ({
25542
25439
  const seriesData = generalizedChartData(
25543
25440
  data.ChartData,
25544
25441
  data.DimensionList
25545
- );
25442
+ )?.reverse() || [];
25546
25443
  const dimensionList = data.DimensionList;
25547
25444
  const barChart = false;
25548
25445
  const isSecondaryAxisDrawn = false;
@@ -25852,6 +25749,15 @@ const StackAreaChart = ({
25852
25749
  };
25853
25750
  const initAxis = () => {
25854
25751
  {
25752
+ let responsiveLablesObj = responsiveYaxisLabel$1(
25753
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25754
+ chartJSON.yMinLeft,
25755
+ innerHeight2,
25756
+ formatOptions,
25757
+ chartJSON,
25758
+ customYaxisMinValue,
25759
+ customYaxisMaxValue
25760
+ );
25855
25761
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
25856
25762
  (d) => getNumberWithFormat(
25857
25763
  d,
@@ -25861,27 +25767,7 @@ const StackAreaChart = ({
25861
25767
  )
25862
25768
  ).tickSize(
25863
25769
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
25864
- ).tickValues(
25865
- responsiveYaxisLabel$1(
25866
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25867
- chartJSON.yMinLeft,
25868
- innerHeight2,
25869
- formatOptions,
25870
- chartJSON,
25871
- customYaxisMinValue,
25872
- customYaxisMaxValue
25873
- ).yAxisLabelArray
25874
- ).ticks(
25875
- responsiveYaxisLabel$1(
25876
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25877
- chartJSON.yMinLeft,
25878
- innerHeight2,
25879
- formatOptions,
25880
- chartJSON,
25881
- customYaxisMinValue,
25882
- customYaxisMaxValue
25883
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
25884
- ).tickPadding(8).tickSizeOuter(0);
25770
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
25885
25771
  }
25886
25772
  };
25887
25773
  const getXAxis = () => {
@@ -25906,7 +25792,7 @@ const StackAreaChart = ({
25906
25792
  ).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined(
25907
25793
  (d) => d.data.hideZero ? Boolean(d.data.key) : true
25908
25794
  ).curve(getCurveType(formatOptions));
25909
- let areas = gTag.selectAll(".lineGroup").data([stackChartData.reverse()]);
25795
+ let areas = gTag.selectAll(".lineGroup").data([stackChartData]);
25910
25796
  let focus = gTag.append("g").attr("class", "focusClass");
25911
25797
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
25912
25798
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
@@ -26121,7 +26007,7 @@ const NormalizedStackAreaChart = ({
26121
26007
  const seriesData = generalizedChartData(
26122
26008
  data.ChartData,
26123
26009
  data.DimensionList
26124
- );
26010
+ )?.reverse() || [];
26125
26011
  const dimensionList = data.DimensionList;
26126
26012
  const barChart = false;
26127
26013
  const isSecondaryAxisDrawn = false;
@@ -26409,7 +26295,7 @@ const NormalizedStackAreaChart = ({
26409
26295
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
26410
26296
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
26411
26297
  ).ticks(
26412
- dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30,
26298
+ dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 80 : innerHeight2 / 80,
26413
26299
  "%"
26414
26300
  ).tickPadding(8).tickSizeOuter(0);
26415
26301
  }
@@ -26435,13 +26321,13 @@ const NormalizedStackAreaChart = ({
26435
26321
  });
26436
26322
  const columnGenerator = area().x(
26437
26323
  (d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
26438
- ).y0(() => yScaleLeft(0)).y1((d) => yScaleLeft(d[1])).defined((d) => d.data.hideZero ? Boolean(d[0]) : true).curve(curveLinear$1);
26324
+ ).y0((d) => yScaleLeft(d[0])).y1((d) => yScaleLeft(d[1])).defined((d) => d.data.hideZero ? Boolean(d[0]) : true).curve(curveLinear$1);
26439
26325
  const columnGeneratorStart = area().x(
26440
26326
  (d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
26441
- ).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined(
26327
+ ).y0((d) => yScaleLeft(d[0])).y1((d) => yScaleLeft(d[1])).defined(
26442
26328
  (d) => d.data.hideZero ? Boolean(d.data.key) : true
26443
26329
  ).curve(getCurveType(formatOptions));
26444
- let areas = gTag.selectAll(".lineGroup").data([stackChartData.reverse()]);
26330
+ let areas = gTag.selectAll(".lineGroup").data([stackChartData]);
26445
26331
  let focus = gTag.append("g").attr("class", "focusClass");
26446
26332
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
26447
26333
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
@@ -26964,10 +26850,10 @@ const PieChart = ({ data, formatOptions, chartId }) => {
26964
26850
  ).attr(
26965
26851
  "font-family",
26966
26852
  (d) => d.data.properties?.valueFont ?? "Helvetica"
26967
- ).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", "1.00em").text((d) => {
26853
+ ).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
26968
26854
  if (chartFormatOptions.plotArea.dataLabelValue) {
26969
26855
  const dataValue = d.data.data[0].value;
26970
- if (chartFormatOptions.plotArea.dataLabelName && chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
26856
+ if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
26971
26857
  if (chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%") {
26972
26858
  return (Math.abs(dataValue / pieTotalValue) * 100).toFixed(
26973
26859
  convertStringToNumber(
@@ -27328,10 +27214,10 @@ const DonutChart = ({
27328
27214
  ).attr(
27329
27215
  "font-family",
27330
27216
  (d) => d.data.properties?.valueFont ?? "Helvetica"
27331
- ).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", "1.00em").text((d) => {
27217
+ ).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
27332
27218
  if (chartFormatOptions.plotArea.dataLabelValue) {
27333
27219
  const dataValue = d.data.data[0].value;
27334
- if (chartFormatOptions.plotArea.dataLabelName && chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
27220
+ if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
27335
27221
  if (chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%") {
27336
27222
  return (Math.abs(dataValue / pieTotalValue) * 100).toFixed(
27337
27223
  convertStringToNumber(
@@ -53746,6 +53632,15 @@ const WaterfallChart = ({
53746
53632
  const initAxis = () => {
53747
53633
  getXAxis();
53748
53634
  {
53635
+ let responsiveLablesObj = responsiveYaxisLabel$1(
53636
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
53637
+ chartJSON.yMinLeft,
53638
+ innerHeight2,
53639
+ formatOptions,
53640
+ chartJSON,
53641
+ customYaxisMinValue,
53642
+ customYaxisMaxValue
53643
+ );
53749
53644
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
53750
53645
  (d) => getNumberWithFormat(
53751
53646
  d,
@@ -53755,27 +53650,7 @@ const WaterfallChart = ({
53755
53650
  )
53756
53651
  ).tickSize(
53757
53652
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
53758
- ).tickValues(
53759
- responsiveYaxisLabel$1(
53760
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
53761
- chartJSON.yMinLeft,
53762
- innerHeight2,
53763
- formatOptions,
53764
- chartJSON,
53765
- customYaxisMinValue,
53766
- customYaxisMaxValue
53767
- ).yAxisLabelArray
53768
- ).ticks(
53769
- responsiveYaxisLabel$1(
53770
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
53771
- chartJSON.yMinLeft,
53772
- innerHeight2,
53773
- formatOptions,
53774
- chartJSON,
53775
- customYaxisMinValue,
53776
- customYaxisMaxValue
53777
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
53778
- ).tickPadding(8).tickSizeOuter(0);
53653
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
53779
53654
  }
53780
53655
  colorScale = ordinal().range([
53781
53656
  "#E25A42",