pace-chart-lib 1.0.6 → 1.0.8

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.
@@ -11602,6 +11602,7 @@ function computeMarginMetrics(windowWidth, windowHeight, maxNumberForPrimaryAxis
11602
11602
  )[1] : 0;
11603
11603
  yTitle = yTitle > width * 0.1 ? width * 0.1 : yTitle;
11604
11604
  let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0);
11605
+ yLabel += 8;
11605
11606
  let secondaryYLabel = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? responsiveYaxisMargin(
11606
11607
  maxNumberForSecondaryAxis,
11607
11608
  yMaxRight,
@@ -12045,20 +12046,7 @@ function getNumberWithFormat(measureValue, displayUnits, numberFormat, decimalPr
12045
12046
  let decimalValues = decimalPrescision;
12046
12047
  let formatter;
12047
12048
  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;
12049
+ return getAutoNumberWithFormat(measureValue);
12062
12050
  } else if (displayUnits != staticDisplayUnits.none) {
12063
12051
  displayUnits == staticDisplayUnits.thousands ? (Unit = 1e3, displayUnitsPostFix = "K") : null;
12064
12052
  displayUnits == staticDisplayUnits.millions ? (Unit = 1e6, displayUnitsPostFix = "M") : null;
@@ -12107,6 +12095,26 @@ function getNumberWithFormat(measureValue, displayUnits, numberFormat, decimalPr
12107
12095
  throw error;
12108
12096
  }
12109
12097
  }
12098
+ function getAutoNumberWithFormat(value2) {
12099
+ if (value2 === null || value2 === void 0 || isNaN(value2)) return "-";
12100
+ const absValue = Math.abs(value2);
12101
+ if (absValue >= 1e9) {
12102
+ return format(".2s")(value2).replace("G", "B");
12103
+ } else if (absValue >= 1e6) {
12104
+ return format(".2s")(value2);
12105
+ } else if (absValue >= 1e3) {
12106
+ return format(".2s")(value2);
12107
+ } else if (absValue >= 1) {
12108
+ const formatted = format(".2f")(value2);
12109
+ return +formatted === Math.floor(value2) ? format(".0f")(value2) : formatted;
12110
+ } else if (absValue >= 0.01) {
12111
+ return format(".2f")(value2);
12112
+ } else if (absValue > 0) {
12113
+ return format(".2e")(value2);
12114
+ } else {
12115
+ return "0";
12116
+ }
12117
+ }
12110
12118
  function responsiveYaxisMargin(maxNumber, yMax, formatOptions, isSecondaryAxis, isNormalizedChart) {
12111
12119
  try {
12112
12120
  {
@@ -12120,8 +12128,7 @@ function responsiveYaxisMargin(maxNumber, yMax, formatOptions, isSecondaryAxis,
12120
12128
  if (displayUnits != "None") {
12121
12129
  yMaxNumber = getNumberWithFormat(
12122
12130
  Math.floor(maxNumber) || Math.floor(yMax),
12123
- "Auto",
12124
- //displayUnits,
12131
+ displayUnits,
12125
12132
  numberFormat,
12126
12133
  decimalPrecision ?? "2"
12127
12134
  ).toString();
@@ -12156,6 +12163,7 @@ function responsiveYaxisMargin(maxNumber, yMax, formatOptions, isSecondaryAxis,
12156
12163
  }
12157
12164
  function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptions, chartJSON) {
12158
12165
  try {
12166
+ let autoLabelFlag = false;
12159
12167
  let secondaryCustomYaxisIntervalValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisIntervalText);
12160
12168
  let secondaryCustomYaxisMinValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMinText);
12161
12169
  let secondaryCustomYaxisMaxValue = parseFloat(formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText);
@@ -12197,6 +12205,7 @@ function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptio
12197
12205
  }
12198
12206
  }
12199
12207
  } else {
12208
+ let autoLabelFlag2 = true;
12200
12209
  let labelWidthPx = calculateWidthHeightDynamically(
12201
12210
  (parseFloat(formatOptions.yAxisLabel.yAxisMaxText) || chartJSON.yMaxRight).toString(),
12202
12211
  formatOptions.yAxisLabel.yAxisLabelFontSize,
@@ -12210,7 +12219,7 @@ function responsiveSecondaryYaxisLabel(secondaryYmax, secondaryYmin, formatOptio
12210
12219
  labelWidthPx[0]
12211
12220
  );
12212
12221
  }
12213
- return { secondaryYAxisLabelArray, secondaryCustomTickValue };
12222
+ return { secondaryYAxisLabelArray, secondaryCustomTickValue, autoLabelFlag };
12214
12223
  } catch (e) {
12215
12224
  }
12216
12225
  }
@@ -12252,11 +12261,17 @@ function isVerticallyOverlapping(obj1, obj2) {
12252
12261
  }
12253
12262
  function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJSON, customYaxisMinValue, customYaxisMaxValue, barChart, innerWidth2) {
12254
12263
  try {
12264
+ let autoLabelFlag = false;
12255
12265
  let customYaxisIntervalValue = parseFloat(
12256
12266
  formatOptions.yAxisLabel.yAxisIntervalText
12257
12267
  );
12258
12268
  let yAxisLabelArray = [];
12259
12269
  let customTickValue;
12270
+ if (!customYaxisMaxValue && Ymax > 0) {
12271
+ const range2 = Ymax - Ymin;
12272
+ const padding = range2 * 0.05;
12273
+ Ymax = Ymax + padding;
12274
+ }
12260
12275
  if (customYaxisIntervalValue && customYaxisIntervalValue !== 0 && customYaxisIntervalValue !== void 0) {
12261
12276
  let minValue = customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : Ymin;
12262
12277
  let maxValue = customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : Ymax;
@@ -12296,6 +12311,7 @@ function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJS
12296
12311
  }
12297
12312
  }
12298
12313
  } else {
12314
+ autoLabelFlag = true;
12299
12315
  let labelWidthPx = calculateWidthHeightDynamically(
12300
12316
  (customYaxisMaxValue || chartJSON.yMaxLeft).toString(),
12301
12317
  formatOptions.yAxisLabel.yAxisLabelFontSize,
@@ -12304,13 +12320,14 @@ function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJS
12304
12320
  );
12305
12321
  yAxisLabelArray = getLabelsFromAlgo(
12306
12322
  customYaxisMinValue || chartJSON.yMinLeft,
12307
- customYaxisMaxValue || chartJSON.yMaxLeft,
12323
+ Ymax,
12324
+ //Use updated Ymax with padding
12308
12325
  barChart ? innerWidth2 : innerHeight2,
12309
12326
  barChart ? labelWidthPx[1] : labelWidthPx[0]
12310
12327
  );
12311
- customTickValue = barChart ? innerWidth2 / 30 : innerHeight2 / 30;
12328
+ customTickValue = barChart ? innerWidth2 / 80 : innerHeight2 / 80;
12312
12329
  }
