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.
@@ -11407,7 +11407,8 @@
11407
11407
  dataTableFontStyle: [],
11408
11408
  dataTableNumberFormat: ",",
11409
11409
  dataTableDecimalPrecision: "2",
11410
- dataTableDisplayUnits: "None"
11410
+ dataTableDisplayUnits: "None",
11411
+ dataTableLabelColor: "#000000"
11411
11412
  },
11412
11413
  dataTableOuterBorder: {
11413
11414
  borderButtonVisibility: true,
@@ -11605,6 +11606,7 @@
11605
11606
  )[1] : 0;
11606
11607
  yTitle = yTitle > width * 0.1 ? width * 0.1 : yTitle;
11607
11608
  let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0);
11609
+ yLabel += 8;
11608
11610
  let secondaryYLabel = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? responsiveYaxisMargin(
11609
11611
  maxNumberForSecondaryAxis,
11610
11612
  yMaxRight,
@@ -11732,8 +11734,8 @@
11732
11734
  xAxisObject,
11733
11735
  isBarChart
11734
11736
  );
11735
- const legendPosition = formatOptions.legends.legendPosition;
11736
11737
  const legendVisibility = formatOptions.legends.legendVisibility;
11738
+ const legendPosition = legendVisibility ? formatOptions.legends.legendPosition : staticLegendPosition.none;
11737
11739
  const scrollHeightConstant = isScrollbarVisible ? 12 : 0;
11738
11740
  const xAxisRelatedMargin = isBarChart ? metrics.yTitle + metrics.yLabel : metrics.xTitle + metrics.xLabel;
11739
11741
  let top2 = 0;
@@ -12048,20 +12050,7 @@
12048
12050
  let decimalValues = decimalPrescision;
12049
12051
  let formatter;
12050
12052
  if (displayUnits === "Auto") {
12051
- if (Math.abs(measureValue) >= 1e9) {
12052
- Unit = 1e9;
12053
- displayUnitsPostFix = "B";
12054
- } else if (Math.abs(measureValue) >= 1e6) {
12055
- Unit = 1e6;
12056
- displayUnitsPostFix = "M";
12057
- } else if (Math.abs(measureValue) >= 1e3) {
12058
- Unit = 1e3;
12059
- displayUnitsPostFix = "K";
12060
- } else {
12061
- Unit = 1;
12062
- displayUnitsPostFix = "";
12063
- }
12064
- measureValue = measureValue / Unit;
12053
+ return getAutoNumberWithFormat(measureValue);
12065
12054
  } else if (displayUnits != staticDisplayUnits.none) {
12066
12055
  displayUnits == staticDisplayUnits.thousands ? (Unit = 1e3, displayUnitsPostFix = "K") : null;
12067
12056
  displayUnits == staticDisplayUnits.millions ? (Unit = 1e6, displayUnitsPostFix = "M") : null;
@@ -12110,6 +12099,26 @@
12110
12099
  throw error;
12111
12100
  }
12112
12101
  }
12102
+ function getAutoNumberWithFormat(value2) {
12103
+ if (value2 === null || value2 === void 0 || isNaN(value2)) return "-";
12104
+ const absValue = Math.abs(value2);
12105
+ if (absValue >= 1e9) {
12106
+ return format(".2s")(value2).replace("G", "B");
12107
+ } else if (absValue >= 1e6) {
12108
+ return format(".2s")(value2);
12109
+ } else if (absValue >= 1e3) {
12110
+ return format(".2s")(value2);
12111
+ } else if (absValue >= 1) {
12112
+ const formatted = format(".2f")(value2);
12113
+ return +formatted === Math.floor(value2) ? format(".0f")(value2) : formatted;
12114
+ } else if (absValue >= 0.01) {
12115
+ return format(".2f")(value2);
12116
+ } else if (absValue > 0) {
12117
+ return format(".2e")(value2);
12118
+ } else {
12119
+ return "0";
12120
+ }
12121
+ }
12113
12122
  function responsiveYaxisMargin(maxNumber, yMax, formatOptions, isSecondaryAxis, isNormalizedChart) {
12114
12123
  try {
12115
12124
  {
@@ -12123,8 +12132,7 @@
12123
12132
  if (displayUnits != "None") {
12124
12133
  yMaxNumber = getNumberWithFormat(
12125
12134
  Math.floor(maxNumber) || Math.floor(yMax),
12126
- "Auto",
12127
- //displayUnits,
12135
+ displayUnits,
12128
12136
  numberFormat,
12129
12137
  decimalPrecision ?? "2"
12130
12138
  ).toString();
@@ -12159,6 +12167,7 @@
12159
12167
  }
12160
12168
  function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptions, chartJSON) {
12161
12169
  try {
12170
+ let autoLabelFlag = false;
12162
12171
  let secondaryCustomYaxisIntervalValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisIntervalText);
12163
12172
  let secondaryCustomYaxisMinValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMinText);
12164
12173
  let secondaryCustomYaxisMaxValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText);
@@ -12200,6 +12209,7 @@
12200
12209
  }
12201
12210
  }
12202
12211
  } else {
12212
+ let autoLabelFlag2 = true;
12203
12213
  let labelWidthPx = calculateWidthHeightDynamically(
12204
12214
  (parseFloat(formatOptions.yAxisLabel.yAxisMaxText) || chartJSON.yMaxRight).toString(),
12205
12215
  formatOptions.yAxisLabel.yAxisLabelFontSize,
@@ -12213,7 +12223,7 @@
12213
12223
  labelWidthPx[0]
12214
12224
  );
12215
12225
  }
12216
- return { secondaryYAxisLabelArray, secondaryCustomTickValue };
12226
+ return { secondaryYAxisLabelArray, secondaryCustomTickValue, autoLabelFlag };
12217
12227
  } catch (e) {
12218
12228
  }
12219
12229
  }
@@ -12255,11 +12265,17 @@
12255
12265
  }
