pace-chart-lib 1.0.24 → 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.
@@ -10854,7 +10854,7 @@
10854
10854
  Custom: "Custom"
10855
10855
  };
10856
10856
  var commonColors = /* @__PURE__ */ ((commonColors2) => {
10857
- commonColors2["white"] = "#FFFFFF";
10857
+ commonColors2["white"] = "#ffffff";
10858
10858
  commonColors2["black"] = "#000000";
10859
10859
  commonColors2["transparent"] = "#FFFFFF00";
10860
10860
  return commonColors2;
@@ -12832,8 +12832,14 @@
12832
12832
  return stepAfter;
12833
12833
  }
12834
12834
  }
12835
+ function getSlicedLegendForTornado(legend) {
12836
+ const index2 = legend.indexOf(" - ");
12837
+ if (index2 == -1) return legend;
12838
+ return legend.slice(index2 + 3);
12839
+ }
12835
12840
  function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d3Annotation2, labelExcludeList, individualLabelColor, oldAnnotationList, formatOptions, chartType, height, width, innerWidth2, dimensionList, innerHeight2, widgetId, svg, xScaleForLegends, columnWidth, isReportEditable, isSensitivityChart, barChart) {
12836
12841
  try {
12842
+ const isTornadoChart = chartType === chartTypes.TornadoChart;
12837
12843
  let annotationType = formatOptions.annotation.annotationType ?? "1";
12838
12844
  let annotationPosition = formatOptions.annotation.annotationPosition.toString() != "4" ? formatOptions.annotation.annotationPosition : null;
12839
12845
  if (formatOptions.annotation.annotationVisibility) {
@@ -13024,7 +13030,7 @@
13024
13030
  align: barChart && chartType !== chartTypes.TornadoChart ? parseInt(d.LabelPosition) === 2 ? "middle" : "start" : chartType === chartTypes.TornadoChart ? "end" : "middle"
13025
13031
  },
13026
13032
  data: barChart ? {
13027
- y: d.Dimension,
13033
+ y: isTornadoChart ? getSlicedLegendForTornado(d.Legend) : d.Dimension,
13028
13034
  x: { measure: d.Measure, axis: d.Axis },
13029
13035
  position: parseInt(d.LabelPosition),
13030
13036
  currentLegend: d.Legend,
@@ -13055,7 +13061,7 @@
13055
13061
  };
13056
13062
  if (barChart) {
13057
13063
  let requiredXScale = d.Axis === axisTypes.primary ? yScaleLeft : yScaleRight;
13058
- responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) && !labelExcludeList.includes(d.Legend) && requiredXScale(d.Measure) <= innerWidth2 && requiredXScale(d.Measure) >= 0 ? annotationsList.push(singleAnnotation) : null;
13064
+ (responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) || chartType === chartTypes.TornadoChart) && !labelExcludeList.includes(d.Legend) && requiredXScale(d.Measure) <= innerWidth2 && requiredXScale(d.Measure) >= 0 ? annotationsList.push(singleAnnotation) : null;
13059
13065
  } else {
13060
13066
  responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) && !labelExcludeList.includes(d.Legend) && (d.Axis == axisTypes.primary ? yScaleLeft(d.Measure) <= innerHeight2 && yScaleLeft(d.Measure) >= 0 : yScaleRight(d.Measure) <= innerHeight2 && yScaleRight(d.Measure) >= 0) ? annotationsList.push(singleAnnotation) : null;
13061
13067
  }
@@ -13109,7 +13115,7 @@
13109
13115
  );
13110
13116
  } else {
13111
13117
  if (barChart) {
13112
- return xScaleForLegends ? xScale(d.y) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
13118
+ return isTornadoChart ? xScaleForLegends(d.y) + xScaleForLegends.bandwidth() / 2 : xScaleForLegends ? xScale(d.y) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
13113
13119
  } else
13114
13120
  return dataLabelsPosition(
13115
13121
  d.y.measure,
@@ -13171,7 +13177,7 @@
13171
13177
  y: (d) => yScaleLeft.invert(d.y)
13172
13178
  }).notePadding(0).annotations(finalAnnotationList);
13173
13179
  if (formatOptions.plotArea.fitChart) svg.selectAll(".annotation-group").remove();
13174
- let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
13180
+ let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType, barChart);
13175
13181
  }
13176
13182
  } catch (error) {
13177
13183
  throw error;
@@ -13203,7 +13209,7 @@
13203
13209
  }
13204
13210
  for (let i = 0; i < chartData.length; i++) {
13205
13211
  chartData.forEach((d) => {
13206
- if (d.properties.type && d.properties.type != "Column" && !getChartType.includes(d.properties.type))
13212
+ if (d.properties.type && d.properties.type != chartTypes.ColumnChart && !getChartType.includes(d.properties.type))
13207
13213
  getChartType.push(d.properties.type);
13208
13214
  });
13209
13215
  }
@@ -13311,6 +13317,168 @@
13311
13317
  labelData;
13312
13318
  break;
13313
13319
  case "6":