12313
- return { yAxisLabelArray, customTickValue };
12330
+ return { yAxisLabelArray, customTickValue, autoLabelFlag };
12314
12331
  } catch (e) {
12315
12332
  throw e;
12316
12333
  }
@@ -12343,9 +12360,7 @@ function getLabelsFromAlgo(dataMin, dataMax, axisLengthPx, labelWidthPx = 80) {
12343
12360
  labels.push(parseFloat(current.toFixed(10)));
12344
12361
  current += interval2;
12345
12362
  }
12346
- const reductionFactor = 4;
12347
- const reducedLabels = labels.filter((i) => i % reductionFactor === 0);
12348
- return reducedLabels;
12363
+ return labels;
12349
12364
  }
12350
12365
  function initYaxis$1(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, innerHeight2) {
12351
12366
  try {
@@ -16399,6 +16414,15 @@ const ColumnChart = ({
16399
16414
  };
16400
16415
  const initAxis = () => {
16401
16416
  {
16417
+ let responsiveLablesObj = responsiveYaxisLabel$1(
16418
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
16419
+ chartJSON.yMinLeft,
16420
+ innerHeight2,
16421
+ formatOptions,
16422
+ chartJSON,
16423
+ customYaxisMinValue,
16424
+ customYaxisMaxValue
16425
+ );
16402
16426
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
16403
16427
  (d) => getNumberWithFormat(
16404
16428
  d,
@@ -16408,27 +16432,7 @@ const ColumnChart = ({
16408
16432
  )
16409
16433
  ).tickSize(
16410
16434
  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);
16435
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
16432
16436
  }
16433
16437
  if (isSecondaryAxisDrawn) {
16434
16438
  yAxisRight = axisRight(yScaleRight).tickFormat(
@@ -17133,6 +17137,15 @@ const CustomColumnChart = ({
17133
17137
  };
17134
17138
  const initAxis = () => {
17135
17139
  {
17140
+ let responsiveLablesObj = responsiveYaxisLabel$1(
17141
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17142
+ chartJSON.yMinLeft,
17143
+ innerHeight2,
17144
+ formatOptions,
17145
+ chartJSON,
17146
+ customYaxisMinValue,
17147
+ customYaxisMaxValue
17148
+ );
17136
17149
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
17137
17150
  (d) => getNumberWithFormat(
17138
17151
  d,
@@ -17142,27 +17155,7 @@ const CustomColumnChart = ({
17142
17155
  )
17143
17156
  ).tickSize(
17144
17157
  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);
17158
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
17166
17159
  }
17167
17160
  if (isSecondaryAxisDrawn) {
17168
17161
  yAxisRight = axisRight(yScaleRight).tickFormat(
@@ -17931,6 +17924,15 @@ const LayeredColumnChart = ({
17931
17924
  const initAxis = () => {
17932
17925
  getXAxis();
17933
17926
  {
17927
+ let responsiveLablesObj = responsiveYaxisLabel$1(
17928
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17929
+ chartJSON.yMinLeft,
17930
+ innerHeight2,
17931
+ formatOptions,
17932
+ chartJSON,
17933
+ customYaxisMinValue,
17934
+ customYaxisMaxValue
17935
+ );
17934
17936
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
17935
17937
  (d) => getNumberWithFormat(
17936
17938
  d,
@@ -17940,27 +17942,7 @@ const LayeredColumnChart = ({
17940
17942
  )
17941
17943
  ).tickSize(
17942
17944
  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);
17945
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
17964
17946
  }
17965
17947
  };
17966
17948
  const getXAxis = () => {
@@ -18458,9 +18440,7 @@ const StackColumnChart = ({
18458
18440
  )
18459
18441
  ).tickSize(
18460
18442
  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);
18443
+ ).tickValues(respParams.autoLabelFlag ? void 0 : respParams.yAxisLabelArray).ticks(respParams.customTickValue).tickPadding(8).tickSizeOuter(0);
18464
18444
  }
18465
18445
  };
18466
18446
  const getXAxis = () => {
@@ -19178,7 +19158,7 @@ const NormalizedStackColumnChart = ({
19178
19158
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
19179
19159
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
19180
19160
  ).ticks(
19181
- dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30,
19161
+ dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 80 : innerHeight2 / 80,
19182
19162
  "%"
19183
19163
  ).tickPadding(8).tickSizeOuter(0);
19184
19164
  }
@@ -20229,6 +20209,17 @@ const ColumnHistogramChart = ({
20229
20209
  const initAxis = () => {
20230
20210
  getXAxis();
20231
20211
  {
20212
+ let responsiveLablesObj = responsiveYaxisLabel$1(
20213
+ chartJSON.yMaxLeft,
20214
+ chartJSON.yMinLeft,
20215
+ innerHeight2,
20216
+ formatOptions,
20217
+ chartJSON,
20218
+ customYaxisMinValue,
20219
+ customYaxisMaxValue,
20220
+ false,
20221
+ innerWidth2
20222
+ );
20232
20223
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
20233
20224
  (d) => getNumberWithFormat(
20234
20225
  d,
@@ -20238,19 +20229,7 @@ const ColumnHistogramChart = ({
20238
20229
  )
20239
20230
  ).tickSize(
20240
20231
  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);
20232
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
20254
20233
  }
20255
20234
  };
20256
20235
  const getXAxis = () => {
@@ -20732,6 +20711,15 @@ const LineChart = ({
20732
20711
  };
20733
20712
  const initAxis = () => {
20734
20713
  {
20714
+ let responsiveLablesObj = responsiveYaxisLabel$1(
20715
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
20716
+ chartJSON.yMinLeft,
20717
+ innerHeight2,
20718
+ formatOptions,
20719
+ chartJSON,
20720
+ customYaxisMinValue,
20721
+ customYaxisMaxValue
20722
+ );
20735
20723
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
20736
20724
  (d) => getNumberWithFormat(
20737
20725
  d,
@@ -20741,29 +20729,15 @@ const LineChart = ({
20741
20729
  )
20742
20730
  ).tickSize(
20743
20731
  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);
20732
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
20765
20733
  }
20766
20734
  if (isSecondaryAxisDrawn) {
20735
+ let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
20736
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
20737
+ chartJSON.yMinRight,
20738
+ formatOptions,
20739
+ chartJSON
20740
+ );
20767
20741
  yAxisRight = axisRight(yScaleRight).tickFormat(
20768
20742
  (d) => getNumberWithFormat(
20769
20743
  d,
@@ -20771,21 +20745,7 @@ const LineChart = ({
20771
20745
  formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
20772
20746
  formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
20773
20747
  )
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(
20748
+ ).tickValues(responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
20789
20749
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
20790
20750
  ).tickPadding(8).tickSizeOuter(0);
20791
20751
  }
@@ -21281,6 +21241,15 @@ const StackLineChart = ({
21281
21241
  const initAxis = () => {
21282
21242
  getXAxis();
21283
21243
  {
21244
+ let responsiveLablesObj = responsiveYaxisLabel$1(
21245
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
21246
+ chartJSON.yMinLeft,
21247
+ innerHeight2,
21248
+ formatOptions,
21249
+ chartJSON,
21250
+ customYaxisMinValue,
21251
+ customYaxisMaxValue
21252
+ );
21284
21253
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
21285
21254
  (d) => getNumberWithFormat(
21286
21255
  d,
@@ -21290,27 +21259,7 @@ const StackLineChart = ({
21290
21259
  )
21291
21260
  ).tickSize(
21292
21261
  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);
21262
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
21314
21263
  }
21315
21264
  };
21316
21265
  const getXAxis = () => {
@@ -21797,7 +21746,7 @@ const NormalisedStackLineChart = ({
21797
21746
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
21798
21747
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
21799
21748
  ).ticks(
21800
- dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30,
21749
+ dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 80 : innerHeight2 / 80,
21801
21750
  "%"
21802
21751
  ).tickPadding(8).tickSizeOuter(0);
21803
21752
  }
@@ -22312,6 +22261,15 @@ const HorizontalBarChart = ({
22312
22261
  };
22313
22262
  const initAxis = () => {
22314
22263
  {
22264
+ let responsiveLablesObj = responsiveYaxisLabel$1(
22265
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22266
+ chartJSON.yMinLeft,
22267
+ innerHeight2,
22268
+ formatOptions,
22269
+ chartJSON,
22270
+ customYaxisMinValue,
22271
+ customYaxisMaxValue
22272
+ );
22315
22273
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
22316
22274
  (d) => getNumberWithFormat(
22317
22275
  d,
@@ -22321,29 +22279,15 @@ const HorizontalBarChart = ({
22321
22279
  )
22322
22280
  ).tickSize(
22323
22281
  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);
22282
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
22345
22283
  }
22346
22284
  if (isSecondaryAxisDrawn) {
22285
+ let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
22286
+ secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
22287
+ chartJSON.yMinRight,
22288
+ formatOptions,
22289
+ chartJSON
22290
+ );
22347
22291
  xAxisTop = axisTop(xScaleTop).tickFormat(
22348
22292
  (d) => getNumberWithFormat(
22349
22293
  d,
@@ -22351,21 +22295,7 @@ const HorizontalBarChart = ({
22351
22295
  formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
22352
22296
  formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
22353
22297
  )
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(
22298
+ ).tickValues(responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
22369
22299
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
22370
22300
  ).tickPadding(8).tickSizeOuter(0);
22371
22301
  }
@@ -22811,6 +22741,17 @@ const StackHorizontalChart = ({
22811
22741
  };
22812
22742
  const initAxis = () => {
22813
22743
  {
22744
+ let responsiveLablesObj = responsiveYaxisLabel$1(
22745
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
22746
+ chartJSON.yMinLeft,
22747
+ innerHeight2,
22748
+ formatOptions,
22749
+ chartJSON,
22750
+ customYaxisMinValue,
22751
+ customYaxisMaxValue,
22752
+ barChart,
22753
+ innerWidth2
22754
+ );
22814
22755
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
22815
22756
  (d) => getNumberWithFormat(
22816
22757
  d,
@@ -22820,31 +22761,7 @@ const StackHorizontalChart = ({
22820
22761
  )
22821
22762
  ).tickSize(
22822
22763
  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);
22764
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
22848
22765
  }
22849
22766
  };
22850
22767
  const getYAxis = () => {
@@ -23514,7 +23431,7 @@ const NormalizedStackHorizontalBarChart = ({
23514
23431
  {
23515
23432
  xAxisBottom = axisBottom(xScaleBottom).tickSize(
23516
23433
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
23517
- ).ticks(innerWidth2 / 30, "%").tickPadding(8).tickSizeOuter(0);
23434
+ ).ticks(innerWidth2 / 80, "%").tickPadding(8).tickSizeOuter(0);
23518
23435
  }
23519
23436
  };
23520
23437
  const getYAxis = () => {
@@ -23974,6 +23891,17 @@ const LayeredHorizontalBarChart = ({
23974
23891
  const initAxis = () => {
23975
23892
  getYAxis();
23976
23893
  {
23894
+ let responsiveLablesObj = responsiveYaxisLabel$1(
23895
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
23896
+ chartJSON.yMinLeft,
23897
+ innerHeight2,
23898
+ formatOptions,
23899
+ chartJSON,
23900
+ customYaxisMinValue,
23901
+ customYaxisMaxValue,
23902
+ barChart,
23903
+ innerWidth2
23904
+ );
23977
23905
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
23978
23906
  (d) => getNumberWithFormat(
23979
23907
  d,
@@ -23983,31 +23911,7 @@ const LayeredHorizontalBarChart = ({
23983
23911
  )
23984
23912
  ).tickSize(
23985
23913
  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);
23914
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
24011
23915
  }
24012
23916
  };
24013
23917
  const getYAxis = () => {
@@ -24741,6 +24645,15 @@ const HorizontalHistogramChart = ({
24741
24645
  const initAxis = () => {
24742
24646
  getYAxis();
24743
24647
  {
24648
+ let responsiveLablesObj = responsiveYaxisLabel$1(
24649
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
24650
+ chartJSON.yMinLeft,
24651
+ innerHeight2,
24652
+ formatOptions,
24653
+ chartJSON,
24654
+ customYaxisMinValue,
24655
+ customYaxisMaxValue
24656
+ );
24744
24657
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
24745
24658
  (d) => getNumberWithFormat(
24746
24659
  d,
@@ -24750,27 +24663,7 @@ const HorizontalHistogramChart = ({
24750
24663
  )
24751
24664
  ).tickSize(
24752
24665
  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);
24666
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
24774
24667
  }
24775
24668
  if (isSecondaryAxisDrawn) {
24776
24669
  xAxisTop = axisTop(xScaleTop).tickFormat(
@@ -25306,6 +25199,15 @@ const AreaChart = ({
25306
25199
  const initAxis = () => {
25307
25200
  getXAxis();
25308
25201
  {
25202
+ let responsiveLablesObj = responsiveYaxisLabel$1(
25203
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25204
+ chartJSON.yMinLeft,
25205
+ innerHeight2,
25206
+ formatOptions,
25207
+ chartJSON,
25208
+ customYaxisMinValue,
25209
+ customYaxisMaxValue
25210
+ );
25309
25211
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
25310
25212
  (d) => getNumberWithFormat(
25311
25213
  d,
@@ -25315,27 +25217,7 @@ const AreaChart = ({
25315
25217
  )
25316
25218
  ).tickSize(
25317
25219
  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);
25220
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
25339
25221
  }
25340
25222
  };
25341
25223
  const getXAxis = () => {
@@ -25852,6 +25734,15 @@ const StackAreaChart = ({
25852
25734
  };
25853
25735
  const initAxis = () => {
25854
25736
  {
25737
+ let responsiveLablesObj = responsiveYaxisLabel$1(
25738
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
25739
+ chartJSON.yMinLeft,
25740
+ innerHeight2,
25741
+ formatOptions,
25742
+ chartJSON,
25743
+ customYaxisMinValue,
25744
+ customYaxisMaxValue
25745
+ );
25855
25746
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
25856
25747
  (d) => getNumberWithFormat(
25857
25748
  d,
@@ -25861,27 +25752,7 @@ const StackAreaChart = ({
25861
25752
  )
25862
25753
  ).tickSize(
25863
25754
  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);
25755
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
25885
25756
  }
25886
25757
  };
25887
25758
  const getXAxis = () => {
@@ -26409,7 +26280,7 @@ const NormalizedStackAreaChart = ({
26409
26280
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
26410
26281
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
26411
26282
  ).ticks(
26412
- dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 30 : innerHeight2 / 30,
26283
+ dataTableHeight > 0 ? (innerHeight2 - dataTableHeight) / 80 : innerHeight2 / 80,
26413
26284
  "%"
26414
26285
  ).tickPadding(8).tickSizeOuter(0);
26415
26286
  }
@@ -53746,6 +53617,15 @@ const WaterfallChart = ({
53746
53617
  const initAxis = () => {
53747
53618
  getXAxis();
53748
53619
  {
53620
+ let responsiveLablesObj = responsiveYaxisLabel$1(
53621
+ customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
53622
+ chartJSON.yMinLeft,
53623
+ innerHeight2,
53624
+ formatOptions,
53625
+ chartJSON,
53626
+ customYaxisMinValue,
53627
+ customYaxisMaxValue
53628
+ );
53749
53629
  yAxisLeft = axisLeft(yScaleLeft).tickFormat(
53750
53630
  (d) => getNumberWithFormat(
53751
53631
  d,
@@ -53755,27 +53635,7 @@ const WaterfallChart = ({
53755
53635
  )
53756
53636
  ).tickSize(
53757
53637
  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);
53638
+ ).tickValues(responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
53779
53639
  }
53780
53640
  colorScale = ordinal().range([
53781
53641
  "#E25A42",