12256
12266
  function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJSON, customYaxisMinValue, customYaxisMaxValue, barChart, innerWidth2) {
12257
12267
  try {
12268
+ let autoLabelFlag = false;
12258
12269
  let customYaxisIntervalValue = parseFloat(
12259
12270
  formatOptions.yAxisLabel.yAxisIntervalText
12260
12271
  );
12261
12272
  let yAxisLabelArray = [];
12262
12273
  let customTickValue;
12274
+ if (!customYaxisMaxValue && Ymax > 0) {
12275
+ const range2 = Ymax - Ymin;
12276
+ const padding = range2 * 0.05;
12277
+ Ymax = Ymax + padding;
12278
+ }
12263
12279
  if (customYaxisIntervalValue && customYaxisIntervalValue !== 0 && customYaxisIntervalValue !== void 0) {
12264
12280
  let minValue = customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : Ymin;
12265
12281
  let maxValue = customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : Ymax;
@@ -12299,6 +12315,7 @@
12299
12315
  }
12300
12316
  }
12301
12317
  } else {
12318
+ autoLabelFlag = true;
12302
12319
  let labelWidthPx = calculateWidthHeightDynamically(
12303
12320
  (customYaxisMaxValue || chartJSON.yMaxLeft).toString(),
12304
12321
  formatOptions.yAxisLabel.yAxisLabelFontSize,
@@ -12307,13 +12324,14 @@
12307
12324
  );
12308
12325
  yAxisLabelArray = getLabelsFromAlgo(
12309
12326
  customYaxisMinValue || chartJSON.yMinLeft,
12310
- customYaxisMaxValue || chartJSON.yMaxLeft,
12327
+ Ymax,
12328
+ //Use updated Ymax with padding
12311
12329
  barChart ? innerWidth2 : innerHeight2,
12312
12330
  barChart ? labelWidthPx[1] : labelWidthPx[0]
12313
12331
  );
12314
- customTickValue = barChart ? innerWidth2 / 30 : innerHeight2 / 30;
12332
+ customTickValue = barChart ? innerWidth2 / 80 : innerHeight2 / 80;
12315
12333
  }
12316
- return { yAxisLabelArray, customTickValue };
12334
+ return { yAxisLabelArray, customTickValue, autoLabelFlag };
12317
12335
  } catch (e) {
12318
12336
  throw e;
12319
12337
  }
@@ -12346,9 +12364,7 @@
12346
12364
  labels.push(parseFloat(current.toFixed(10)));
12347
12365
  current += interval2;
12348
12366
  }
12349
- const reductionFactor = 4;
12350
- const reducedLabels = labels.filter((i) => i % reductionFactor === 0);
12351
- return reducedLabels;
12367
+ return labels;
12352
12368
  }
12353
12369
  function initYaxis$1(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, innerHeight2) {
12354
12370
  try {
@@ -13032,7 +13048,7 @@
13032
13048
  let axis2 = d.x.axis;
13033
13049
  return dataLabelsPositionForBarChartFamily(formatOptions, d.x.measure ? d.x.measure : 0, d.position, requiredXScale, minValue, void 0, chartType, isSensitivityChart, axis2);
13034
13050
  } else if (chartType === actualChartTypes.column) {
13035
- return xScale(d.x) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2;
13051
+ return xScaleForLegends(d.currentLegend) ? xScale(d.x) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 : xScale(d.x);
13036
13052
  } else {
13037
13053
  return xScale(d.x);
13038
13054
  }
@@ -13050,7 +13066,7 @@
13050
13066
  } else {
13051
13067
  if (barChart) {
13052
13068
  let actualColWidth = chartType === actualChartTypes.tornadoChart || chartType === actualChartTypes.layeredBarChart ? xScaleForLegends.bandwidth() : -columnWidth;
13053
- return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) : 0) + xScale(d.y) + (actualColWidth - 3) / 2;
13069
+ return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) + xScaleForLegends.bandwidth() / 2 : 0) + xScale(d.y) - 5;
13054
13070
  } else
13055
13071
  return dataLabelsPosition(
13056
13072
  d.y.measure,
@@ -13600,7 +13616,7 @@
13600
13616
  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(
13601
13617
  "text-decoration",
13602
13618
  fontStyle.includes("Underline") ? "Underline" : ""
13603
- ).style("color", "black").style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr("title", (d) => getNumberWithFormat(
13619
+ ).style("color", formatOptions.dataTableProperties.dataTableLabelColor).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr("title", (d) => getNumberWithFormat(
13604
13620
  chartType.includes("100stack") ? d.TooltipMeasure / d.TotalMeasure : d.TooltipMeasure || d.value,
13605
13621
  formatOptions.dataTableProperties.dataTableDisplayUnits,
13606
13622
  formatOptions.dataTableProperties.dataTableNumberFormat,
@@ -14449,16 +14465,18 @@
14449
14465
  y: d.data.dimension,
14450
14466
  x: d[1] > 0 ? d[1] : d[0],
14451
14467
  prevValue: d[0] >= 0 ? d[0] : d[1],
14452
- position: d.data.labelPosition,
14468
+ position: formatOptions.annotation.annotationPosition == "4" ? d.data.labelPosition : JSON.parse(formatOptions.annotation.annotationPosition),
14453
14469
  currentLegend: d.key.includes("~$~") ? d.key.split("~$~")[1] : d.key,
14454
- isVisible: true
14470
+ isVisible: true,
14471
+ hoverId: d.properties.alias ? getHoverId(d.properties.alias) : getHoverId(d.key)
14455
14472
  } : {
14456
14473
  x: d.data.dimension,
14457
14474
  y: d[1] > 0 ? d[1] : d[0],
14458
14475
  prevValue: d[0] >= 0 ? d[0] : d[1],
14459
- position: d.data.labelPosition,
14476
+ position: formatOptions.annotation.annotationPosition == "4" ? d.data.labelPosition : JSON.parse(formatOptions.annotation.annotationPosition),
14460
14477
  currentLegend: d.key.includes("~$~") ? d.key.split("~$~")[1] : d.key,
14461
- isVisible: true
14478
+ isVisible: true,
14479
+ hoverId: d.properties.alias ? getHoverId(d.properties.alias) : getHoverId(d.key)
14462
14480
  },
14463
14481
  dx: 0,
14464
14482
  dy: 0,
@@ -14580,7 +14598,7 @@
14580
14598
  }
14581
14599
  });