13320
+ chartData.forEach((d, k2) => {
13321
+ let annotationVisibility = d.properties.annotation.toString();
13322
+ switch (d.properties.type) {
13323
+ case chartTypes.ColumnChart:
13324
+ switch (annotationVisibility) {
13325
+ case "1":
13326
+ for (let i = 0; i < chartData[k2].data.length; i++) {
13327
+ labelData.push(d.data[i]);
13328
+ }
13329
+ break;
13330
+ case "2":
13331
+ labelData;
13332
+ break;
13333
+ case "3":
13334
+ labelData.push(d.data[0]);
13335
+ break;
13336
+ case "4":
13337
+ labelData.push(d.data[d.data.length - 1]);
13338
+ break;
13339
+ case "5":
13340
+ labelData.push(d.data[0]);
13341
+ labelData.push(d.data[d.data.length - 1]);
13342
+ break;
13343
+ }
13344
+ break;
13345
+ case chartTypes.AreaChart:
13346
+ case chartTypes.LineChart:
13347
+ switch (annotationVisibility) {
13348
+ case "1":
13349
+ for (let i = 0; i < chartData[k2].data.length; i++) {
13350
+ labelData.push(
13351
+ {
13352
+ dimension: d.data[i].dimension,
13353
+ value: d.data[i].value,
13354
+ legend: d.data[i].legend,
13355
+ labelPosition: d.data[i].labelPosition,
13356
+ labelColor: d.data[i].labelColor,
13357
+ axis: d.data[i].axis,
13358
+ type: chartTypes.LineChart
13359
+ }
13360
+ );
13361
+ }
13362
+ break;
13363
+ case "2":
13364
+ labelData;
13365
+ break;
13366
+ case "3":
13367
+ labelData.push(
13368
+ {
13369
+ dimension: d.data[0].dimension,
13370
+ value: d.data[0].value,
13371
+ legend: d.data[0].legend,
13372
+ labelPosition: d.data[0].labelPosition,
13373
+ labelcolor: d.data[0].labelColor,
13374
+ axis: d.data[0].axis,
13375
+ type: chartTypes.LineChart
13376
+ }
13377
+ );
13378
+ break;
13379
+ case "4":
13380
+ labelData.push(
13381
+ {
13382
+ dimension: d.data[d.data.length - 1].dimension,
13383
+ value: d.data[d.data.length - 1].value,
13384
+ legend: d.data[d.data.length - 1].legend,
13385
+ labelPosition: d.data[d.data.length - 1].labelPosition,
13386
+ labelcolor: d.data[d.data.length - 1].labelColor,
13387
+ axis: d.data[d.data.length - 1].axis,
13388
+ type: chartTypes.LineChart
13389
+ }
13390
+ );
13391
+ break;
13392
+ case "5":
13393
+ labelData.push(
13394
+ {
13395
+ dimension: d.data[0].dimension,
13396
+ value: d.data[0].value,
13397
+ legend: d.data[0].legend,
13398
+ labelPosition: d.data[0].labelPosition,
13399
+ labelcolor: d.data[0].labelColor,
13400
+ axis: d.data[0].axis,
13401
+ type: chartTypes.LineChart
13402
+ }
13403
+ );
13404
+ labelData.push(
13405
+ {
13406
+ dimension: d.data[d.data.length - 1].dimension,
13407
+ value: d.data[d.data.length - 1].value,
13408
+ legend: d.data[d.data.length - 1].legend,
13409
+ labelPosition: d.data[d.data.length - 1].labelPosition,
13410
+ labelcolor: d.data[d.data.length - 1].labelColor,
13411
+ axis: d.data[d.data.length - 1].axis,
13412
+ type: chartTypes.LineChart
13413
+ }
13414
+ );
13415
+ break;
13416
+ }
13417
+ break;
13418
+ case chartTypes.StackColumnChart:
13419
+ const stackColumnIndex = stackColumnData.findIndex((id2) => id2.key === d.properties.legend);
13420
+ stackColumnIndex !== -1 && stackColumnData[stackColumnIndex].forEach((dta, j) => {
13421
+ switch (String(stackColumnData[stackColumnIndex].individualAnnotationVisibility)) {
13422
+ case "1":
13423
+ labelData.push(stackColumnData[stackColumnIndex][j]);
13424
+ break;
13425
+ case "2":
13426
+ labelData;
13427
+ break;
13428
+ case "3":
13429
+ let label3 = stackColumnData[stackColumnIndex][0];
13430
+ if (!labelData.find((data) => data.key == label3.key))
13431
+ labelData.push(label3);
13432
+ break;
13433
+ case "4":
13434
+ let label4 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
13435
+ if (!labelData.find((data) => data.key == label4.key))
13436
+ labelData.push(label4);
13437
+ break;
13438
+ case "5":
13439
+ let label5 = stackColumnData[stackColumnIndex][0];
13440
+ let label6 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
13441
+ if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
13442
+ labelData.push(stackColumnData[stackColumnIndex][0]);
13443
+ labelData.push(stackColumnData[stackColumnIndex][stackColumnData[0].length - 1]);
13444
+ break;
13445
+ }
13446
+ }
13447
+ });
13448
+ break;
13449
+ case chartTypes.StackAreaChart:
13450
+ const stackIndex = stackAreaData.findIndex((id2) => id2.key === d.properties.legend);
13451
+ stackIndex != -1 && stackAreaData[stackIndex].forEach((dta, j) => {
13452
+ switch (String(stackAreaData[stackIndex].individualAnnotationVisibility)) {
13453
+ case "1":
13454
+ labelData.push(stackAreaData[stackIndex][j]);
13455
+ break;
13456
+ case "2":
13457
+ labelData;
13458
+ break;
13459
+ case "3":
13460
+ let label3 = stackAreaData[stackIndex][0];
13461
+ if (!labelData.find((data) => data.key == label3.key))
13462
+ labelData.push(label3);
13463
+ break;
13464
+ case "4":
13465
+ let label4 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
13466
+ if (!labelData.find((data) => data.key == label4.key))
13467
+ labelData.push(label4);
13468
+ break;
13469
+ case "5":
13470
+ let label5 = stackAreaData[stackIndex][0];
13471
+ let label6 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
13472
+ if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
13473
+ labelData.push(label5);
13474
+ labelData.push(label6);
13475
+ break;
13476
+ }
13477
+ }
13478
+ });
13479
+ break;
13480
+ }
13481
+ });
13314
13482
  break;
13315
13483
  }
13316
13484
  let maxValue = 0;
@@ -13343,7 +13511,7 @@
13343
13511
  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],
13344
13512
  prevValue: d[0] >= 0 ? d[0] : d[1],
13345
13513
  position: parseInt(d.labelPosition) ? parseInt(d.labelPosition) : parseInt(d.data.labelPosition),
13346
- type: d.dimension && d.legend ? d.type : d.data.type,
13514
+ type: d.type,
13347
13515
  currentLegend: d.legend?.includes("~$~") ? d.legend.split("~$~")[1] : d.key?.includes("~$~") ? d.key.split("~$~")[1] : d.legend ?? d.key,
13348
13516
  isVisible: true
13349
13517
  },
@@ -13366,7 +13534,7 @@
13366
13534
  d["legend"] && d.dimension ? (
13367
13535
  // ? finalLegendseries.includes(d.Legend.includes("~$~") ? d.Legend.split("~$~")[1] : d.Legend) &&
13368
13536
  // filteredDimensionList.includes(d.Dimension) &&
13369
- !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
13537
+ !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
13370
13538
  ) : (
13371
13539
  // finalLegendseries.includes(d["key"].includes("~$~") ? d["key"].split("~$~")[1] : d["key"]) &&
13372
13540
  // this.filteredDimensionList.includes(d.data["Dimension"]) &&
@@ -13394,17 +13562,15 @@
13394
13562
  });
