pace-chart-lib 1.0.25 → 1.0.26

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.
@@ -10851,7 +10851,7 @@ const referenceLineTypes = {
10851
10851
  Custom: "Custom"
10852
10852
  };
10853
10853
  var commonColors = /* @__PURE__ */ ((commonColors2) => {
10854
- commonColors2["white"] = "#FFFFFF";
10854
+ commonColors2["white"] = "#ffffff";
10855
10855
  commonColors2["black"] = "#000000";
10856
10856
  commonColors2["transparent"] = "#FFFFFF00";
10857
10857
  return commonColors2;
@@ -13206,7 +13206,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
13206
13206
  }
13207
13207
  for (let i = 0; i < chartData.length; i++) {
13208
13208
  chartData.forEach((d) => {
13209
- if (d.properties.type && d.properties.type != "Column" && !getChartType.includes(d.properties.type))
13209
+ if (d.properties.type && d.properties.type != chartTypes.ColumnChart && !getChartType.includes(d.properties.type))
13210
13210
  getChartType.push(d.properties.type);
13211
13211
  });
13212
13212
  }
@@ -13314,6 +13314,168 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
13314
13314
  labelData;
13315
13315
  break;
13316
13316
  case "6":
13317
+ chartData.forEach((d, k2) => {
13318
+ let annotationVisibility = d.properties.annotation.toString();
13319
+ switch (d.properties.type) {
13320
+ case chartTypes.ColumnChart:
13321
+ switch (annotationVisibility) {
13322
+ case "1":
13323
+ for (let i = 0; i < chartData[k2].data.length; i++) {
13324
+ labelData.push(d.data[i]);
13325
+ }
13326
+ break;
13327
+ case "2":
13328
+ labelData;
13329
+ break;
13330
+ case "3":
13331
+ labelData.push(d.data[0]);
13332
+ break;
13333
+ case "4":
13334
+ labelData.push(d.data[d.data.length - 1]);
13335
+ break;
13336
+ case "5":
13337
+ labelData.push(d.data[0]);
13338
+ labelData.push(d.data[d.data.length - 1]);
13339
+ break;
13340
+ }
13341
+ break;
13342
+ case chartTypes.AreaChart:
13343
+ case chartTypes.LineChart:
13344
+ switch (annotationVisibility) {
13345
+ case "1":
13346
+ for (let i = 0; i < chartData[k2].data.length; i++) {
13347
+ labelData.push(
13348
+ {
13349
+ dimension: d.data[i].dimension,
13350
+ value: d.data[i].value,
13351
+ legend: d.data[i].legend,
13352
+ labelPosition: d.data[i].labelPosition,
13353
+ labelColor: d.data[i].labelColor,
13354
+ axis: d.data[i].axis,
13355
+ type: chartTypes.LineChart
13356
+ }
13357
+ );
13358
+ }
13359
+ break;
13360
+ case "2":
13361
+ labelData;
13362
+ break;
13363
+ case "3":
13364
+ labelData.push(
13365
+ {
13366
+ dimension: d.data[0].dimension,
13367
+ value: d.data[0].value,
13368
+ legend: d.data[0].legend,
13369
+ labelPosition: d.data[0].labelPosition,
13370
+ labelcolor: d.data[0].labelColor,
13371
+ axis: d.data[0].axis,
13372
+ type: chartTypes.LineChart
13373
+ }
13374
+ );
13375
+ break;
13376
+ case "4":
13377
+ labelData.push(
13378
+ {
13379
+ dimension: d.data[d.data.length - 1].dimension,
13380
+ value: d.data[d.data.length - 1].value,
13381
+ legend: d.data[d.data.length - 1].legend,
13382
+ labelPosition: d.data[d.data.length - 1].labelPosition,
13383
+ labelcolor: d.data[d.data.length - 1].labelColor,
13384
+ axis: d.data[d.data.length - 1].axis,
13385
+ type: chartTypes.LineChart
13386
+ }
13387
+ );
13388
+ break;
13389
+ case "5":
13390
+ labelData.push(
13391
+ {
13392
+ dimension: d.data[0].dimension,
13393
+ value: d.data[0].value,
13394
+ legend: d.data[0].legend,
13395
+ labelPosition: d.data[0].labelPosition,
13396
+ labelcolor: d.data[0].labelColor,
13397
+ axis: d.data[0].axis,
13398
+ type: chartTypes.LineChart
13399
+ }
13400
+ );
13401
+ labelData.push(
13402
+ {
13403
+ dimension: d.data[d.data.length - 1].dimension,
13404
+ value: d.data[d.data.length - 1].value,
13405
+ legend: d.data[d.data.length - 1].legend,
13406
+ labelPosition: d.data[d.data.length - 1].labelPosition,
13407
+ labelcolor: d.data[d.data.length - 1].labelColor,
13408
+ axis: d.data[d.data.length - 1].axis,
13409
+ type: chartTypes.LineChart
13410
+ }
13411
+ );
13412
+ break;
13413
+ }
13414
+ break;
13415
+ case chartTypes.StackColumnChart:
13416
+ const stackColumnIndex = stackColumnData.findIndex((id2) => id2.key === d.properties.legend);
13417
+ stackColumnIndex !== -1 && stackColumnData[stackColumnIndex].forEach((dta, j) => {
13418
+ switch (String(stackColumnData[stackColumnIndex].individualAnnotationVisibility)) {
13419
+ case "1":
13420
+ labelData.push(stackColumnData[stackColumnIndex][j]);
13421
+ break;
13422
+ case "2":
13423
+ labelData;
13424
+ break;
13425
+ case "3":
13426
+ let label3 = stackColumnData[stackColumnIndex][0];
13427
+ if (!labelData.find((data) => data.key == label3.key))
13428
+ labelData.push(label3);
13429
+ break;
13430
+ case "4":
13431
+ let label4 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
13432
+ if (!labelData.find((data) => data.key == label4.key))
13433
+ labelData.push(label4);
13434
+ break;
13435
+ case "5":
13436
+ let label5 = stackColumnData[stackColumnIndex][0];
13437
+ let label6 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
13438
+ if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
13439
+ labelData.push(stackColumnData[stackColumnIndex][0]);
13440
+ labelData.push(stackColumnData[stackColumnIndex][stackColumnData[0].length - 1]);
13441
+ break;
13442
+ }
13443
+ }
13444
+ });
13445
+ break;
13446
+ case chartTypes.StackAreaChart:
13447
+ const stackIndex = stackAreaData.findIndex((id2) => id2.key === d.properties.legend);
13448
+ stackIndex != -1 && stackAreaData[stackIndex].forEach((dta, j) => {
13449
+ switch (String(stackAreaData[stackIndex].individualAnnotationVisibility)) {
13450
+ case "1":
13451
+ labelData.push(stackAreaData[stackIndex][j]);
13452
+ break;
13453
+ case "2":
13454
+ labelData;
13455
+ break;
13456
+ case "3":
13457
+ let label3 = stackAreaData[stackIndex][0];
13458
+ if (!labelData.find((data) => data.key == label3.key))
13459
+ labelData.push(label3);
13460
+ break;
13461
+ case "4":
13462
+ let label4 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
13463
+ if (!labelData.find((data) => data.key == label4.key))
13464
+ labelData.push(label4);
13465
+ break;
13466
+ case "5":
13467
+ let label5 = stackAreaData[stackIndex][0];
13468
+ let label6 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
13469
+ if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
13470
+ labelData.push(label5);
13471
+ labelData.push(label6);
13472
+ break;
13473
+ }
13474
+ }
13475
+ });
13476
+ break;
13477
+ }
13478
+ });
13317
13479
  break;