14582
14600
  annotations.selectAll("text").append("text").style("fill", formatOptions.annotation.annotationColor !== "#ffffff" ? formatOptions.annotation.annotationColor : "none");
14583
- annotations.selectAll("tspan").attr("hoverId", (d) => d.data.currentLegend.replaceAll(" ", "-")).style("visibility", (d) => parseFloat(d.data.y) == 0 && formatOptions.annotation.annotationHideZeroValues ? "hidden" : "visible");
14601
+ 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");
14584
14602
  return annotations;
14585
14603
  };
14586
14604
  const initXaxisBar = (formatOptions, gTag, yLabel, innerHeight2, innerWidth2, xAxisBottom) => {
@@ -14601,7 +14619,10 @@
14601
14619
  "visibility",
14602
14620
  formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
14603
14621
  );
14604
- xAxisG.select(".domain").style("shape-rendering", "crispEdges").style(
14622
+ xAxisG.select(".domain").attr(
14623
+ "visibility",
14624
+ formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
14625
+ ).style("shape-rendering", "crispEdges").style(
14605
14626
  "stroke",
14606
14627
  formatOptions.yAxisLabel.yAxisColorInverted
14607
14628
  ).attr("stroke-width", formatOptions.yAxisLabel.yAxisWidth ? formatOptions.yAxisLabel.yAxisWidth : formatOptions.plotArea.plotAreaBorderThickness);
@@ -14613,7 +14634,7 @@
14613
14634
  try {
14614
14635
  let fontStyle = formatOptions.xAxisLabel.xAxisLabelFontStyle;
14615
14636
  let xaxisLabelPosition = parseInt(formatOptions.xAxisLabel.xAxisPosition);
14616
- let responsiveDimList = responsiveXaxisLabel(dimensionList, innerWidth2);
14637
+ let responsiveDimList = responsiveXaxisLabel(dimensionList, innerHeight2);
14617
14638
  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;
14618
14639
  let xLabelMargin = formatOptions.xAxisLabel.labelTextWrap ? xLabel : labelWidth;
14619
14640
  let formatedResponsiveDimList = isDateType ? setDateFormats(
@@ -14984,8 +15005,9 @@
14984
15005
  actualChartTypes.speedometerChart,
14985
15006
  actualChartTypes.radialBarChart
14986
15007
  ];
14987
- function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, seriesData, chartId, legendShape) {
15008
+ function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, inputSeries, chartId, legendShape) {
14988
15009
  try {
15010
+ let seriesData = [...inputSeries].reverse();
14989
15011
  let position = formatOptions.legends.legendPosition;
14990
15012
  let horizontalLegendAlignment = formatOptions.legends.legendAlignmentTopBottom;
14991
15013
  let verticalLegendAlignment = formatOptions.legends.legendAlignment;
@@ -16074,6 +16096,13 @@
16074
16096
  } catch (e) {
16075
16097
  }
16076
16098
  };
16099
+ const getHoverId = (inputText) => {
16100
+ try {
16101
+ return inputText.includes("~$~") ? inputText.split("~$~")[1].replace(/ /g, "-") : inputText.replace(/ /g, "-");
16102
+ } catch (error) {
16103
+ return inputText;
16104
+ }
16105
+ };
16077
16106
  const ColumnChart = ({
16078
16107
  isDateType,
16079
16108
  formatOptions,
@@ -16402,6 +16431,15 @@
16402
16431
  };
16403
16432
  const initAxis = () => {
16404
16433
  {
16434
+ let responsiveLablesObj = responsiveYaxisLabel$1(
16435
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
16436
+ chartJSON.yMinLeft,
16437
+ innerHeight2,
16438
+ formatOptions,
16439
+ chartJSON,
16440
+ customYaxisMinValue,
16441
+ customYaxisMaxValue
16442
+ );
16405
16443
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
16406
16444
  (d) => getNumberWithFormat(
16407
16445
  d,
@@ -16411,27 +16449,7 @@
16411
16449
  )
16412
16450
  ).tickSize(
16413
16451
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
16414
- ).tickValues(
16415
- responsiveYaxisLabel$1(
16416
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
16417
- chartJSON.yMinLeft,
16418
- innerHeight2,
16419
- formatOptions,
16420
- chartJSON,
16421
- customYaxisMinValue,
16422
- customYaxisMaxValue
16423
- ).yAxisLabelArray
16424
- ).ticks(
16425
- responsiveYaxisLabel$1(
16426
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
16427
- chartJSON.yMinLeft,
16428
- innerHeight2,
16429
- formatOptions,
16430
- chartJSON,
16431
- customYaxisMinValue,
16432
- customYaxisMaxValue
16433
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
16434
- ).tickPadding(8).tickSizeOuter(0);
16452
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
16435
16453
  }
16436
16454
  if (isSecondaryAxisDrawn) {
16437
16455
  yAxisRight = axisRight(yScaleRight).tickFormat(
@@ -17136,6 +17154,15 @@
17136
17154
  };
17137
17155
  const initAxis = () => {
17138
17156
  {
17157
+ let responsiveLablesObj = responsiveYaxisLabel$1(
17158
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17159
+ chartJSON.yMinLeft,
17160
+ innerHeight2,
17161
+ formatOptions,
17162
+ chartJSON,
17163
+ customYaxisMinValue,
17164
+ customYaxisMaxValue
17165
+ );
17139
17166
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
17140
17167
  (d) => getNumberWithFormat(
17141
17168
  d,
@@ -17145,27 +17172,7 @@
17145
17172
  )
17146
17173
  ).tickSize(
17147
17174
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
17148
- ).tickValues(
17149
- responsiveYaxisLabel$1(
17150
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17151
- chartJSON.yMinLeft,
17152
- innerHeight2,
17153
- formatOptions,
17154
- chartJSON,
17155
- customYaxisMinValue,
17156
- customYaxisMaxValue
17157
- ).yAxisLabelArray
17158
- ).ticks(
17159
- responsiveYaxisLabel$1(
17160
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17161
- chartJSON.yMinLeft,
17162
- innerHeight2,
17163
- formatOptions,
17164
- chartJSON,
17165
- customYaxisMinValue,
17166
- customYaxisMaxValue
17167
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
17168
- ).tickPadding(8).tickSizeOuter(0);
17175
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
17169
17176
  }
17170
17177
  if (isSecondaryAxisDrawn) {
17171
17178
  yAxisRight = axisRight(yScaleRight).tickFormat(
@@ -17934,6 +17941,15 @@
17934
17941
  const initAxis = () => {
17935
17942
  getXAxis();
17936
17943
  {
17944
+ let responsiveLablesObj = responsiveYaxisLabel$1(
17945
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17946
+ chartJSON.yMinLeft,
17947
+ innerHeight2,
17948
+ formatOptions,
17949
+ chartJSON,
17950
+ customYaxisMinValue,
17951
+ customYaxisMaxValue
17952
+ );
17937
17953
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
17938
17954
  (d) => getNumberWithFormat(
17939
17955
  d,
@@ -17943,27 +17959,7 @@
17943
17959
  )
17944
17960
  ).tickSize(
17945
17961
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
17946
- ).tickValues(
17947
- responsiveYaxisLabel$1(
17948
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17949
- chartJSON.yMinLeft,
17950
- innerHeight2,
17951
- formatOptions,
17952
- chartJSON,
17953
- customYaxisMinValue,
17954
- customYaxisMaxValue
17955
- ).yAxisLabelArray
17956
- ).ticks(
17957
- responsiveYaxisLabel$1(
17958
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17959
- chartJSON.yMinLeft,
17960
- innerHeight2,
17961
- formatOptions,
17962
- chartJSON,
17963
- customYaxisMinValue,
17964
- customYaxisMaxValue
17965
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
17966
- ).tickPadding(8).tickSizeOuter(0);
17962
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
17967
17963
  }
17968
17964
  };
17969
17965
  const getXAxis = () => {
@@ -18163,7 +18159,7 @@
18163
18159
  const seriesData = generalizedChartData(
18164
18160
  data.ChartData,
18165
18161
  data.DimensionList
18166
- );
18162
+ )?.reverse();
18167
18163
  const dimensionList = data.DimensionList;
18168
18164
  const barChart = false;
18169
18165
  const isSecondaryAxisDrawn = false;
@@ -18461,9 +18457,7 @@
18461
18457
  )
18462
18458
  ).tickSize(
18463
18459
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
18464
- ).tickValues(respParams.yAxisLabelArray).ticks(
18465
- respParams.customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
18466
- ).tickPadding(8).tickSizeOuter(0);
18460
+ ).tickValues(respParams.autoLabelFlag ? void 0 : respParams.yAxisLabelArray).ticks(respParams.customTickValue).tickPadding(8).tickSizeOuter(0);
18467
18461
  }
18468
18462
  };
18469
18463
  const getXAxis = () => {
@@ -18486,7 +18480,7 @@
18486
18480
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
18487
18481
  let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
18488
18482
  "hoverId",
18489
- (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
18483
+ (d) => d[0]?.properties.alias ? getHoverId(d[0]?.properties.alias) : getHoverId(d.key)
18490
18484
  );
18491
18485
  columnGroups = columnGroupsEnter.merge(columnGroups);
18492
18486
  let rects = columnGroups.selectAll("rect").data((d) => d);
@@ -18538,14 +18532,14 @@
18538
18532
  );
18539
18533
  const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
18540
18534
  gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
18541
- let legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
18535
+ let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
18542
18536
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
18543
18537
  selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
18544
18538
  }).on("mouseout", (event2, d) => {
18545
18539
  hideTooltipOnMouseOut();
18546
18540
  const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
18547
18541
  gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
18548
- let legend = d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-");
18542
+ let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
18549
18543
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
18550
18544
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
18551
18545
  });