13395
13563
  makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
13396
13564
  x: function(d) {
13397
- if (getChartType.includes(d.x.type) || getChartType.includes(d.type)) {
13398
- let chartType = d.x.type || d.type;
13565
+ const chartType = d.x.type || d.type;
13566
+ if (getChartType.includes(chartType)) {
13399
13567
  switch (chartType) {
13400
- case "StackColumn":
13568
+ case chartTypes.StackColumnChart:
13401
13569
  return xScale(d.x.dimension) + xScaleForLegends(d.x.stacklegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2;
13402
- break;
13403
- case "StackArea":
13404
- case "Line":
13405
- case "Area":
13570
+ case chartTypes.StackAreaChart:
13571
+ case chartTypes.LineChart:
13572
+ case chartTypes.AreaChart:
13406
13573
  return xScale(d.x.dimension);
13407
- break;
13408
13574
  }
13409
13575
  } else {
13410
13576
  if (d.x.legend) {
@@ -13414,10 +13580,11 @@
13414
13580
  }
13415
13581
  },
13416
13582
  y: function(d) {
13583
+ const chartType = d.type ?? d.x.type;
13417
13584
  if (d.x.axis == axisTypes.primary) {
13418
- return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue, d.type);
13585
+ return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue, chartType);
13419
13586
  } else {
13420
- return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue, d.type);
13587
+ return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue, chartType);
13421
13588
  }
13422
13589
  }
13423
13590
  }).on("dragend", function(annotation2) {
@@ -13458,7 +13625,7 @@
13458
13625
  y: (d) => d.x.axis == axisTypes.primary ? yScaleLeft.invert(d.y) : yScaleRight.invert(d.y)
13459
13626
  }).notePadding(0).annotations(finalAnnotationList);
13460
13627
  if (!formatOptions.plotArea.fitChart) svg.selectAll(".annotation-group").remove();
13461
- let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
13628
+ let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType, false);
13462
13629
  }
13463
13630
  } catch (error) {
13464
13631
  throw error;
@@ -14610,13 +14777,13 @@
14610
14777
  y: (d) => yScaleLeft.invert(d.y)
14611
14778
  }).notePadding(0).annotations(finalAnnotationList);
14612
14779
  if (true) svg.selectAll(".annotation-group").remove();
14613
- let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
14780
+ let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType, false);
14614
14781
  }
14615
14782
  } catch (error) {
14616
14783
  throw error;
14617
14784
  }
14618
14785
  }
14619
- const appendAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotations, ConnectorType) => {
14786
+ const appendAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotations, ConnectorType, isBarChart) => {
14620
14787
  svg.selectAll(".annotation-group").remove();
14621
14788
  let annotations = svg.append("g").attr("id", "annotationGroup").attr("class", "annotation-group parentGroup").attr("transform", `translate(${margin.left},${margin.top})`).style("fill", formatOptions.annotation.annotationColor).style("font-family", formatOptions.annotation.annotationFontFamily).style("font-size", formatOptions.annotation.annotationFontSize).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
14622
14789
  "text-decoration",
@@ -14637,7 +14804,10 @@
14637
14804
  return `translate(${currentX}, 0)`;
14638
14805
  }
14639
14806
  });
14640
- annotations.selectAll("text").append("text").style("fill", formatOptions.annotation.annotationColor !== commonColors.white ? formatOptions.annotation.annotationColor : "none");
14807
+ annotations.selectAll("text").style(
14808
+ "text-anchor",
14809
+ (d) => isBarChart ? d.data.position == "2" ? "middle" : "start" : "start"
14810
+ ).append("text").style("fill", formatOptions.annotation.annotationColor !== commonColors.white ? formatOptions.annotation.annotationColor : "none");
14641
14811
  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");
14642
14812
  return annotations;
14643
14813
  };
@@ -15376,7 +15546,7 @@
15376
15546
  logError$2(fileName$b, "checkVisibleConditions", error);
15377
15547
  }
15378
15548
  };
15379
- function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType) {
15549
+ function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType, isStackChart) {
15380
15550
  try {
15381
15551
  let mousemove = function(event2) {
15382
15552
  try {
@@ -15390,13 +15560,14 @@
15390
15560
  }
15391
15561
  let mindiff = 1e99;
15392
15562
  for (let k2 = 0; k2 < lineData.length; k2++) {
15393
- let diff1 = Math.abs(m[1] - yScaleLeft(lineData[k2].data[dimensionIndex].value));
15563
+ const requiredValue = isStackChart ? lineData[k2].data[dimensionIndex].value > 0 ? lineData[k2].data[dimensionIndex][1] : lineData[k2].data[dimensionIndex][0] : lineData[k2].data[dimensionIndex].value;
15564
+ let diff1 = Math.abs(m[1] - yScaleLeft(requiredValue));
15394
15565
  if (diff1 < mindiff) {
15395
15566
  mindiff = diff1;
15396
15567
  legendIndex = k2;
15397
15568
  }
15398
15569
  }
15399
- 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([
15570
+ 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([
15400
15571
  { key: formatOptions.xAxisTitle.xAxisTitleText, value: lineData[legendIndex].data[dimensionIndex].dimension },
15401
15572
  {
15402
15573
  key: lineData[legendIndex].properties.currentMeasure ? lineData[legendIndex].properties.currentMeasure : this.basestyle.YAxisTitle.YAxisTitleText,
@@ -15404,7 +15575,7 @@
15404
15575
  },
15405
15576
  { key: "Legend", value: lineData[legendIndex].data[dimensionIndex].legend.includes("~$~") ? lineData[legendIndex].data[dimensionIndex].legend.split("~$~")[1] : lineData[legendIndex].data[dimensionIndex].legend }
15406
15577
  // { key: "Calculated Tooltip", value: lineData[legendIndex].data[dimensionIndex]. },
15407
- ], formatOptions));
15578
+ ], formatOptions, void 0, lineData[legendIndex].properties));
15408
15579
  } catch (error) {
15409
15580
  logError$2(fileName$b, "onHoverMarkerForAreaChartFamily.mousemove", error);
15410
15581
  }