13318
13480
  }
13319
13481
  let maxValue = 0;
@@ -13346,7 +13508,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
13346
13508
  y: d.value || d.value == 0 ? d.value : d.data.type != chartTypes.StackColumnChart ? d[1] ? d[1] : 0 : d[1] > 0 ? d[1] : d[0],
13347
13509
  prevValue: d[0] >= 0 ? d[0] : d[1],
13348
13510
  position: parseInt(d.labelPosition) ? parseInt(d.labelPosition) : parseInt(d.data.labelPosition),
13349
- type: d.dimension && d.legend ? d.type : d.data.type,
13511
+ type: d.type,
13350
13512
  currentLegend: d.legend?.includes("~$~") ? d.legend.split("~$~")[1] : d.key?.includes("~$~") ? d.key.split("~$~")[1] : d.legend ?? d.key,
13351
13513
  isVisible: true
13352
13514
  },
@@ -13369,7 +13531,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
13369
13531
  d["legend"] && d.dimension ? (
13370
13532
  // ? finalLegendseries.includes(d.Legend.includes("~$~") ? d.Legend.split("~$~")[1] : d.Legend) &&
13371
13533
  // filteredDimensionList.includes(d.Dimension) &&
13372
- !labelExcludeList.includes(d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend) && (d.Axis == axisTypes.primary ? yScaleLeft(d.value) <= innerHeight2 && yScaleLeft(d.value) >= 0 : yScaleRight(d.value) <= innerHeight2 && yScaleRight(d.value) >= 0) ? annotationsList.push(singleAnnotation) : null
13534
+ !labelExcludeList.includes(d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend) && (d.axis == axisTypes.primary ? yScaleLeft(d.value) <= innerHeight2 && yScaleLeft(d.value) >= 0 : yScaleRight(d.value) <= innerHeight2 && yScaleRight(d.value) >= 0) ? annotationsList.push(singleAnnotation) : null
13373
13535
  ) : (
13374
13536
  // finalLegendseries.includes(d["key"].includes("~$~") ? d["key"].split("~$~")[1] : d["key"]) &&
13375
13537
  // this.filteredDimensionList.includes(d.data["Dimension"]) &&
@@ -13397,17 +13559,15 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
13397
13559
  });