@@ -18885,7 +18879,7 @@
18885
18879
  const seriesData = generalizedChartData(
18886
18880
  data.ChartData,
18887
18881
  data.DimensionList
18888
- );
18882
+ ).reverse();
18889
18883
  const dimensionList = data.DimensionList;
18890
18884
  const barChart = false;
18891
18885
  const isSecondaryAxisDrawn = false;
@@ -19181,7 +19175,7 @@
19181
19175
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
19182
19176
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
19183
19177
  ).ticks(
19184
- dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30,
19178
+ dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 80 : innerHeight2 / 80,
19185
19179
  "%"
19186
19180
  ).tickPadding(8).tickSizeOuter(0);
19187
19181
  }
@@ -20232,6 +20226,17 @@
20232
20226
  const initAxis = () => {
20233
20227
  getXAxis();
20234
20228
  {
20229
+ let responsiveLablesObj = responsiveYaxisLabel$1(
20230
+ chartJSON.yMaxLeft,
20231
+ chartJSON.yMinLeft,
20232
+ innerHeight2,
20233
+ formatOptions,
20234
+ chartJSON,
20235
+ customYaxisMinValue,
20236
+ customYaxisMaxValue,
20237
+ false,
20238
+ innerWidth2
20239
+ );
20235
20240
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
20236
20241
  (d) => getNumberWithFormat(
20237
20242
  d,
@@ -20241,19 +20246,7 @@
20241
20246
  )
20242
20247
  ).tickSize(
20243
20248
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
20244
- ).tickValues(
20245
- responsiveYaxisLabel$1(
20246
- chartJSON.yMaxLeft,
20247
- chartJSON.yMinLeft,
20248
- innerHeight2,
20249
- formatOptions,
20250
- chartJSON,
20251
- customYaxisMinValue,
20252
- customYaxisMaxValue,
20253
- false,
20254
- innerWidth2
20255
- ).yAxisLabelArray
20256
- ).ticks(innerHeight2 / 50).tickPadding(8).tickSizeOuter(0);
20249
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
20257
20250
  }
20258
20251
  };
20259
20252
  const getXAxis = () => {
@@ -20735,6 +20728,15 @@
20735
20728
  };