@@ -15422,9 +15593,10 @@
15422
15593
  logError$2(fileName$b, "onHoverMarkerForAreaChartFamily", error);
15423
15594
  }
15424
15595
  }
15425
- const getCoordinates = (chartData, pos, xScale, yScaleLeft) => {
15596
+ const getCoordinates = (chartData, pos, xScale, yScaleLeft, isStackChart) => {
15426
15597
  try {
15427
- return `translate(${xScale(chartData.data[pos].dimension)},${yScaleLeft(chartData.data[pos].value)})`;
15598
+ const requiredValue = isStackChart ? chartData.data[pos].value > 0 ? chartData.data[pos][1] : chartData.data[pos][0] : chartData.data[pos].value;
15599
+ return `translate(${xScale(chartData.data[pos].dimension)},${yScaleLeft(requiredValue)})`;
15428
15600
  } catch (error) {
15429
15601
  logError$2(fileName$b, "getCoordinates", error);
15430
15602
  }
@@ -15737,13 +15909,13 @@
15737
15909
  justifyContent = alignment == horizontalLegendAllignment.start ? "start" : alignment == horizontalLegendAllignment.middle ? "center" : "end";
15738
15910
  }
15739
15911
  let object2 = svg.append("foreignObject").attr("x", x2).attr("y", y2).style("pointer-events", "auto").attr("width", width + "px").attr("height", height + "px").style("user-select", "none");
15740
- var div = object2.append("xhtml:div").attr("id", "legendObject" + chartId).attr("class", "legendsBoxWrapper").style("width", width + "px").style("display", "flex").style("height", height - 1 + "px").style("overflow", "auto").style("pointer-events", "auto").style("justify-content", justifyContent).style("flex-direction", flexDirection).style(
15912
+ var div = object2.append("xhtml:div").attr("id", "legendObject" + chartId).attr("class", "legendsBoxWrapper").style("width", width + "px").style("display", "flex").style("height", height - 1 + "px").style("overflow", "auto").style("pointer-events", "auto").style("justify-content", "safe " + justifyContent).style("flex-direction", flexDirection).style(
15741
15913
  "outline-offset",
15742
15914
  "-" + chartFormatOptions.legends.legendBorderThickness + "px"
15743
15915
  ).style(
15744
15916
  "outline",
15745
15917
  chartFormatOptions.legends.legendBorder ? `${chartFormatOptions.legends.legendBorderThickness + "px solid" + chartFormatOptions.legends.legendBorderColor}` : "none"
15746
- ).append("div").attr("class", "scrollbar").style("display", "flex").style("justify-content", justifyContent).style("flex-direction", flexDirection).style("flex-wrap", "nowrap").style("padding-left", "3px");
15918
+ ).append("div").attr("class", "scrollbar").style("display", "flex").style("flex-direction", flexDirection).style("flex-wrap", "nowrap").style("padding-left", "3px");
15747
15919
  if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom)
15748
15920
  div.style("flex-direction", "row");