13398
13560
  makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
13399
13561
  x: function(d) {
13400
- if (getChartType.includes(d.x.type) || getChartType.includes(d.type)) {
13401
- let chartType = d.x.type || d.type;
13562
+ const chartType = d.x.type || d.type;
13563
+ if (getChartType.includes(chartType)) {
13402
13564
  switch (chartType) {
13403
- case "StackColumn":
13565
+ case chartTypes.StackColumnChart:
13404
13566
  return xScale(d.x.dimension) + xScaleForLegends(d.x.stacklegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2;
13405
- break;
13406
- case "StackArea":
13407
- case "Line":
13408
- case "Area":
13567
+ case chartTypes.StackAreaChart:
13568
+ case chartTypes.LineChart:
13569
+ case chartTypes.AreaChart:
13409
13570
  return xScale(d.x.dimension);
13410
- break;
13411
13571
  }
13412
13572
  } else {
13413
13573
  if (d.x.legend) {
@@ -13417,10 +13577,11 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
13417
13577
  }
13418
13578
  },
13419
13579
  y: function(d) {
13580
+ const chartType = d.type ?? d.x.type;
13420
13581
  if (d.x.axis == axisTypes.primary) {
13421
- return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue, d.type);
13582
+ return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue, chartType);
13422
13583
  } else {
13423
- return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue, d.type);
13584
+ return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue, chartType);
13424
13585
  }
13425
13586
  }
13426
13587
  }).on("dragend", function(annotation2) {
@@ -15382,7 +15543,7 @@ const checkVisibleConditions = (chartData, d, type, hideZeroValues, secondaryCus
15382
15543
  logError$2(fileName$b, "checkVisibleConditions", error);
15383
15544
  }
15384
15545
  };
15385
- function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType) {
15546
+ function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType, isStackChart) {
15386
15547
  try {
15387
15548
  let mousemove = function(event2) {
15388
15549
  try {
@@ -15396,13 +15557,14 @@ function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDi
15396
15557
  }
15397
15558
  let mindiff = 1e99;
15398
15559
  for (let k2 = 0; k2 < lineData.length; k2++) {
15399
- let diff1 = Math.abs(m[1] - yScaleLeft(lineData[k2].data[dimensionIndex].value));
15560
+ const requiredValue = isStackChart ? lineData[k2].data[dimensionIndex].value > 0 ? lineData[k2].data[dimensionIndex][1] : lineData[k2].data[dimensionIndex][0] : lineData[k2].data[dimensionIndex].value;
15561
+ let diff1 = Math.abs(m[1] - yScaleLeft(requiredValue));
15400
15562
  if (diff1 < mindiff) {
15401
15563
  mindiff = diff1;
15402
15564
  legendIndex = k2;
15403
15565
  }
15404
15566
  }
15405
- focus.attr("transform", getCoordinates(lineData[legendIndex], dimensionIndex, xScale, yScaleLeft)).append("circle").attr("r", lineData[legendIndex].properties.markerSize * 2.5).attr("id", "tooltip").attr("fill", lineData[legendIndex].properties.markerColor).text(showTooltipOnMouseMove([
15567
+ focus.attr("transform", getCoordinates(lineData[legendIndex], dimensionIndex, xScale, yScaleLeft, isStackChart)).append("circle").attr("r", lineData[legendIndex].properties.markerSize * 2.5).attr("id", "tooltip").attr("fill", lineData[legendIndex].properties.markerColor).text(showTooltipOnMouseMove([
15406
15568
  { key: formatOptions.xAxisTitle.xAxisTitleText, value: lineData[legendIndex].data[dimensionIndex].dimension },
15407
15569
  {
15408
15570
  key: lineData[legendIndex].properties.currentMeasure ? lineData[legendIndex].properties.currentMeasure : this.basestyle.YAxisTitle.YAxisTitleText,
@@ -15410,7 +15572,7 @@ function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDi
15410
15572
  },
15411
15573
  { key: "Legend", value: lineData[legendIndex].data[dimensionIndex].legend.includes("~$~") ? lineData[legendIndex].data[dimensionIndex].legend.split("~$~")[1] : lineData[legendIndex].data[dimensionIndex].legend }
15412
15574
  // { key: "Calculated Tooltip", value: lineData[legendIndex].data[dimensionIndex]. },
15413
- ], formatOptions));
15575
+ ], formatOptions, void 0, lineData[legendIndex].properties));
15414
15576
  } catch (error) {
15415
15577
  logError$2(fileName$b, "onHoverMarkerForAreaChartFamily.mousemove", error);
15416
15578
  }
@@ -15428,9 +15590,10 @@ function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDi
15428
15590
  logError$2(fileName$b, "onHoverMarkerForAreaChartFamily", error);
15429
15591
  }
15430
15592
  }