20736
20729
  const initAxis = () => {
20737
20730
  {
20731
+ let responsiveLablesObj = responsiveYaxisLabel$1(
20732
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
20733
+ chartJSON.yMinLeft,
20734
+ innerHeight2,
20735
+ formatOptions,
20736
+ chartJSON,
20737
+ customYaxisMinValue,
20738
+ customYaxisMaxValue
20739
+ );
20738
20740
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
20739
20741
  (d) => getNumberWithFormat(
20740
20742
  d,
@@ -20744,29 +20746,15 @@
20744
20746
  )
20745
20747
  ).tickSize(
20746
20748
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
20747
- ).tickValues(
20748
- responsiveYaxisLabel$1(
20749
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
20750
- chartJSON.yMinLeft,
20751
- innerHeight2,
20752
- formatOptions,
20753
- chartJSON,
20754
- customYaxisMinValue,
20755
- customYaxisMaxValue
20756
- ).yAxisLabelArray
20757
- ).ticks(
20758
- responsiveYaxisLabel$1(
20759
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
20760
- chartJSON.yMinLeft,
20761
- innerHeight2,
20762
- formatOptions,
20763
- chartJSON,
20764
- customYaxisMinValue,
20765
- customYaxisMaxValue
20766
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
20767
- ).tickPadding(8).tickSizeOuter(0);
20749
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
20768
20750
  }
20769
20751
  if (isSecondaryAxisDrawn) {
20752
+ let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
20753
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
20754
+ chartJSON.yMinRight,
20755
+ formatOptions,
20756
+ chartJSON
20757
+ );
20770
20758
  yAxisRight = axisRight(yScaleRight).tickFormat(
20771
20759
  (d) => getNumberWithFormat(
20772
20760
  d,
@@ -20774,21 +20762,7 @@
20774
20762
  formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
20775
20763
  formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
20776
20764
  )
20777
- ).tickValues(
20778
- responsiveSecondaryYaxisLabel(
20779
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
20780
- chartJSON.yMinRight,
20781
- formatOptions,
20782
- chartJSON
20783
- ).secondaryYAxisLabelArray
20784
- ).ticks(
20785
- responsiveSecondaryYaxisLabel(
20786
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
20787
- chartJSON.yMinRight,
20788
- formatOptions,
20789
- chartJSON
20790
- ).secondaryCustomTickValue ?? innerHeight2 / 30
20791
- ).tickSize(
20765
+ ).tickValues(responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
20792
20766
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
20793
20767
  ).tickPadding(8).tickSizeOuter(0);
20794
20768
  }
@@ -20975,7 +20949,7 @@
20975
20949
  const seriesData = generalizedChartData(
20976
20950
  data.ChartData,
20977
20951
  data.DimensionList
20978
- );
20952
+ )?.reverse() || [];
20979
20953
  const dimensionList = data.DimensionList;
20980
20954
  const barChart = false;
20981
20955
  const isSecondaryAxisDrawn = false;
@@ -21284,6 +21258,15 @@
21284
21258
  const initAxis = () => {
21285
21259
  getXAxis();
21286
21260
  {
21261
+ let responsiveLablesObj = responsiveYaxisLabel$1(
21262
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
21263
+ chartJSON.yMinLeft,
21264
+ innerHeight2,
21265
+ formatOptions,
21266
+ chartJSON,
21267
+ customYaxisMinValue,
21268
+ customYaxisMaxValue
21269
+ );
21287
21270
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
21288
21271
  (d) => getNumberWithFormat(
21289
21272
  d,
@@ -21293,27 +21276,7 @@
21293
21276
  )
21294
21277
  ).tickSize(
21295
21278
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
21296
- ).tickValues(
21297
- responsiveYaxisLabel$1(
21298
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
21299
- chartJSON.yMinLeft,
21300
- innerHeight2,
21301
- formatOptions,
21302
- chartJSON,
21303
- customYaxisMinValue,
21304
- customYaxisMaxValue
21305
- ).yAxisLabelArray
21306
- ).ticks(
21307
- responsiveYaxisLabel$1(
21308
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
21309
- chartJSON.yMinLeft,
21310
- innerHeight2,
21311
- formatOptions,
21312
- chartJSON,
21313
- customYaxisMinValue,
21314
- customYaxisMaxValue
21315
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
21316
- ).tickPadding(8).tickSizeOuter(0);
21279
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
21317
21280
  }
21318
21281
  };
21319
21282
  const getXAxis = () => {
@@ -21526,7 +21489,7 @@
21526
21489
  const seriesData = generalizedChartData(
21527
21490
  data.ChartData,
21528
21491
  data.DimensionList
21529
- );
21492
+ )?.reverse() || [];
21530
21493
  const dimensionList = data.DimensionList;
21531
21494
  const barChart = false;
21532
21495
  const isSecondaryAxisDrawn = false;
@@ -21800,7 +21763,7 @@
21800
21763
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
21801
21764
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
21802
21765
  ).ticks(
21803
- dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30,
21766
+ dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 80 : innerHeight2 / 80,
21804
21767
  "%"
21805
21768
  ).tickPadding(8).tickSizeOuter(0);
21806
21769
  }
@@ -21828,7 +21791,7 @@
21828
21791
  const lineGenerator = line$1().x(
21829
21792
  (d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
21830
21793
  ).y((d) => d[1] > 0 ? yScaleLeft(d[1]) : yScaleLeft(d[0])).curve(getCurveType(formatOptions));
21831
- let lines = gTag.selectAll(".parentGroup").data([stackChartData.reverse()]);
21794
+ let lines = gTag.selectAll(".parentGroup").data([stackChartData]);
21832
21795
  lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
21833
21796
  let lineGroups = lines.selectAll(".line-group").data((d) => d);
21834
21797
  let lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
@@ -22315,6 +22278,15 @@
22315
22278
  };