15749
15921
  seriesData.forEach((d, i) => {
@@ -15789,7 +15961,10 @@
15789
15961
  }
15790
15962
  let vennSaparator = isVennChart && (legendPosition == staticLegendPosition.bottom || legendPosition == staticLegendPosition.top) ? i != seriesData.length - 1 ? " |" : "" : "";
15791
15963
  let legendColor = isVennChart ? chartFormatOptions.legends.legendSelectedUnicolor : chartFormatOptions.legends.legendColorMode == legendColorMode.multiColor ? d.properties.color ? d.properties.color : commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
15792
- 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(
15964
+ innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).style(
15965
+ "background",
15966
+ d.properties.axis == axisTypes.secondary && chartFormatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor
15967
+ ).style("font-size", (!isVennChart ? d.properties.fontSize : chartFormatOptions.legends.legendFontSize) + "px").style("font-family", !isVennChart ? d.properties.fontFamily : chartFormatOptions.legends.legendFontFamily).style(
15793
15968
  "font-style",
15794
15969
  () => {
15795
15970
  let style = !isVennChart ? d.properties.fontStyle : chartFormatOptions.legends.legendFontStyle;
@@ -15830,7 +16005,7 @@
15830
16005
  }
15831
16006
  function getLineShape(d, innerDiv, formatOptions) {
15832
16007
  try {
15833
- let shape = innerDiv.append("div").style("height", "2px").style("width", "20px").style("background", d.properties.lineStyle == "solid" ? d.properties.color : commonColors.transparent).style("position", "relative").style("border-top", d.properties.lineStyle == "None" ? "unset" : d.properties.lineStyle == "dotted" ? "2px dotted " + d.properties.color : "2px dashed " + d.properties.color);
16008
+ let shape = innerDiv.append("div").style("height", "2px").style("width", "20px").style("background", d.properties?.lineStyle?.toLowerCase() == "solid" ? d.properties.color : commonColors.transparent).style("position", "relative").style("border-top", d.properties.lineStyle == "None" ? "unset" : d.properties.lineStyle == "dotted" ? "2px dotted " + d.properties.color : "2px dashed " + d.properties.color);
15834
16009
  if (formatOptions.marker.markerVisibility) {
15835
16010
  switch (d.properties.markerShape.toLowerCase()) {
15836
16011
  case "circle":
@@ -16724,10 +16899,7 @@
16724
16899
  return Math.abs(yScale(d.value) - yScale(0));
16725
16900
  });
16726
16901
  columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
16727
- let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
16728
- gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "visible");
16729
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
16730
- selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
16902
+ (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
16731
16903
  showTooltipOnMouseMove(
16732
16904
  [
16733
16905
  {
@@ -16759,10 +16931,7 @@
16759
16931
  data2.properties
16760
16932
  );
16761
16933
  }).on("mouseout", (event2, d) => {
16762
- let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
16763
- gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "hidden");
16764
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
16765
- selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
16934
+ (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
16766
16935
  hideTooltipOnMouseOut();
16767
16936
  });
16768
16937
  columnGroups.exit().remove().each(function(d) {
@@ -17119,9 +17288,13 @@
17119
17288
  seriesData.forEach((series, i) => {
17120
17289
  if (![chartTypes.StackColumnChart, chartTypes.StackAreaChart].includes(series.properties.type)) {
17121
17290
  tempChartData.push(series);
17122
- series.properties.type !== chartTypes.LineChart && legendList.push(series.legend);
17123
- } else if (!legendList.includes("stackLegend")) {
17124
- legendList.push(`stackLegend`);
17291
+ series.properties.type !== chartTypes.LineChart && series.properties.type !== chartTypes.AreaChart && legendList.push(series.legend);
17292
+ } else {
17293
+ if (chartTypes.StackColumnChart === series.properties.type) {
17294
+ if (!legendList.includes(chartTypes.StackColumnChart)) {
17295
+ legendList.push(chartTypes.StackColumnChart);
17296
+ }
17297
+ }
17125
17298
  }
17126
17299
  if (series.properties.axis === "Secondary") {
17127
17300
  secondaryStackAxisData.push(series);
@@ -17141,7 +17314,7 @@
17141
17314
  primaryStackAreaAxisData.push(series);
17142
17315
  }
17143
17316
  }
17144
- series.data.forEach((point2) => {
17317
+ series.data = series.data.map((point2) => {
17145
17318
  const newPoint = {
17146
17319
  ...point2,
17147
17320
  type: series.properties.type,
@@ -17149,7 +17322,7 @@
17149
17322
  labelPosition: series.properties.dataLabelPosition,
17150
17323
  labelColor: series.properties.labelColor
17151
17324
  };
17152
- if (series.properties.axis === "Secondary") {
17325
+ if (newPoint.axis === "Secondary") {
17153
17326
  isSecondaryAxisDrawn = true;
17154
17327
  yMaxRight = Math.max(yMaxRight, newPoint.value);
17155
17328
  yMinRight = Math.min(yMinRight, newPoint.value);
@@ -17157,6 +17330,7 @@
17157
17330
  yMaxLeft = Math.max(yMaxLeft, newPoint.value);
17158
17331
  yMinLeft = Math.min(yMinLeft, newPoint.value);
17159
17332
  }
17333
+ return newPoint;
17160
17334
  });
17161
17335
  });
17162
17336
  filteredData = JSON.parse(JSON.stringify(seriesData));
@@ -17220,7 +17394,8 @@
17220
17394
  properties: {
17221
17395
  axis: d.properties.axis,
17222
17396
  type: d.properties.type,
17223
- legend: d.properties.legend
17397
+ legend: d.properties.legend,
17398
+ annotation: d.properties.annotation
17224
17399
  },
17225
17400
  stackData: tempStackAreaChartDataForPrimaryAxis,
17226
17401
  data: primaryStackAreaAxisData2
@@ -17231,7 +17406,8 @@
17231
17406
  properties: {
17232
17407
  axis: d.properties.axis,
17233
17408
  type: d.properties.type,
17234
- legend: d.properties.legend
17409
+ legend: d.properties.legend,
17410
+ annotation: d.properties.annotation
17235
17411
  },
17236
17412
  stackData: tempStackAreaChartDataForSecondaryAxis,
17237
17413
  data: secondaryStackAreaAxisData2
@@ -17242,7 +17418,8 @@
17242
17418
  properties: {
17243
17419
  axis: d.properties.axis,
17244
17420
  type: d.properties.type,
17245
- legend: d.properties.legend
17421
+ legend: d.properties.legend,
17422
+ annotation: d.properties.annotation
17246
17423
  },
17247
17424
  stackData: tempStackColumnChartDataForPrimaryAxis,
17248
17425
  data: primaryStackColumnAxisData2
@@ -17253,7 +17430,8 @@
17253
17430
  properties: {
17254
17431
  axis: d.properties.axis,
17255
17432
  type: d.properties.type,
17256
- legend: d.properties.legend
17433
+ legend: d.properties.legend,
17434
+ annotation: d.properties.annotation
17257
17435
  },
17258
17436
  stackData: tempStackColumnChartDataForSecondaryAxis,
17259
17437
  data: secondaryStackColumnAxisData2
@@ -17275,17 +17453,6 @@
17275
17453
  }
17276
17454
  };
17277
17455
  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
17456
  {
17290
17457
  yScaleLeft = linear$1().domain([
17291
17458
  chartJSON.yMinLeft >= 0 ? customYaxisMinValue !== void 0 && !Number.isNaN(customYaxisMinValue) ? customYaxisMinValue : 0 : chartJSON.yMinLeft < 0 ? chartJSON.yMinLeft * 1.1 : chartJSON.yMinLeft * 0.9,
@@ -17296,14 +17463,6 @@
17296
17463
  ]);
17297
17464
  }
17298
17465
  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
17466
  yScaleRight = linear$1().domain([
17308
17467
  chartJSON.yMinRight >= 0 ? (secondaryCustomYaxisMinValue || secondaryCustomYaxisMinValue == 0) && !Number.isNaN(secondaryCustomYaxisMinValue) ? secondaryCustomYaxisMinValue : 0 : (secondaryCustomYaxisMinValue || secondaryCustomYaxisMinValue == 0) && !Number.isNaN(secondaryCustomYaxisMinValue) ? secondaryCustomYaxisMinValue : chartJSON.yMinRight * 1.1,
17309
17468
  chartJSON.yMaxRight <= 0 ? (secondaryCustomYaxisMaxValue || secondaryCustomYaxisMaxValue == 0) && !Number.isNaN(secondaryCustomYaxisMaxValue) ? secondaryCustomYaxisMaxValue : 0 : (secondaryCustomYaxisMaxValue || secondaryCustomYaxisMaxValue == 0) && !Number.isNaN(secondaryCustomYaxisMaxValue) ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight * 1.1
@@ -17315,7 +17474,7 @@
17315
17474
  calculatedRange = [0, innerWidth2];
17316
17475
  };
17317
17476
  const getXScale = () => {
17318
- xScaleForLegends = band().domain(chartJSON.legendList.reverse()).range([0, columnWidth]).paddingInner(
17477
+ xScaleForLegends = band().domain(chartJSON.legendList).range([0, columnWidth]).paddingInner(
17319
17478
  chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
17320
17479
  );
17321
17480
  xScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
@@ -17490,7 +17649,7 @@
17490
17649
  ).append("path").attr("class", "line").attr("fill", "none");
17491
17650
  lineGroupsEnter.merge(lineGroups).select("path").attr("d", (d) => lineGenerator(d.data)).attr(
17492
17651
  "stroke",
17493
- (d) => d.properties.color !== commonColors.white ? d.properties.color : "none"
17652
+ (d) => d.properties !== commonColors.white ? d.properties.color : "none"
17494
17653
  ).attr("stroke-dasharray", (d) => {
17495
17654
  switch (d.properties.lineStyle) {
17496
17655
  case staticLineStyle.dotted:
@@ -17673,7 +17832,7 @@
17673
17832
  ).merge(rects).attr(
17674
17833
  "hoverId",
17675
17834
  (d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
17676
- ).attr("x", (d) => xScaleForLegends("stackLegend")).attr(
17835
+ ).attr("x", (d) => xScaleForLegends(chartTypes.StackColumnChart)).attr(
17677
17836
  "y",
17678
17837
  (d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
17679
17838
  ).attr(
@@ -17810,7 +17969,7 @@
17810
17969
  };
17811
17970
  const createStackData = (requiredStackChatData) => {
17812
17971
  let legendList = requiredStackChatData.data.map((d) => d.legend);
17813
- stackChartData = stack().keys(legendList).offset(diverging)(requiredStackChatData.stackData);
17972
+ stackChartData = stack().keys(legendList).offset(none$3)(requiredStackChatData.stackData);
17814
17973
  requiredStackChatData.data.forEach(
17815
17974
  (data2, index2) => data2.data.forEach((axisData, position) => {
17816
17975
  axisData["0"] = stackChartData[index2][position][0];
@@ -17824,6 +17983,9 @@
17824
17983
  stackData["color"] = JSON.parse(
17825
17984
  JSON.stringify(requiredStackChatData.data[j].properties.color)
17826
17985
  );
17986
+ stackData["individualAnnotationVisibility"] = JSON.parse(
17987
+ JSON.stringify(requiredStackChatData.data[j].properties.annotation)
17988
+ );
17827
17989
  d.data.labelPosition = requiredStackChatData.data[j].properties.dataLabelPosition;
17828
17990
  d.data["labelColor"] = seriesColor == "2" ? JSON.parse(
17829
17991
  JSON.stringify(requiredStackChatData.data[j].properties.color)
@@ -17843,7 +18005,7 @@
17843
18005
  d.data["color"] = JSON.parse(
17844
18006
  JSON.stringify(requiredStackChatData.data[j].properties.color)
17845
18007
  );
17846
- d.data["legend"] = `stackLegend`;
18008
+ d.data["legend"] = requiredStackChatData.properties.type;
17847
18009
  d.data["type"] = JSON.parse(
17848
18010
  JSON.stringify(requiredStackChatData.data[j].properties.type)
17849
18011
  );
@@ -17859,7 +18021,15 @@
17859
18021
  chartJSON.yMinLeft = Math.min(chartJSON.yMinLeft, ...totals);
17860
18022
  }
17861
18023
  if (secondaryStackAxisData.length > 0) {
17862
- const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(filteredDimension, secondaryStackColumnAxisData, false) : getStackedData(filteredDimension, secondaryStackAreaAxisData, false);
18024
+ const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(
18025
+ filteredDimension,
18026
+ secondaryStackColumnAxisData,
18027
+ false
18028
+ ) : getStackedData(
18029
+ filteredDimension,
18030
+ secondaryStackAreaAxisData,
18031
+ false
18032
+ );
17863
18033
  const totals = stackData.map((d) => d.total);
17864
18034
  chartJSON.yMaxRight = Math.max(chartJSON.yMaxRight, ...totals);
17865
18035
  chartJSON.yMinRight = Math.min(chartJSON.yMinRight, ...totals);
@@ -18768,18 +18938,8 @@
18768
18938
  event2,
18769
18939
  d.properties
18770
18940
  );
18771
- const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
18772
- gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
18773
- let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
18774
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
18775
- selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
18776
18941
  }).on("mouseout", (event2, d) => {
18777
18942
  hideTooltipOnMouseOut();
18778
- const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
18779
- gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
18780
- let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
18781
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
18782
- selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
18783
18943
  });
18784
18944
  const finalRects = baseRects;
18785
18945
  finalRects.attr("y", (d) => d[1] >= d[0] ? yScaleLeft(d[1]) : yScaleLeft(d[0])).attr("height", (d) => Math.abs(yScaleLeft(d[0]) - yScaleLeft(d[1])));
@@ -19517,18 +19677,8 @@
19517
19677
  event2,
19518
19678
  d.properties
19519
19679
  );
19520
- const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
19521
- gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
19522
- const legend = (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-");
19523
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
19524
- selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
19525
19680
  }).on("mouseout", (event2, d) => {
19526
19681
  hideTooltipOnMouseOut();
19527
- const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
19528
- gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
19529
- const legend = (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-");
19530
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
19531
- selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
19532
19682
  });
19533
19683
  columnGroups.exit().remove();
19534
19684
  gTag.selectAll(".parentGroup").raise();
@@ -22579,7 +22729,9 @@
22579
22729
  formatOptions,
22580
22730
  chartJSON,
22581
22731
  customYaxisMinValue,
22582
- customYaxisMaxValue
22732
+ customYaxisMaxValue,
22733
+ barChart,
22734
+ innerWidth2
22583
22735
  ).yAxisLabelArray;
22584
22736
  chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
22585
22737
  chartJSON.yMinLeft = yAxisLabelArray[0];
@@ -22619,7 +22771,8 @@
22619
22771
  chartJSON,
22620
22772
  customYaxisMinValue,
22621
22773
  customYaxisMaxValue,
22622
- barChart
22774
+ barChart,
22775
+ innerWidth2
22623
22776
  );
22624
22777
  xAxisBottom = axisBottom(xScaleBottom).tickFormat(
22625
22778
  (d) => getNumberWithFormat(
@@ -22719,10 +22872,7 @@
22719
22872
  }
22720
22873
  });
22721
22874
  columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
22722
- let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
22723
- gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "visible");
22724
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
22725
- selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
22875
+ (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
22726
22876
  showTooltipOnMouseMove(
22727
22877
  [
22728
22878
  {
@@ -22754,10 +22904,7 @@
22754
22904
  data2.properties
22755
22905
  );
22756
22906
  }).on("mouseout", (event2, d) => {
22757
- let legend = (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
22758
- gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "hidden");
22759
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
22760
- selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
22907
+ (data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
22761
22908
  hideTooltipOnMouseOut();
22762
22909
  });
22763
22910
  columnGroups.exit().remove();
@@ -23189,7 +23336,6 @@
23189
23336
  return d.data[d.key] === 0 && props?.hideZeroValues ? "hidden" : "visible";
23190
23337
  }).on("mousemove", (event2, d) => {
23191
23338
  const dim = d.data.dimension;
23192
- gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
23193
23339
  showTooltipOnMouseMove(
23194
23340
  [
23195
23341
  {
@@ -23214,15 +23360,8 @@
23214
23360
  event2,
23215
23361
  d.properties
23216
23362
  );
23217
- let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
23218
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
23219
- selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
23220
23363
  }).on("mouseout", (event2, d) => {
23221
- const dim = d.data.dimension;
23222
- gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
23223
- let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
23224
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
23225
- selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
23364
+ d.data.dimension;
23226
23365
  hideTooltipOnMouseOut();
23227
23366
  });
23228
23367
  baseRects.attr("x", (d) => xScaleBottom(0));
@@ -23890,7 +24029,6 @@
23890
24029
  return d.data[d.key] === 0 && props?.hideZeroValues ? "hidden" : "visible";
23891
24030
  }).on("mousemove", (event2, d) => {
23892
24031
  const dim = d.data.dimension;
23893
- gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
23894
24032
  showTooltipOnMouseMove(
23895
24033
  [
23896
24034
  {
@@ -23915,14 +24053,10 @@
23915
24053
  event2,
23916
24054
  d.properties
23917
24055
  );
23918
- let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
23919
- selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
23920
- selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
23921
24056
  }).on("mouseout", (event2, d) => {
23922
24057
  let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
23923
24058
  selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
23924
24059
  selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
23925
- gTag.select(`#dim-background-${d.data.dimension}`).attr("visibility", "hidden");
23926
24060
  hideTooltipOnMouseOut();
23927
24061
  });
23928
24062
  const finalRects = baseRects;
@@ -25572,6 +25706,7 @@
25572
25706
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
25573
25707
  };
25574
25708
  const getChartType = (lineData) => {
25709
+ const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
25575
25710
  lineData.forEach((lData) => {
25576
25711
  lData.data.forEach((cData) => {
25577
25712
  cData.hideZero = lData.properties.hideZeroValues;
@@ -25623,18 +25758,9 @@
25623
25758
  (d2) => d2.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : strokeLineCap.butt
25624
25759
  ).attr(
25625
25760
  "stroke-width",
25626
- (d2) => d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
25761
+ (d2) => !isLinesAndMarkersVisible ? 0 : d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
25627
25762
  ).attr("fill", "none");
25628
- 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().on("mouseenter", function(event2, d2) {
25629
- svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true).attr("stroke-width", "2.5");
25630
- svg.selectAll(
25631
- '[hoverId="' + getJQuerySelector(
25632
- d2.properties?.alias || d2.properties?.name || "Legend"
25633
- ).replace(/\s+/g, "-") + '"]'
25634
- ).classed("highlight", true).classed("unhighlight", false).attr("stroke-width", "3.5");
25635
- }).on("mouseleave", function(event2, d2) {
25636
- svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false).attr("stroke-width", "2.5");
25637
- });
25763
+ 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();
25638
25764
  onHoverMarkerForAreaChartFamily(
25639
25765
  formatOptions,
25640
25766
  areas,
@@ -26121,6 +26247,7 @@
26121
26247
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
26122
26248
  };
26123
26249
  const getChartType = (lineData) => {
26250
+ const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
26124
26251
  lineData.forEach((lData) => {
26125
26252
  lData.data.forEach((cData) => {
26126
26253
  cData.hideZero = lData.properties.hideZeroValues;
@@ -26154,7 +26281,7 @@
26154
26281
  const g = select$2(this);
26155
26282
  g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
26156
26283
  "stroke",
26157
- (d2) => d2.color !== commonColors.white ? d2.color : "none"
26284
+ (d2) => d2.color !== commonColors.white ? seriesData[i].properties.areaBorderColor : "none"
26158
26285
  ).attr("stroke-dasharray", (d2) => {
26159
26286
  const lineWidth = parseInt(
26160
26287
  seriesData[i].properties.lineWidth.toString()
@@ -26172,16 +26299,9 @@
26172
26299
  () => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
26173
26300
  ).attr(
26174
26301
  "stroke-width",
26175
- (d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
26302
+ () => !isLinesAndMarkersVisible ? 0 : seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : "0"
26176
26303
  ).attr("fill", "none").style("pointer-events", "none");
26177
- 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().on("mouseenter", function(event2, d2) {
26178
- svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
26179
- svg.selectAll(
26180
- '[hoverId="' + (seriesData[d2.index]?.properties?.alias || seriesData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-") + '"]'
26181
- ).classed("highlight", true).classed("unhighlight", false);
26182
- }).on("mouseleave", function() {
26183
- svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
26184
- });
26304
+ 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();
26185
26305
  svg.selectAll(
26186
26306
  '[hoverId="' + (seriesData[d.index].properties.alias || seriesData[d.index].properties.name || "Legend").replace(/ /g, "-") + '"]'
26187
26307
  ).classed("highlight", false).classed("unhighlight", false);
@@ -26195,7 +26315,8 @@
26195
26315
  lineData,
26196
26316
  xScale,
26197
26317
  yScaleLeft,
26198
- chartType
26318
+ chartType,
26319
+ true
26199
26320
  );
26200
26321
  lineMarkers(
26201
26322
  areas,
@@ -26675,6 +26796,7 @@
26675
26796
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
26676
26797
  };
26677
26798
  const getChartType = (lineData) => {
26799
+ const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
26678
26800
  stackChartData.forEach(
26679
26801
  (data2, i) => data2.forEach((item, position) => {
26680
26802
  const total = item.data.total;
@@ -26716,7 +26838,7 @@
26716
26838
  const g = select$2(this);
26717
26839
  g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
26718
26840
  "stroke",
26719
- (d2) => d2.color !== commonColors.white ? d2.color : "none"
26841
+ (d2) => d2.color !== commonColors.white ? seriesData[i].properties.areaBorderColor : "none"
26720
26842
  ).attr("stroke-dasharray", (d2) => {
26721
26843
  const lineWidth = parseInt(
26722
26844
  seriesData[i].properties.lineWidth.toString()
@@ -26734,18 +26856,9 @@
26734
26856
  () => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
26735
26857
  ).attr(
26736
26858
  "stroke-width",
26737
- (d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
26859
+ () => !isLinesAndMarkersVisible ? 0 : seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : "0"
26738
26860
  ).attr("fill", "none").style("pointer-events", "none");
26739
- 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().on("mouseenter", function(event2, d2) {
26740
- svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
26741
- svg.selectAll(
26742
- '[hoverId="' + getJQuerySelector(
26743
- (lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-")
26744
- ) + '"]'
26745
- ).classed("highlight", true).classed("unhighlight", false);
26746
- }).on("mouseleave", function() {
26747
- svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
26748
- });
26861
+ 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();
26749
26862
  svg.selectAll(
26750
26863
  '[hoverId="' + getJQuerySelector(
26751
26864
  (lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/ /g, "-")
@@ -26761,7 +26874,8 @@
26761
26874
  lineData,
26762
26875
  xScale,
26763
26876
  yScaleLeft,
26764
- chartType
26877
+ chartType,
26878
+ true
26765
26879
  );
26766
26880
  gTag.selectAll(".parentGroup").raise();
26767
26881
  gTag.selectAll(".hoverLine").raise();
@@ -28880,6 +28994,8 @@
28880
28994
  let legendListWidth;
28881
28995
  let radius;
28882
28996
  let innerRadius;
28997
+ const arcIndex = 1;
28998
+ const progressIndex = 0;
28883
28999
  require$$0$1.useEffect(() => {
28884
29000
  drawChart();
28885
29001
  }, [formatOptions]);
@@ -28939,23 +29055,22 @@
28939
29055
  };
28940
29056
  const initProgressChartData = () => {
28941
29057
  try {
28942
- seriesData = seriesData.sort((a2, b) => b.data[0].value - a2.data[0].value);
28943
- totalValue = ChartData[0].data[0].value + ChartData[1].data[0].value;
29058
+ totalValue = ChartData[arcIndex].data[0].value + ChartData[progressIndex].data[0].value;
28944
29059
  } catch (error) {
28945
29060
  logError$2(fileName$3, "initProgressChartData", error);
28946
29061
  }
28947
29062
  };
28948
29063
  const drawProgressChart = () => {
28949
29064
  try {
28950
- let maxValue = ChartData[0].data[0].value;
28951
- let progressValue = ChartData[1].data[0].value;
29065
+ let maxValue = ChartData[arcIndex].data[0].value;
29066
+ let progressValue = ChartData[progressIndex].data[0].value;
28952
29067
  let completeAngle = Math.PI * 2;
28953
29068
  let progressAngle = progressValue / maxValue * Math.PI * 2;
28954
29069
  let valuefontStyle = chartFormatOptions.plotArea.dataLabelValueFontStyle;
28955
29070
  const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius).startAngle(0).cornerRadius(
28956
29071
  convertStringToNumber(chartFormatOptions.plotArea.cornerRadius)
28957
29072
  );
28958
- chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill", ChartData[0].properties.color).attr(
29073
+ chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill", ChartData[arcIndex].properties.color).attr(
28959
29074
  "fill-opacity",
28960
29075
  chartFormatOptions.plotArea.opacityforProgressScale
28961
29076
  ).attr("d", arc2({ endAngle: completeAngle })).on("mousemove", (d) => {
@@ -28963,7 +29078,7 @@
28963
29078
  showTooltipOnMouseMove(
28964
29079
  [
28965
29080
  {
28966
- key: ChartData[0].properties.alias,
29081
+ key: ChartData[arcIndex].properties.alias,
28967
29082
  value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
28968
29083
  chartFormatOptions.toolTip.toolTipDisplayUnits,
28969
29084
  chartFormatOptions.toolTip.toolTipNumberFormatProgress,
@@ -28973,7 +29088,7 @@
28973
29088
  ],
28974
29089
  chartFormatOptions,
28975
29090
  void 0,
28976
- ChartData[0].properties
29091
+ ChartData[arcIndex].properties
28977
29092
  );
28978
29093
  } catch (error) {
28979
29094
  logError$2(
@@ -28993,7 +29108,7 @@
28993
29108
  );
28994
29109
  }
28995
29110
  }).attr("transform", getTransformString());
28996
- chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill", ChartData[1].properties.color).attr(
29111
+ chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill", ChartData[progressIndex].properties.color).attr(
28997
29112
  "fill-opacity",
28998
29113
  chartFormatOptions.plotArea.opacityforProgressGoal
28999
29114
  ).attr("d", arc2({ endAngle: progressAngle })).on("mousemove", (d) => {
@@ -29001,7 +29116,7 @@
29001
29116
  showTooltipOnMouseMove(
29002
29117
  [
29003
29118
  {
29004
- key: ChartData[1].properties.alias,
29119
+ key: ChartData[progressIndex].properties.alias,
29005
29120
  value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? Math.round(progressValue / maxValue * 100) + "%" : getNumberWithFormatFunction(
29006
29121
  chartFormatOptions.toolTip.toolTipDisplayUnits,
29007
29122
  chartFormatOptions.toolTip.toolTipDecimalPrecision,
@@ -29009,7 +29124,7 @@
29009
29124
  )(maxValue)
29010
29125
  },
29011
29126
  {
29012
- key: ChartData[0].properties.alias,
29127
+ key: ChartData[arcIndex].properties.alias,
29013
29128
  value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
29014
29129
  chartFormatOptions.toolTip.toolTipDisplayUnits,
29015
29130
  chartFormatOptions.toolTip.toolTipDecimalPrecision,
@@ -29019,7 +29134,7 @@
29019
29134
  ],
29020
29135
  chartFormatOptions,
29021
29136
  void 0,
29022
- ChartData[1].properties
29137
+ ChartData[progressIndex].properties
29023
29138
  );
29024
29139
  } catch (error) {
29025
29140
  logError$2(
@@ -55051,8 +55166,8 @@
55051
55166
  svg,
55052
55167
  yScaleLeft,
55053
55168
  columnWidth,
55054
- isAdvanceAnalyticsChart,
55055
55169
  isReportEditable,
55170
+ isAdvanceAnalyticsChart,
55056
55171
  barChart
55057
55172
  );
55058
55173
  };