15431
- const getCoordinates = (chartData, pos, xScale, yScaleLeft) => {
15593
+ const getCoordinates = (chartData, pos, xScale, yScaleLeft, isStackChart) => {
15432
15594
  try {
15433
- return `translate(${xScale(chartData.data[pos].dimension)},${yScaleLeft(chartData.data[pos].value)})`;
15595
+ const requiredValue = isStackChart ? chartData.data[pos].value > 0 ? chartData.data[pos][1] : chartData.data[pos][0] : chartData.data[pos].value;
15596
+ return `translate(${xScale(chartData.data[pos].dimension)},${yScaleLeft(requiredValue)})`;
15434
15597
  } catch (error) {
15435
15598
  logError$2(fileName$b, "getCoordinates", error);
15436
15599
  }
@@ -15795,7 +15958,10 @@ const legendsWithScroll = (svg, seriesData, x2, y2, width, height, legendPositio
15795
15958
  }
15796
15959
  let vennSaparator = isVennChart && (legendPosition == staticLegendPosition.bottom || legendPosition == staticLegendPosition.top) ? i != seriesData.length - 1 ? " |" : "" : "";
15797
15960
  let legendColor = isVennChart ? chartFormatOptions.legends.legendSelectedUnicolor : chartFormatOptions.legends.legendColorMode == legendColorMode.multiColor ? d.properties.color ? d.properties.color : commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
15798
- innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).style("font-size", (!isVennChart ? d.properties.fontSize : chartFormatOptions.legends.legendFontSize) + "px").style("font-family", !isVennChart ? d.properties.fontFamily : chartFormatOptions.legends.legendFontFamily).style(
15961
+ innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).style(
15962
+ "background",
15963
+ d.properties.axis == axisTypes.secondary && chartFormatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor
15964
+ ).style("font-size", (!isVennChart ? d.properties.fontSize : chartFormatOptions.legends.legendFontSize) + "px").style("font-family", !isVennChart ? d.properties.fontFamily : chartFormatOptions.legends.legendFontFamily).style(
15799
15965
  "font-style",
15800
15966
  () => {
15801
15967
  let style = !isVennChart ? d.properties.fontStyle : chartFormatOptions.legends.legendFontStyle;
@@ -17119,9 +17285,13 @@ const CustomColumnChart = ({
17119
17285
  seriesData.forEach((series, i) => {
17120
17286
  if (![chartTypes.StackColumnChart, chartTypes.StackAreaChart].includes(series.properties.type)) {
17121
17287
  tempChartData.push(series);
17122
- series.properties.type !== chartTypes.LineChart && legendList.push(series.legend);
17123
- } else if (!legendList.includes("stackLegend")) {
17124
- legendList.push(`stackLegend`);
17288
+ series.properties.type !== chartTypes.LineChart && series.properties.type !== chartTypes.AreaChart && legendList.push(series.legend);
17289
+ } else {
17290
+ if (chartTypes.StackColumnChart === series.properties.type) {
17291
+ if (!legendList.includes(chartTypes.StackColumnChart)) {
17292
+ legendList.push(chartTypes.StackColumnChart);
17293
+ }
17294
+ }
17125
17295
  }
17126
17296
  if (series.properties.axis === "Secondary") {
17127
17297
  secondaryStackAxisData.push(series);
@@ -17141,7 +17311,7 @@ const CustomColumnChart = ({
17141
17311
  primaryStackAreaAxisData.push(series);
17142
17312
  }
17143
17313
  }
17144
- series.data.forEach((point2) => {
17314
+ series.data = series.data.map((point2) => {
17145
17315
  const newPoint = {
17146
17316
  ...point2,
17147
17317
  type: series.properties.type,
@@ -17149,7 +17319,7 @@ const CustomColumnChart = ({
17149
17319
  labelPosition: series.properties.dataLabelPosition,
17150
17320
  labelColor: series.properties.labelColor
17151
17321
  };
17152
- if (series.properties.axis === "Secondary") {
17322
+ if (newPoint.axis === "Secondary") {
17153
17323
  isSecondaryAxisDrawn = true;
17154
17324
  yMaxRight = Math.max(yMaxRight, newPoint.value);
17155
17325
  yMinRight = Math.min(yMinRight, newPoint.value);
@@ -17157,6 +17327,7 @@ const CustomColumnChart = ({
17157
17327
  yMaxLeft = Math.max(yMaxLeft, newPoint.value);
17158
17328
  yMinLeft = Math.min(yMinLeft, newPoint.value);
17159
17329
  }
17330
+ return newPoint;
17160
17331
  });
17161
17332
  });
17162
17333
  filteredData = JSON.parse(JSON.stringify(seriesData));
@@ -17220,7 +17391,8 @@ const CustomColumnChart = ({
17220
17391
  properties: {
17221
17392
  axis: d.properties.axis,
17222
17393
  type: d.properties.type,
17223
- legend: d.properties.legend
17394
+ legend: d.properties.legend,
17395
+ annotation: d.properties.annotation
17224
17396
  },
17225
17397
  stackData: tempStackAreaChartDataForPrimaryAxis,
17226
17398
  data: primaryStackAreaAxisData2
@@ -17231,7 +17403,8 @@ const CustomColumnChart = ({
17231
17403
  properties: {
17232
17404
  axis: d.properties.axis,
17233
17405
  type: d.properties.type,
17234
- legend: d.properties.legend
17406
+ legend: d.properties.legend,
17407
+ annotation: d.properties.annotation
17235
17408
  },
17236
17409
  stackData: tempStackAreaChartDataForSecondaryAxis,
17237
17410
  data: secondaryStackAreaAxisData2
@@ -17242,7 +17415,8 @@ const CustomColumnChart = ({
17242
17415
  properties: {
17243
17416
  axis: d.properties.axis,
17244
17417
  type: d.properties.type,
17245
- legend: d.properties.legend
17418
+ legend: d.properties.legend,
17419
+ annotation: d.properties.annotation
17246
17420
  },
17247
17421
  stackData: tempStackColumnChartDataForPrimaryAxis,
17248
17422
  data: primaryStackColumnAxisData2
@@ -17253,7 +17427,8 @@ const CustomColumnChart = ({
17253
17427
  properties: {
17254
17428
  axis: d.properties.axis,
17255
17429
  type: d.properties.type,
17256
- legend: d.properties.legend
17430
+ legend: d.properties.legend,
17431
+ annotation: d.properties.annotation
17257
17432
  },
17258
17433
  stackData: tempStackColumnChartDataForSecondaryAxis,
17259
17434
  data: secondaryStackColumnAxisData2
@@ -17275,17 +17450,6 @@ const CustomColumnChart = ({
17275
17450
  }
17276
17451
  };
17277
17452
  const initScale = () => {
17278
- let yAxisLabelArray = responsiveYaxisLabel$1(
17279
- customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
17280
- chartJSON.yMinLeft,
17281
- innerHeight2,
17282
- formatOptions,
17283
- chartJSON,
17284
- customYaxisMinValue,
17285
- customYaxisMaxValue
17286
- ).yAxisLabelArray;
17287
- chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
17288
- chartJSON.yMinLeft = yAxisLabelArray[0];
17289
17453
  {
17290
17454
  yScaleLeft = linear$1().domain([
17291
17455
  chartJSON.yMinLeft >= 0 ? customYaxisMinValue !== void 0 && !Number.isNaN(customYaxisMinValue) ? customYaxisMinValue : 0 : chartJSON.yMinLeft < 0 ? chartJSON.yMinLeft * 1.1 : chartJSON.yMinLeft * 0.9,
@@ -17296,14 +17460,6 @@ const CustomColumnChart = ({
17296
17460
  ]);
17297
17461
  }
17298
17462
  if (isSecondaryAxisDrawn) {
17299
- let secondaryYAxisLabelArray = responsiveSecondaryYaxisLabel(
17300
- secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
17301
- secondaryCustomYaxisMinValue ? secondaryCustomYaxisMinValue : chartJSON.yMinRight,
17302
- formatOptions,
17303
- chartJSON
17304
- ).secondaryYAxisLabelArray;
17305
- chartJSON.yMaxRight = secondaryYAxisLabelArray[secondaryYAxisLabelArray.length - 1];
17306
- chartJSON.yMinRight = secondaryYAxisLabelArray[0];
17307
17463
  yScaleRight = linear$1().domain([
17308
17464
  chartJSON.yMinRight >= 0 ? (secondaryCustomYaxisMinValue || secondaryCustomYaxisMinValue == 0) && !Number.isNaN(secondaryCustomYaxisMinValue) ? secondaryCustomYaxisMinValue : 0 : (secondaryCustomYaxisMinValue || secondaryCustomYaxisMinValue == 0) && !Number.isNaN(secondaryCustomYaxisMinValue) ? secondaryCustomYaxisMinValue : chartJSON.yMinRight * 1.1,
17309
17465
  chartJSON.yMaxRight <= 0 ? (secondaryCustomYaxisMaxValue || secondaryCustomYaxisMaxValue == 0) && !Number.isNaN(secondaryCustomYaxisMaxValue) ? secondaryCustomYaxisMaxValue : 0 : (secondaryCustomYaxisMaxValue || secondaryCustomYaxisMaxValue == 0) && !Number.isNaN(secondaryCustomYaxisMaxValue) ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight * 1.1
@@ -17315,7 +17471,7 @@ const CustomColumnChart = ({
17315
17471
  calculatedRange = [0, innerWidth2];
17316
17472
  };
17317
17473
  const getXScale = () => {
17318
- xScaleForLegends = band().domain(chartJSON.legendList.reverse()).range([0, columnWidth]).paddingInner(
17474
+ xScaleForLegends = band().domain(chartJSON.legendList).range([0, columnWidth]).paddingInner(
17319
17475
  chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
17320
17476
  );
17321
17477
  xScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
@@ -17490,7 +17646,7 @@ const CustomColumnChart = ({
17490
17646
  ).append("path").attr("class", "line").attr("fill", "none");
17491
17647
  lineGroupsEnter.merge(lineGroups).select("path").attr("d", (d) => lineGenerator(d.data)).attr(
17492
17648
  "stroke",
17493
- (d) => d.properties.color !== commonColors.white ? d.properties.color : "none"
17649
+ (d) => d.properties !== commonColors.white ? d.properties.color : "none"
17494
17650
  ).attr("stroke-dasharray", (d) => {
17495
17651
  switch (d.properties.lineStyle) {
17496
17652
  case staticLineStyle.dotted:
@@ -17673,7 +17829,7 @@ const CustomColumnChart = ({
17673
17829
  ).merge(rects).attr(
17674
17830
  "hoverId",
17675
17831
  (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
17676
- ).attr("x", (d) => xScaleForLegends("stackLegend")).attr(
17832
+ ).attr("x", (d) => xScaleForLegends(chartTypes.StackColumnChart)).attr(
17677
17833
  "y",
17678
17834
  (d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
17679
17835
  ).attr(
@@ -17810,7 +17966,7 @@ const CustomColumnChart = ({
17810
17966
  };
17811
17967
  const createStackData = (requiredStackChatData) => {
17812
17968
  let legendList = requiredStackChatData.data.map((d) => d.legend);
17813
- stackChartData = stack().keys(legendList).offset(diverging)(requiredStackChatData.stackData);
17969
+ stackChartData = stack().keys(legendList).offset(none$3)(requiredStackChatData.stackData);
17814
17970
  requiredStackChatData.data.forEach(
17815
17971
  (data2, index2) => data2.data.forEach((axisData, position) => {
17816
17972
  axisData["0"] = stackChartData[index2][position][0];
@@ -17824,6 +17980,9 @@ const CustomColumnChart = ({
17824
17980
  stackData["color"] = JSON.parse(
17825
17981
  JSON.stringify(requiredStackChatData.data[j].properties.color)
17826
17982
  );
17983
+ stackData["individualAnnotationVisibility"] = JSON.parse(
17984
+ JSON.stringify(requiredStackChatData.data[j].properties.annotation)
17985
+ );
17827
17986
  d.data.labelPosition = requiredStackChatData.data[j].properties.dataLabelPosition;
17828
17987
  d.data["labelColor"] = seriesColor == "2" ? JSON.parse(
17829
17988
  JSON.stringify(requiredStackChatData.data[j].properties.color)
@@ -17843,7 +18002,7 @@ const CustomColumnChart = ({
17843
18002
  d.data["color"] = JSON.parse(
17844
18003
  JSON.stringify(requiredStackChatData.data[j].properties.color)
17845
18004
  );
17846
- d.data["legend"] = `stackLegend`;
18005
+ d.data["legend"] = requiredStackChatData.properties.type;
17847
18006
  d.data["type"] = JSON.parse(
17848
18007
  JSON.stringify(requiredStackChatData.data[j].properties.type)
17849
18008
  );
@@ -17859,7 +18018,15 @@ const CustomColumnChart = ({
17859
18018
  chartJSON.yMinLeft = Math.min(chartJSON.yMinLeft, ...totals);
17860
18019
  }
17861
18020
  if (secondaryStackAxisData.length > 0) {
17862
- const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(filteredDimension, secondaryStackColumnAxisData, false) : getStackedData(filteredDimension, secondaryStackAreaAxisData, false);
18021
+ const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(
18022
+ filteredDimension,
18023
+ secondaryStackColumnAxisData,
18024
+ false
18025
+ ) : getStackedData(
18026
+ filteredDimension,
18027
+ secondaryStackAreaAxisData,
18028
+ false
18029
+ );
17863
18030
  const totals = stackData.map((d) => d.total);
17864
18031
  chartJSON.yMaxRight = Math.max(chartJSON.yMaxRight, ...totals);
17865
18032
  chartJSON.yMinRight = Math.min(chartJSON.yMinRight, ...totals);
@@ -22559,7 +22726,9 @@ const HorizontalBarChart = ({
22559
22726
  formatOptions,
22560
22727
  chartJSON,
22561
22728
  customYaxisMinValue,
22562
- customYaxisMaxValue
22729
+ customYaxisMaxValue,
22730
+ barChart,
22731
+ innerWidth2
22563
22732
  ).yAxisLabelArray;
22564
22733
  chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
22565
22734
  chartJSON.yMinLeft = yAxisLabelArray[0];
@@ -25534,6 +25703,7 @@ const AreaChart = ({
25534
25703
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
25535
25704
  };
25536
25705
  const getChartType = (lineData) => {
25706
+ const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
25537
25707
  lineData.forEach((lData) => {
25538
25708
  lData.data.forEach((cData) => {
25539
25709
  cData.hideZero = lData.properties.hideZeroValues;
@@ -25585,7 +25755,7 @@ const AreaChart = ({
25585
25755
  (d2) => d2.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : strokeLineCap.butt
25586
25756
  ).attr(
25587
25757
  "stroke-width",
25588
- (d2) => d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
25758
+ (d2) => !isLinesAndMarkersVisible ? 0 : d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
25589
25759
  ).attr("fill", "none");
25590
25760
  g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2.data)).attr("fill", commonColors.transparent).attr("stroke", "none").style("pointer-events", "all").raise();
25591
25761
  onHoverMarkerForAreaChartFamily(
@@ -26074,6 +26244,7 @@ const StackAreaChart = ({
26074
26244
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
26075
26245
  };
26076
26246
  const getChartType = (lineData) => {
26247
+ const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
26077
26248
  lineData.forEach((lData) => {
26078
26249
  lData.data.forEach((cData) => {
26079
26250
  cData.hideZero = lData.properties.hideZeroValues;
@@ -26107,7 +26278,7 @@ const StackAreaChart = ({
26107
26278
  const g = select$2(this);
26108
26279
  g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
26109
26280
  "stroke",
26110
- (d2) => d2.color !== commonColors.white ? d2.color : "none"
26281
+ (d2) => d2.color !== commonColors.white ? seriesData[i].properties.areaBorderColor : "none"
26111
26282
  ).attr("stroke-dasharray", (d2) => {
26112
26283
  const lineWidth = parseInt(
26113
26284
  seriesData[i].properties.lineWidth.toString()
@@ -26125,7 +26296,7 @@ const StackAreaChart = ({
26125
26296
  () => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
26126
26297
  ).attr(
26127
26298
  "stroke-width",
26128
- (d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
26299
+ () => !isLinesAndMarkersVisible ? 0 : seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : "0"
26129
26300
  ).attr("fill", "none").style("pointer-events", "none");
26130
26301
  g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2)).attr("fill", commonColors.transparent).attr("stroke", "none").style("pointer-events", "all").raise();
26131
26302
  svg.selectAll(
@@ -26141,7 +26312,8 @@ const StackAreaChart = ({
26141
26312
  lineData,
26142
26313
  xScale,
26143
26314
  yScaleLeft,
26144
- chartType
26315
+ chartType,
26316
+ true
26145
26317
  );
26146
26318
  lineMarkers(
26147
26319
  areas,
@@ -26621,6 +26793,7 @@ const NormalizedStackAreaChart = ({
26621
26793
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
26622
26794
  };
26623
26795
  const getChartType = (lineData) => {
26796
+ const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
26624
26797
  stackChartData.forEach(
26625
26798
  (data2, i) => data2.forEach((item, position) => {
26626
26799
  const total = item.data.total;
@@ -26662,7 +26835,7 @@ const NormalizedStackAreaChart = ({
26662
26835
  const g = select$2(this);
26663
26836
  g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
26664
26837
  "stroke",
26665
- (d2) => d2.color !== commonColors.white ? d2.color : "none"
26838
+ (d2) => d2.color !== commonColors.white ? seriesData[i].properties.areaBorderColor : "none"
26666
26839
  ).attr("stroke-dasharray", (d2) => {
26667
26840
  const lineWidth = parseInt(
26668
26841
  seriesData[i].properties.lineWidth.toString()
@@ -26680,7 +26853,7 @@ const NormalizedStackAreaChart = ({
26680
26853
  () => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
26681
26854
  ).attr(
26682
26855
  "stroke-width",
26683
- (d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
26856
+ () => !isLinesAndMarkersVisible ? 0 : seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : "0"
26684
26857
  ).attr("fill", "none").style("pointer-events", "none");
26685
26858
  g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => columnGenerator(d2)).attr("fill", commonColors.transparent).style("pointer-events", "all").raise();
26686
26859
  svg.selectAll(
@@ -26698,7 +26871,8 @@ const NormalizedStackAreaChart = ({
26698
26871
  lineData,
26699
26872
  xScale,
26700
26873
  yScaleLeft,
26701
- chartType
26874
+ chartType,
26875
+ true
26702
26876
  );
26703
26877
  gTag.selectAll(".parentGroup").raise();
26704
26878
  gTag.selectAll(".hoverLine").raise();
@@ -28817,6 +28991,8 @@ const ProgressChart = ({
28817
28991
  let legendListWidth;
28818
28992
  let radius;
28819
28993
  let innerRadius;
28994
+ const arcIndex = 1;
28995
+ const progressIndex = 0;
28820
28996
  useEffect(() => {
28821
28997
  drawChart();
28822
28998
  }, [formatOptions]);
@@ -28876,23 +29052,22 @@ const ProgressChart = ({
28876
29052
  };
28877
29053
  const initProgressChartData = () => {
28878
29054
  try {
28879
- seriesData = seriesData.sort((a2, b) => b.data[0].value - a2.data[0].value);
28880
- totalValue = ChartData[0].data[0].value + ChartData[1].data[0].value;
29055
+ totalValue = ChartData[arcIndex].data[0].value + ChartData[progressIndex].data[0].value;
28881
29056
  } catch (error) {
28882
29057
  logError$2(fileName$3, "initProgressChartData", error);
28883
29058
  }
28884
29059
  };
28885
29060
  const drawProgressChart = () => {
28886
29061
  try {
28887
- let maxValue = ChartData[0].data[0].value;
28888
- let progressValue = ChartData[1].data[0].value;
29062
+ let maxValue = ChartData[arcIndex].data[0].value;
29063
+ let progressValue = ChartData[progressIndex].data[0].value;
28889
29064
  let completeAngle = Math.PI * 2;
28890
29065
  let progressAngle = progressValue / maxValue * Math.PI * 2;
28891
29066
  let valuefontStyle = chartFormatOptions.plotArea.dataLabelValueFontStyle;
28892
29067
  const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius).startAngle(0).cornerRadius(
28893
29068
  convertStringToNumber(chartFormatOptions.plotArea.cornerRadius)
28894
29069
  );
28895
- chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill", ChartData[0].properties.color).attr(
29070
+ chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill", ChartData[arcIndex].properties.color).attr(
28896
29071
  "fill-opacity",
28897
29072
  chartFormatOptions.plotArea.opacityforProgressScale
28898
29073
  ).attr("d", arc2({ endAngle: completeAngle })).on("mousemove", (d) => {
@@ -28900,7 +29075,7 @@ const ProgressChart = ({
28900
29075
  showTooltipOnMouseMove(
28901
29076
  [
28902
29077
  {
28903
- key: ChartData[0].properties.alias,
29078
+ key: ChartData[arcIndex].properties.alias,
28904
29079
  value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
28905
29080
  chartFormatOptions.toolTip.toolTipDisplayUnits,
28906
29081
  chartFormatOptions.toolTip.toolTipNumberFormatProgress,
@@ -28910,7 +29085,7 @@ const ProgressChart = ({
28910
29085
  ],
28911
29086
  chartFormatOptions,
28912
29087
  void 0,
28913
- ChartData[0].properties
29088
+ ChartData[arcIndex].properties
28914
29089
  );
28915
29090
  } catch (error) {
28916
29091
  logError$2(
@@ -28930,7 +29105,7 @@ const ProgressChart = ({
28930
29105
  );
28931
29106
  }
28932
29107
  }).attr("transform", getTransformString());
28933
- chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill", ChartData[1].properties.color).attr(
29108
+ chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill", ChartData[progressIndex].properties.color).attr(
28934
29109
  "fill-opacity",
28935
29110
  chartFormatOptions.plotArea.opacityforProgressGoal
28936
29111
  ).attr("d", arc2({ endAngle: progressAngle })).on("mousemove", (d) => {
@@ -28938,7 +29113,7 @@ const ProgressChart = ({
28938
29113
  showTooltipOnMouseMove(
28939
29114
  [
28940
29115
  {
28941
- key: ChartData[1].properties.alias,
29116
+ key: ChartData[progressIndex].properties.alias,
28942
29117
  value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? Math.round(progressValue / maxValue * 100) + "%" : getNumberWithFormatFunction(
28943
29118
  chartFormatOptions.toolTip.toolTipDisplayUnits,
28944
29119
  chartFormatOptions.toolTip.toolTipDecimalPrecision,
@@ -28946,7 +29121,7 @@ const ProgressChart = ({
28946
29121
  )(maxValue)
28947
29122
  },
28948
29123
  {
28949
- key: ChartData[0].properties.alias,
29124
+ key: ChartData[arcIndex].properties.alias,
28950
29125
  value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
28951
29126
  chartFormatOptions.toolTip.toolTipDisplayUnits,
28952
29127
  chartFormatOptions.toolTip.toolTipDecimalPrecision,
@@ -28956,7 +29131,7 @@ const ProgressChart = ({
28956
29131
  ],
28957
29132
  chartFormatOptions,
28958
29133
  void 0,
28959
- ChartData[1].properties
29134
+ ChartData[progressIndex].properties
28960
29135
  );
28961
29136
  } catch (error) {
28962
29137
  logError$2(
@@ -54988,8 +55163,8 @@ const TornadoChart = ({
54988
55163
  svg,
54989
55164
  yScaleLeft,
54990
55165
  columnWidth,
54991
- isAdvanceAnalyticsChart,
54992
55166
  isReportEditable,
55167
+ isAdvanceAnalyticsChart,
54993
55168
  barChart
54994
55169
  );
54995
55170
  };