22316
22279
  const initAxis = () => {
22317
22280
  {
22281
+ let responsiveLablesObj = responsiveYaxisLabel$1(
22282
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22283
+ chartJSON.yMinLeft,
22284
+ innerHeight2,
22285
+ formatOptions,
22286
+ chartJSON,
22287
+ customYaxisMinValue,
22288
+ customYaxisMaxValue
22289
+ );
22318
22290
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
22319
22291
  (d) => getNumberWithFormat(
22320
22292
  d,
@@ -22324,29 +22296,15 @@
22324
22296
  )
22325
22297
  ).tickSize(
22326
22298
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
22327
- ).tickValues(
22328
- responsiveYaxisLabel$1(
22329
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22330
- chartJSON.yMinLeft,
22331
- innerHeight2,
22332
- formatOptions,
22333
- chartJSON,
22334
- customYaxisMinValue,
22335
- customYaxisMaxValue
22336
- ).yAxisLabelArray
22337
- ).ticks(
22338
- responsiveYaxisLabel$1(
22339
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22340
- chartJSON.yMinLeft,
22341
- innerHeight2,
22342
- formatOptions,
22343
- chartJSON,
22344
- customYaxisMinValue,
22345
- customYaxisMaxValue
22346
- ).customTickValue ?? innerHeight2 / 30
22347
- ).tickPadding(8).tickSizeOuter(0);
22299
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
22348
22300
  }
22349
22301
  if (isSecondaryAxisDrawn) {
22302
+ let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
22303
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
22304
+ chartJSON.yMinRight,
22305
+ formatOptions,
22306
+ chartJSON
22307
+ );
22350
22308
  xAxisTop = axisTop(xScaleTop).tickFormat(
22351
22309
  (d) => getNumberWithFormat(
22352
22310
  d,
@@ -22354,21 +22312,7 @@
22354
22312
  formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
22355
22313
  formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
22356
22314
  )
22357
- ).tickValues(
22358
- responsiveSecondaryYaxisLabel(
22359
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
22360
- chartJSON.yMinRight,
22361
- formatOptions,
22362
- chartJSON
22363
- ).secondaryYAxisLabelArray
22364
- ).ticks(
22365
- responsiveSecondaryYaxisLabel(
22366
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
22367
- chartJSON.yMinRight,
22368
- formatOptions,
22369
- chartJSON
22370
- ).secondaryCustomTickValue ?? innerHeight2 / 30
22371
- ).tickSize(
22315
+ ).tickValues(responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
22372
22316
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
22373
22317
  ).tickPadding(8).tickSizeOuter(0);
22374
22318
  }
@@ -22545,7 +22489,7 @@
22545
22489
  const seriesData = generalizedChartData(
22546
22490
  data.ChartData,
22547
22491
  data.DimensionList
22548
- );
22492
+ )?.reverse();
22549
22493
  const dimensionList = data.DimensionList;
22550
22494
  const barChart = true;
22551
22495
  const isSecondaryAxisDrawn = false;
@@ -22814,6 +22758,17 @@
22814
22758
  };
22815
22759
  const initAxis = () => {
22816
22760
  {
22761
+ let responsiveLablesObj = responsiveYaxisLabel$1(
22762
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22763
+ chartJSON.yMinLeft,
22764
+ innerHeight2,
22765
+ formatOptions,
22766
+ chartJSON,
22767
+ customYaxisMinValue,
22768
+ customYaxisMaxValue,
22769
+ barChart,
22770
+ innerWidth2
22771
+ );
22817
22772
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
22818
22773
  (d) => getNumberWithFormat(
22819
22774
  d,
@@ -22823,31 +22778,7 @@
22823
22778
  )
22824
22779
  ).tickSize(
22825
22780
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
22826
- ).tickValues(
22827
- responsiveYaxisLabel$1(
22828
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22829
- chartJSON.yMinLeft,
22830
- innerHeight2,
22831
- formatOptions,
22832
- chartJSON,
22833
- customYaxisMinValue,
22834
- customYaxisMaxValue,
22835
- barChart,
22836
- innerWidth2
22837
- ).yAxisLabelArray
22838
- ).ticks(
22839
- responsiveYaxisLabel$1(
22840
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22841
- chartJSON.yMinLeft,
22842
- innerHeight2,
22843
- formatOptions,
22844
- chartJSON,
22845
- customYaxisMinValue,
22846
- customYaxisMaxValue,
22847
- barChart,
22848
- innerWidth2
22849
- ).customTickValue ?? innerHeight2 / 30
22850
- ).tickPadding(8).tickSizeOuter(0);
22781
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
22851
22782
  }
22852
22783
  };
22853
22784
  const getYAxis = () => {
@@ -23248,7 +23179,7 @@
23248
23179
  let columnWidth = 0;
23249
23180
  const chartType = actualChartTypes.stackBar100;
23250
23181
  const svgRef = require$$0$1.useRef();
23251
- const seriesData = generalizedChartData(data.ChartData, data.DimensionList);
23182
+ const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse();
23252
23183
  const dimensionList = data.DimensionList;
23253
23184
  const barChart = true;
23254
23185
  const isSecondaryAxisDrawn = false;
@@ -23402,6 +23333,7 @@
23402
23333
  margin,
23403
23334
  yTitle,
23404
23335
  yLabel,
23336
+ void 0,
23405
23337
  xTitle,
23406
23338
  xLabel
23407
23339
  );
@@ -23517,7 +23449,7 @@
23517
23449
  {
23518
23450
  xAxisBottom = axisBottom(xScaleBottom).tickSize(
23519
23451
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
23520
- ).ticks(innerWidth2 / 30, "%").tickPadding(8).tickSizeOuter(0);
23452
+ ).ticks(innerWidth2 / 80, "%").tickPadding(8).tickSizeOuter(0);
23521
23453
  }
23522
23454
  };
23523
23455
  const getYAxis = () => {
@@ -23541,7 +23473,7 @@
23541
23473
  filteredDimension.forEach((dim) => {
23542
23474
  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();
23543
23475
  });
23544
- let columns = gTag.selectAll(".parentGroup").data([stackChartData.reverse()]);
23476
+ let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
23545
23477
  columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
23546
23478
  let columnGroups = columns.selectAll(".column-group").data((d) => d);
23547
23479
  let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
@@ -23977,6 +23909,17 @@
23977
23909
  const initAxis = () => {
23978
23910
  getYAxis();
23979
23911
  {
23912
+ let responsiveLablesObj = responsiveYaxisLabel$1(
23913
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
23914
+ chartJSON.yMinLeft,
23915
+ innerHeight2,
23916
+ formatOptions,
23917
+ chartJSON,
23918
+ customYaxisMinValue,
23919
+ customYaxisMaxValue,
23920
+ barChart,
23921
+ innerWidth2
23922
+ );
23980
23923
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
23981
23924
  (d) => getNumberWithFormat(
23982
23925
  d,
@@ -23986,31 +23929,7 @@
23986
23929
  )
23987
23930
  ).tickSize(
23988
23931
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 : 0 : 0
23989
- ).tickValues(
23990
- responsiveYaxisLabel$1(
23991
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
23992
- chartJSON.yMinLeft,
23993
- innerHeight2,
23994
- formatOptions,
23995
- chartJSON,
23996
- customYaxisMinValue,
23997
- customYaxisMaxValue,
23998
- barChart,
23999
- innerWidth2
24000
- ).yAxisLabelArray
24001
- ).ticks(
24002
- responsiveYaxisLabel$1(
24003
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
24004
- chartJSON.yMinLeft,
24005
- innerHeight2,
24006
- formatOptions,
24007
- chartJSON,
24008
- customYaxisMinValue,
24009
- customYaxisMaxValue,
24010
- barChart,
24011
- innerWidth2
24012
- ).customTickValue ?? innerHeight2 / 30
24013
- ).tickPadding(8).tickSizeOuter(0);
23932
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
24014
23933
  }
24015
23934
  };
24016
23935
  const getYAxis = () => {
@@ -24744,6 +24663,15 @@
24744
24663
  const initAxis = () => {
24745
24664
  getYAxis();
24746
24665
  {
24666
+ let responsiveLablesObj = responsiveYaxisLabel$1(
24667
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
24668
+ chartJSON.yMinLeft,
24669
+ innerHeight2,
24670
+ formatOptions,
24671
+ chartJSON,
24672
+ customYaxisMinValue,
24673
+ customYaxisMaxValue
24674
+ );
24747
24675
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
24748
24676
  (d) => getNumberWithFormat(
24749
24677
  d,
@@ -24753,27 +24681,7 @@
24753
24681
  )
24754
24682
  ).tickSize(
24755
24683
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
24756
- ).tickValues(
24757
- responsiveYaxisLabel$1(
24758
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
24759
- chartJSON.yMinLeft,
24760
- innerHeight2,
24761
- formatOptions,
24762
- chartJSON,
24763
- customYaxisMinValue,
24764
- customYaxisMaxValue
24765
- ).yAxisLabelArray
24766
- ).ticks(
24767
- responsiveYaxisLabel$1(
24768
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
24769
- chartJSON.yMinLeft,
24770
- innerHeight2,
24771
- formatOptions,
24772
- chartJSON,
24773
- customYaxisMinValue,
24774
- customYaxisMaxValue
24775
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
24776
- ).tickPadding(8).tickSizeOuter(0);
24684
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
24777
24685
  }
24778
24686
  if (isSecondaryAxisDrawn) {
24779
24687
  xAxisTop = axisTop(xScaleTop).tickFormat(
@@ -25309,6 +25217,15 @@
25309
25217
  const initAxis = () => {
25310
25218
  getXAxis();
25311
25219
  {
25220
+ let responsiveLablesObj = responsiveYaxisLabel$1(
25221
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25222
+ chartJSON.yMinLeft,
25223
+ innerHeight2,
25224
+ formatOptions,
25225
+ chartJSON,
25226
+ customYaxisMinValue,
25227
+ customYaxisMaxValue
25228
+ );
25312
25229
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
25313
25230
  (d) => getNumberWithFormat(
25314
25231
  d,
@@ -25318,27 +25235,7 @@
25318
25235
  )
25319
25236
  ).tickSize(
25320
25237
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
25321
- ).tickValues(
25322
- responsiveYaxisLabel$1(
25323
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25324
- chartJSON.yMinLeft,
25325
- innerHeight2,
25326
- formatOptions,
25327
- chartJSON,
25328
- customYaxisMinValue,
25329
- customYaxisMaxValue
25330
- ).yAxisLabelArray
25331
- ).ticks(
25332
- responsiveYaxisLabel$1(
25333
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25334
- chartJSON.yMinLeft,
25335
- innerHeight2,
25336
- formatOptions,
25337
- chartJSON,
25338
- customYaxisMinValue,
25339
- customYaxisMaxValue
25340
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
25341
- ).tickPadding(8).tickSizeOuter(0);
25238
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
25342
25239
  }
25343
25240
  };
25344
25241
  const getXAxis = () => {
@@ -25545,7 +25442,7 @@
25545
25442
  const seriesData = generalizedChartData(
25546
25443
  data.ChartData,
25547
25444
  data.DimensionList
25548
- );
25445
+ )?.reverse() || [];
25549
25446
  const dimensionList = data.DimensionList;
25550
25447
  const barChart = false;
25551
25448
  const isSecondaryAxisDrawn = false;
@@ -25855,6 +25752,15 @@
25855
25752
  };
25856
25753
  const initAxis = () => {
25857
25754
  {
25755
+ let responsiveLablesObj = responsiveYaxisLabel$1(
25756
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25757
+ chartJSON.yMinLeft,
25758
+ innerHeight2,
25759
+ formatOptions,
25760
+ chartJSON,
25761
+ customYaxisMinValue,
25762
+ customYaxisMaxValue
25763
+ );
25858
25764
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
25859
25765
  (d) => getNumberWithFormat(
25860
25766
  d,
@@ -25864,27 +25770,7 @@
25864
25770
  )
25865
25771
  ).tickSize(
25866
25772
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
25867
- ).tickValues(
25868
- responsiveYaxisLabel$1(
25869
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25870
- chartJSON.yMinLeft,
25871
- innerHeight2,
25872
- formatOptions,
25873
- chartJSON,
25874
- customYaxisMinValue,
25875
- customYaxisMaxValue
25876
- ).yAxisLabelArray
25877
- ).ticks(
25878
- responsiveYaxisLabel$1(
25879
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25880
- chartJSON.yMinLeft,
25881
- innerHeight2,
25882
- formatOptions,
25883
- chartJSON,
25884
- customYaxisMinValue,
25885
- customYaxisMaxValue
25886
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
25887
- ).tickPadding(8).tickSizeOuter(0);
25773
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
25888
25774
  }
25889
25775
  };
25890
25776
  const getXAxis = () => {
@@ -25909,7 +25795,7 @@
25909
25795
  ).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined(
25910
25796
  (d) => d.data.hideZero ? Boolean(d.data.key) : true
25911
25797
  ).curve(getCurveType(formatOptions));
25912
- let areas = gTag.selectAll(".lineGroup").data([stackChartData.reverse()]);
25798
+ let areas = gTag.selectAll(".lineGroup").data([stackChartData]);
25913
25799
  let focus = gTag.append("g").attr("class", "focusClass");
25914
25800
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
25915
25801
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
@@ -26124,7 +26010,7 @@
26124
26010
  const seriesData = generalizedChartData(
26125
26011
  data.ChartData,
26126
26012
  data.DimensionList
26127
- );
26013
+ )?.reverse() || [];
26128
26014
  const dimensionList = data.DimensionList;
26129
26015
  const barChart = false;
26130
26016
  const isSecondaryAxisDrawn = false;
@@ -26412,7 +26298,7 @@
26412
26298
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
26413
26299
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
26414
26300
  ).ticks(
26415
- dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30,
26301
+ dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 80 : innerHeight2 / 80,
26416
26302
  "%"
26417
26303
  ).tickPadding(8).tickSizeOuter(0);
26418
26304
  }
@@ -26438,13 +26324,13 @@
26438
26324
  });
26439
26325
  const columnGenerator = area().x(
26440
26326
  (d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
26441
- ).y0(() => yScaleLeft(0)).y1((d) => yScaleLeft(d[1])).defined((d) => d.data.hideZero ? Boolean(d[0]) : true).curve(curveLinear$1);
26327
+ ).y0((d) => yScaleLeft(d[0])).y1((d) => yScaleLeft(d[1])).defined((d) => d.data.hideZero ? Boolean(d[0]) : true).curve(curveLinear$1);
26442
26328
  const columnGeneratorStart = area().x(
26443
26329
  (d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
26444
- ).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined(
26330
+ ).y0((d) => yScaleLeft(d[0])).y1((d) => yScaleLeft(d[1])).defined(
26445
26331
  (d) => d.data.hideZero ? Boolean(d.data.key) : true
26446
26332
  ).curve(getCurveType(formatOptions));
26447
- let areas = gTag.selectAll(".lineGroup").data([stackChartData.reverse()]);
26333
+ let areas = gTag.selectAll(".lineGroup").data([stackChartData]);
26448
26334
  let focus = gTag.append("g").attr("class", "focusClass");
26449
26335
  areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
26450
26336
  let areaGroups = areas.selectAll(".area-group").data((d) => d);
@@ -26967,10 +26853,10 @@
26967
26853
  ).attr(
26968
26854
  "font-family",
26969
26855
  (d) => d.data.properties?.valueFont ?? "Helvetica"
26970
- ).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", "1.00em").text((d) => {
26856
+ ).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
26971
26857
  if (chartFormatOptions.plotArea.dataLabelValue) {
26972
26858
  const dataValue = d.data.data[0].value;
26973
- if (chartFormatOptions.plotArea.dataLabelName && chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
26859
+ if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
26974
26860
  if (chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%") {
26975
26861
  return (Math.abs(dataValue / pieTotalValue) * 100).toFixed(
26976
26862
  convertStringToNumber(
@@ -27331,10 +27217,10 @@
27331
27217
  ).attr(
27332
27218
  "font-family",
27333
27219
  (d) => d.data.properties?.valueFont ?? "Helvetica"
27334
- ).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", "1.00em").text((d) => {
27220
+ ).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
27335
27221
  if (chartFormatOptions.plotArea.dataLabelValue) {
27336
27222
  const dataValue = d.data.data[0].value;
27337
- if (chartFormatOptions.plotArea.dataLabelName && chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
27223
+ if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
27338
27224
  if (chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%") {
27339
27225
  return (Math.abs(dataValue / pieTotalValue) * 100).toFixed(
27340
27226
  convertStringToNumber(
@@ -53749,6 +53635,15 @@
53749
53635
  const initAxis = () => {
53750
53636
  getXAxis();
53751
53637
  {
53638
+ let responsiveLablesObj = responsiveYaxisLabel$1(
53639
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
53640
+ chartJSON.yMinLeft,
53641
+ innerHeight2,
53642
+ formatOptions,
53643
+ chartJSON,
53644
+ customYaxisMinValue,
53645
+ customYaxisMaxValue
53646
+ );
53752
53647
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
53753
53648
  (d) => getNumberWithFormat(
53754
53649
  d,
@@ -53758,27 +53653,7 @@
53758
53653
  )
53759
53654
  ).tickSize(
53760
53655
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
53761
- ).tickValues(
53762
- responsiveYaxisLabel$1(
53763
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
53764
- chartJSON.yMinLeft,
53765
- innerHeight2,
53766
- formatOptions,
53767
- chartJSON,
53768
- customYaxisMinValue,
53769
- customYaxisMaxValue
53770
- ).yAxisLabelArray
53771
- ).ticks(
53772
- responsiveYaxisLabel$1(
53773
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
53774
- chartJSON.yMinLeft,
53775
- innerHeight2,
53776
- formatOptions,
53777
- chartJSON,
53778
- customYaxisMinValue,
53779
- customYaxisMaxValue
53780
- ).customTickValue ?? (dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30)
53781
- ).tickPadding(8).tickSizeOuter(0);
53656
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
53782
53657
  }
53783
53658
  colorScale = ordinal().range([
53784
53659
  "#E25A42",