pace-chart-lib 1.0.18 → 1.0.20

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.
@@ -11437,81 +11437,73 @@
11437
11437
  bottom: 0,
11438
11438
  left: 0
11439
11439
  };
11440
- var actualChartTypes = /* @__PURE__ */ ((actualChartTypes2) => {
11441
- actualChartTypes2["waterfall"] = "Waterfall";
11442
- actualChartTypes2["lineWithMarker"] = "LineWithMarker";
11443
- actualChartTypes2["stackLine"] = "StackLine";
11444
- actualChartTypes2["stackLine100"] = "100StackLine";
11445
- actualChartTypes2["line"] = "Line";
11446
- actualChartTypes2["bar"] = "Bar";
11447
- actualChartTypes2["stackColumn"] = "StackColumn";
11448
- actualChartTypes2["area"] = "Area";
11449
- actualChartTypes2["pie"] = "Pie";
11450
- actualChartTypes2["sankey"] = "Sankey";
11451
- actualChartTypes2["sunburst"] = "Sunburst";
11452
- actualChartTypes2["horizontalBar"] = "HorizontalBar";
11453
- actualChartTypes2["stackArea"] = "StackArea";
11454
- actualChartTypes2["stackArea100"] = "100StackArea";
11455
- actualChartTypes2["treeMap"] = "TreeMap";
11456
- actualChartTypes2["stackBar"] = "StackBar";
11457
- actualChartTypes2["stackColumn100"] = "100StackColumn";
11458
- actualChartTypes2["stackBar100"] = "100StackBar";
11459
- actualChartTypes2["scatterPlot"] = "ScatterPlot";
11460
- actualChartTypes2["customColumnChart"] = "CustomColumnChart";
11461
- actualChartTypes2["customBarChart"] = "CustomBarChart";
11462
- actualChartTypes2["histogram"] = "Histogram";
11463
- actualChartTypes2["columnHistogram"] = "ColumnHistogram";
11464
- actualChartTypes2["barHistogram"] = "BarHistogram";
11465
- actualChartTypes2["column"] = "Column";
11466
- actualChartTypes2["miscellaneous"] = "Miscellaneous";
11467
- actualChartTypes2["custom"] = "Custom";
11468
- actualChartTypes2["collapsableTree"] = "CollapsableTree";
11469
- actualChartTypes2["maps"] = "Maps";
11470
- actualChartTypes2["tornadoChart"] = "Tornado";
11471
- actualChartTypes2["pieOfPie"] = "PieOfPie";
11472
- actualChartTypes2["wordCloud"] = "WordCloud";
11473
- actualChartTypes2["boxPlot"] = "BoxPlot";
11474
- actualChartTypes2["bubblePlot"] = "BubblePlot";
11475
- actualChartTypes2["vennDiagramChart"] = "VennDiagramChart";
11476
- actualChartTypes2["speedometerChart"] = "SpeedometerChart";
11477
- actualChartTypes2["layeredColumnChart"] = "LayeredColumnChart";
11478
- actualChartTypes2["layeredBarChart"] = "LayeredBarChart";
11479
- actualChartTypes2["organizationalChart"] = "OrganizationalChart";
11480
- actualChartTypes2["pyramidChart"] = "PyramidChart";
11481
- actualChartTypes2["scaleBreakStackedColumnChart"] = "ScaleBreakStackedColumnChart";
11482
- actualChartTypes2["progressChart"] = "ProgressChart";
11483
- actualChartTypes2["radialBarChart"] = "RadialBarChart";
11484
- return actualChartTypes2;
11485
- })(actualChartTypes || {});
11440
+ var chartTypes = /* @__PURE__ */ ((chartTypes2) => {
11441
+ chartTypes2["WaterfallChart"] = "WaterfallChart";
11442
+ chartTypes2["StackLineChart"] = "StackLineChart";
11443
+ chartTypes2["NormalizedStackLineChart"] = "NormalizedStackLineChart";
11444
+ chartTypes2["LineChart"] = "LineChart";
11445
+ chartTypes2["ColumnChart"] = "ColumnChart";
11446
+ chartTypes2["StackColumnChart"] = "StackColumnChart";
11447
+ chartTypes2["AreaChart"] = "AreaChart";
11448
+ chartTypes2["PieChart"] = "PieChart";
11449
+ chartTypes2["SankeyChart"] = "SankeyChart";
11450
+ chartTypes2["DonutChart"] = "DonutChart";
11451
+ chartTypes2["HorizontalBarChart"] = "HorizontalBarChart";
11452
+ chartTypes2["StackAreaChart"] = "StackAreaChart";
11453
+ chartTypes2["NormalizedStackAreaChart"] = "NormalizedStackAreaChart";
11454
+ chartTypes2["Treemap"] = "Treemap";
11455
+ chartTypes2["StackHorizontalBarChart"] = "StackHorizontalBarChart";
11456
+ chartTypes2["NormalizedStackColumnChart"] = "NormalizedStackColumnChart";
11457
+ chartTypes2["NormalizedStackHorizontalBarChart"] = "NormalizedStackHorizontalBarChart";
11458
+ chartTypes2["ScatterChart"] = "ScatterChart";
11459
+ chartTypes2["CustomColumnChart"] = "CustomColumnChart";
11460
+ chartTypes2["customBarChart"] = "CustomBarChart";
11461
+ chartTypes2["ColumnHistogramChart"] = "ColumnHistogramChart";
11462
+ chartTypes2["HorizontalHistogramChart"] = "HorizontalHistogramChart";
11463
+ chartTypes2["Maps"] = "Maps";
11464
+ chartTypes2["TornadoChart"] = "TornadoChart";
11465
+ chartTypes2["PieofPie"] = "PieofPie";
11466
+ chartTypes2["WordCloud"] = "WordCloud";
11467
+ chartTypes2["BubbleChart"] = "BubbleChart";
11468
+ chartTypes2["VennChart"] = "VennChart";
11469
+ chartTypes2["Speedometer"] = "Speedometer";
11470
+ chartTypes2["LayeredColumnChart"] = "LayeredColumnChart";
11471
+ chartTypes2["LayeredHorizontalBarChart"] = "LayeredHorizontalBarChart";
11472
+ chartTypes2["OrganizationChart"] = "OrganizationChart";
11473
+ chartTypes2["PyramidChart"] = "PyramidChart";
11474
+ chartTypes2["ProgressChart"] = "ProgressChart";
11475
+ chartTypes2["RadialBarChart"] = "RadialBarChart";
11476
+ return chartTypes2;
11477
+ })(chartTypes || {});
11486
11478
  const connecterCurve = {
11487
11479
  1: "",
11488
11480
  2: curveLinear$1,
11489
11481
  3: step
11490
11482
  };
11491
11483
  const chartsWithDataTableArray = [
11492
- actualChartTypes.bar,
11493
- actualChartTypes.stackColumn,
11494
- actualChartTypes.stackColumn100,
11495
- actualChartTypes.line,
11496
- actualChartTypes.stackLine,
11497
- actualChartTypes.stackLine100,
11498
- actualChartTypes.area,
11499
- actualChartTypes.stackArea,
11500
- actualChartTypes.stackArea100
11484
+ chartTypes.ColumnChart,
11485
+ chartTypes.StackColumnChart,
11486
+ chartTypes.NormalizedStackColumnChart,
11487
+ chartTypes.LineChart,
11488
+ chartTypes.StackLineChart,
11489
+ chartTypes.NormalizedStackLineChart,
11490
+ chartTypes.AreaChart,
11491
+ chartTypes.StackAreaChart,
11492
+ chartTypes.NormalizedStackAreaChart
11501
11493
  ];
11502
11494
  const chartsWithoutPlotArea = [
11503
- actualChartTypes.pie,
11504
- actualChartTypes.pieOfPie,
11505
- actualChartTypes.sunburst,
11506
- actualChartTypes.pyramidChart,
11507
- actualChartTypes.organizationalChart,
11508
- actualChartTypes.vennDiagramChart,
11509
- actualChartTypes.progressChart,
11510
- actualChartTypes.maps,
11511
- actualChartTypes.wordCloud,
11512
- actualChartTypes.sankey,
11513
- actualChartTypes.speedometerChart,
11514
- actualChartTypes.radialBarChart
11495
+ chartTypes.PieChart,
11496
+ chartTypes.PieofPie,
11497
+ chartTypes.DonutChart,
11498
+ chartTypes.PyramidChart,
11499
+ chartTypes.OrganizationChart,
11500
+ chartTypes.VennChart,
11501
+ chartTypes.ProgressChart,
11502
+ chartTypes.Maps,
11503
+ chartTypes.WordCloud,
11504
+ chartTypes.SankeyChart,
11505
+ chartTypes.Speedometer,
11506
+ chartTypes.RadialBarChart
11515
11507
  ];
11516
11508
  function calculateWidthHeightDynamically(content, fontSize, fontFamily, rotationDegree, fixedWidth) {
11517
11509
  var div = document.createElement("div");
@@ -11885,7 +11877,7 @@
11885
11877
  if (chartAreaBorder) {
11886
11878
  const borderColor = formatOptions.chartArea.chartAreaBorderColor;
11887
11879
  const borderWidth = formatOptions.chartArea.chartAreaBorderThickness;
11888
- const borderStyle = formatOptions.chartArea.chartAreaBorderStyle;
11880
+ const borderStyle = formatOptions.chartArea.chartAreaBorderStyle.toString();
11889
11881
  const border = borderStyle === "1" ? "solid" : borderStyle === "2" ? "dashed" : "dotted";
11890
11882
  svg.style("outline", `${borderWidth}px ${border} ${borderColor}`).style("outline-offset", `-${borderWidth}px`);
11891
11883
  } else {
@@ -12271,6 +12263,28 @@
12271
12263
  );
12272
12264
  let yAxisLabelArray = [];
12273
12265
  let customTickValue;
12266
+ const isTornadoChart = Ymin < 0 && Ymax > 0;
12267
+ if (isTornadoChart) {
12268
+ const maxAbs = Math.max(Math.abs(Ymin), Math.abs(Ymax));
12269
+ const finalMax = customYaxisMaxValue || maxAbs;
12270
+ const finalMin = customYaxisMinValue || -finalMax;
12271
+ if (customYaxisIntervalValue && customYaxisIntervalValue > 0) {
12272
+ for (let v = finalMin; v <= finalMax + 1e-6; v += customYaxisIntervalValue) {
12273
+ yAxisLabelArray.push(parseFloat(v.toFixed(6)));
12274
+ }
12275
+ customTickValue = yAxisLabelArray.length;
12276
+ } else {
12277
+ autoLabelFlag = true;
12278
+ const tickCount = 6;
12279
+ for (let i = -tickCount; i <= tickCount; i++) {
12280
+ yAxisLabelArray.push(
12281
+ parseFloat((i * finalMax / tickCount).toFixed(6))
12282
+ );
12283
+ }
12284
+ customTickValue = barChart ? innerWidth2 / 80 : innerHeight2 / 80;
12285
+ }
12286
+ return { yAxisLabelArray, customTickValue, autoLabelFlag };
12287
+ }
12274
12288
  if (!customYaxisMaxValue && Ymax > 0) {
12275
12289
  const range2 = Ymax - Ymin;
12276
12290
  const padding = range2 * 0.05;
@@ -12482,14 +12496,14 @@
12482
12496
  }
12483
12497
  function initXaxis$1(gTag, chartJSON, xLabel, formatOptions, dataTableHeight, yScaleLeft, xAxis, dimensionHeightWidthArray, height, barWidth, isDateType, innerWidth2, innerHeight2, filteredDimensionList) {
12484
12498
  try {
12485
- let responsiveDimList = chartJSON.chartType !== actualChartTypes.columnHistogram ? responsiveXaxisLabel(
12499
+ let responsiveDimList = chartJSON.chartType !== chartTypes.ColumnHistogramChart ? responsiveXaxisLabel(
12486
12500
  filteredDimensionList,
12487
12501
  innerWidth2
12488
12502
  ) : [];
12489
12503
  let formatedResponsiveDimList = [];
12490
12504
  let actualDimesionWidth = dimensionHeightWidthArray[0] + 5;
12491
12505
  let maxDimensionWidth = dimensionHeightWidthArray[3] + 10;
12492
- if (chartJSON.chartType != actualChartTypes.waterfall && chartJSON.chartType != actualChartTypes.columnHistogram) {
12506
+ if (chartJSON.chartType != chartTypes.WaterfallChart && chartJSON.chartType != chartTypes.ColumnHistogramChart) {
12493
12507
  formatedResponsiveDimList = isDateType ? setDateFormats(
12494
12508
  formatOptions.xAxisLabel.xAxisNumberFormat,
12495
12509
  responsiveDimList.map((d) => d)
@@ -12548,7 +12562,7 @@
12548
12562
  "visibility",
12549
12563
  formatOptions.xAxisLabel.xAxisLabelVisibility ? "visible" : "hidden"
12550
12564
  );
12551
- if (chartJSON.chartType === actualChartTypes.columnHistogram) {
12565
+ if (chartJSON.chartType === chartTypes.ColumnHistogramChart) {
12552
12566
  xLabelsObj.attr("title", (d, i) => getNumberWithFormat(d, formatOptions.xAxisLabel.xAxisDisplayUnits, formatOptions.xAxisLabel.xAxisNumberFormat, formatOptions.xAxisLabel.xAxisLabelDecimalPrecision, false)).html((d, i) => getNumberWithFormat(d, formatOptions.xAxisLabel.xAxisDisplayUnits, formatOptions.xAxisLabel.xAxisNumberFormat, formatOptions.xAxisLabel.xAxisLabelDecimalPrecision, false));
12553
12567
  } else {
12554
12568
  xLabelsObj.attr("title", (d, i) => ("" + formatedResponsiveDimList[i]).trim()).html((d, i) => ("" + formatedResponsiveDimList[i]).trim());
@@ -12714,12 +12728,12 @@
12714
12728
  // ? formatOptions?.xAxisLabel?.xAxisPosition == "1"
12715
12729
  // ? 0
12716
12730
  // : xLabel
12717
- // : chartType == actualChartTypes.tornadoChart
12731
+ // : chartType == chartTypes.tornadoChart
12718
12732
  // ? xLabel + 5
12719
12733
  // : yLabel + 5)
12720
12734
  // })`
12721
12735
  `translate(${margin.left},${margin.top + innerHeight2 + (formatOptions?.xAxisLabel?.xAxisPosition == "1" ? 0 : barChart ? yLabel : xLabel)})`
12722
- // `translate(${margin.left},${Margin.top + innerHeight + (chartsWithXScrollFlag ? (formatOptions?.xAxisLabel?.xAxisPosition == "1" ? 0 : Xlabel) : (attributes.type == ActualChartTypes.TornadoChart) ? Xlabel + 5 : yLabel + 5) })`
12736
+ // `translate(${margin.left},${Margin.top + innerHeight + (chartsWithXScrollFlag ? (formatOptions?.xAxisLabel?.xAxisPosition == "1" ? 0 : Xlabel) : (attributes.type == chartTypes.TornadoChart) ? Xlabel + 5 : yLabel + 5) })`
12723
12737
  ).attr("class", "xAxisTitle").attr("width", innerWidth2).attr("height", xTitle + "px").style("z-index", "9999");
12724
12738
  if (formatOptions.xAxisTitle.xAxisDynamicTitleText.length !== 0) {
12725
12739
  object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", formatOptions.xAxisTitle.xAxisTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").html(
@@ -12810,9 +12824,8 @@
12810
12824
  return stepAfter;
12811
12825
  }
12812
12826
  }
12813
- function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d3Annotation2, labelExcludeList, individualLabelColor, oldAnnotationList, formatOptions, chartType, height, width, innerWidth2, dimensionList, innerHeight2, widgetId, svg, xScaleForLegends, columnWidth, isSensitivityChart, barChart) {
12827
+ 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) {
12814
12828
  try {
12815
- let fromReportBuilder = false;
12816
12829
  let annotationType = formatOptions.annotation.annotationType ?? "1";
12817
12830
  if (formatOptions.annotation.annotationVisibility) {
12818
12831
  let Disable = [annotationType == "1" ? "connector" : ""];
@@ -12973,12 +12986,12 @@
12973
12986
  let singleAnnotation = {
12974
12987
  note: {
12975
12988
  label: d.Measure >= 1e9 && formatOptions.annotation.annotationNumberFormat === ".2s" ? Math.round(d.Measure / 1e9) + "B" : getNumberWithFormat(
12976
- chartType === actualChartTypes.tornadoChart ? Math.abs(d.Measure) : d.Measure,
12989
+ chartType === chartTypes.TornadoChart ? Math.abs(d.Measure) : d.Measure,
12977
12990
  formatOptions.annotation.annotationDisplayUnits || formatOptions.plotArea.plotAreaDisplayUnits,
12978
12991
  formatOptions.annotation.annotationNumberFormat,
12979
12992
  formatOptions.annotation.annotationDecimalPrecision
12980
12993
  ),
12981
- align: barChart && chartType !== actualChartTypes.tornadoChart ? parseInt(d.LabelPosition) === 2 ? "middle" : "start" : chartType === actualChartTypes.tornadoChart ? "end" : "middle"
12994
+ align: barChart && chartType !== chartTypes.TornadoChart ? parseInt(d.LabelPosition) === 2 ? "middle" : "start" : chartType === chartTypes.TornadoChart ? "end" : "middle"
12982
12995
  },
12983
12996
  data: barChart ? {
12984
12997
  y: d.Dimension,
@@ -13039,15 +13052,13 @@
13039
13052
  }
13040
13053
  finalAnnotationList.push(newAnnotation);
13041
13054
  });
13042
- makeAnnotations.editMode(
13043
- formatOptions.annotation.annotationDraggable && !(fromReportBuilder == void 0 && widgetId != void 0)
13044
- ).accessors({
13055
+ makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
13045
13056
  x: function(d) {
13046
13057
  if (barChart) {
13047
13058
  let requiredXScale = d.x.axis === "Primary" ? yScaleLeft : yScaleRight;
13048
13059
  let axis2 = d.x.axis;
13049
13060
  return dataLabelsPositionForBarChartFamily(formatOptions, d.x.measure ? d.x.measure : 0, d.position, requiredXScale, minValue, void 0, chartType, isSensitivityChart, axis2);
13050
- } else if (chartType === actualChartTypes.column) {
13061
+ } else if (chartType === chartTypes.ColumnChart) {
13051
13062
  return xScaleForLegends(d.currentLegend) ? xScale(d.x) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 : xScale(d.x);
13052
13063
  } else {
13053
13064
  return xScale(d.x);
@@ -13065,7 +13076,7 @@
13065
13076
  );
13066
13077
  } else {
13067
13078
  if (barChart) {
13068
- let actualColWidth = chartType === actualChartTypes.tornadoChart || chartType === actualChartTypes.layeredBarChart ? xScaleForLegends.bandwidth() : -columnWidth;
13079
+ let actualColWidth = chartType === chartTypes.TornadoChart || chartType === chartTypes.LayeredHorizontalBarChart ? xScaleForLegends.bandwidth() : -columnWidth;
13069
13080
  return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) + xScaleForLegends.bandwidth() / 2 : 0) + xScale(d.y) - 5;
13070
13081
  } else
13071
13082
  return dataLabelsPosition(
@@ -13111,7 +13122,7 @@
13111
13122
  ).filter((d) => d._dx == 0 && d._dy == 0).remove();
13112
13123
  annotations.selectAll(".annotation-note-label").filter((d) => d.data && d.data.isVisible).style("display", "block");
13113
13124
  }).on("noteclick", function(annotation2) {
13114
- if (formatOptions.annotation.annotationDraggable && !(fromReportBuilder == void 0 && widgetId != void 0)) {
13125
+ if (formatOptions.annotation.annotationDraggable && isReportEditable) {
13115
13126
  annotation2.data.isVisible = false;
13116
13127
  oldAnnotationList.forEach((d) => {
13117
13128
  if (d.data.x == annotation2.data.x && d.data.y.measure == annotation2.data.y.measure) {
@@ -13134,7 +13145,7 @@
13134
13145
  throw error;
13135
13146
  }
13136
13147
  }
13137
- function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRight, margin, d3Annotation2, stackColumnData, stackAreaData, labelExcludeList, individualLabelColor, columnWidth, oldAnnotationList, formatOptions, height, width, innerWidth2, dimensionList, innerHeight2, widgetId, svg, xScaleForLegends) {
13148
+ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRight, margin, d3Annotation2, stackColumnData, stackAreaData, labelExcludeList, individualLabelColor, columnWidth, oldAnnotationList, formatOptions, height, width, innerWidth2, dimensionList, innerHeight2, widgetId, svg, xScaleForLegends, isReportEditable) {
13138
13149
  try {
13139
13150
  let annotationType = formatOptions.annotation.annotationType ?? "1";
13140
13151
  if (formatOptions.annotation.annotationVisibility) {
@@ -13147,7 +13158,7 @@
13147
13158
  let stackData = [];
13148
13159
  let getChartType = [];
13149
13160
  let connectorType = formatOptions.annotation.connectorType ? formatOptions.annotation.connectorType.toLowerCase() : "None";
13150
- oldAnnotationList = conditionallyResetOldAnnotations(oldAnnotationList, formatOptions, actualChartTypes.customColumnChart);
13161
+ oldAnnotationList = conditionallyResetOldAnnotations(oldAnnotationList, formatOptions, chartTypes.CustomColumnChart);
13151
13162
  let annotationsList = [];
13152
13163
  let finalAnnotationList = [];
13153
13164
  if (oldAnnotationList.length != 0) {
@@ -13168,15 +13179,15 @@
13168
13179
  case "2":
13169
13180
  chartData.forEach((d, i) => {
13170
13181
  switch (d.properties.type) {
13171
- case actualChartTypes.column:
13172
- case actualChartTypes.line:
13173
- case actualChartTypes.area:
13182
+ case chartTypes.ColumnChart:
13183
+ case chartTypes.LineChart:
13184
+ case chartTypes.AreaChart:
13174
13185
  labelData.push(d.data[0]);
13175
13186
  break;
13176
- case actualChartTypes.stackColumn:
13187
+ case chartTypes.StackColumnChart:
13177
13188
  stackColumnData.forEach((dta) => labelData.push(dta[0]));
13178
13189
  break;
13179
- case actualChartTypes.stackArea:
13190
+ case chartTypes.StackAreaChart:
13180
13191
  stackAreaData.forEach((dta) => labelData.push(dta[0]));
13181
13192
  break;
13182
13193
  }
@@ -13185,17 +13196,17 @@
13185
13196
  case "3":
13186
13197
  chartData.forEach((d) => {
13187
13198
  switch (d.properties.type) {
13188
- case actualChartTypes.column:
13189
- case actualChartTypes.line:
13190
- case actualChartTypes.area:
13199
+ case chartTypes.ColumnChart:
13200
+ case chartTypes.LineChart:
13201
+ case chartTypes.AreaChart:
13191
13202
  labelData.push(d.data[d.data.length - 1]);
13192
13203
  break;
13193
- case actualChartTypes.stackColumn:
13204
+ case chartTypes.StackColumnChart:
13194
13205
  stackColumnData.forEach(
13195
13206
  (dta) => labelData.push(dta[dta.length - 1])
13196
13207
  );
13197
13208
  break;
13198
- case actualChartTypes.stackArea:
13209
+ case chartTypes.StackAreaChart:
13199
13210
  stackAreaData.forEach(
13200
13211
  (dta) => labelData.push(dta[dta.length - 1])
13201
13212
  );
@@ -13206,34 +13217,34 @@
13206
13217
  case "4":
13207
13218
  chartData.forEach((d, i) => {
13208
13219
  switch (d.properties.type) {
13209
- case actualChartTypes.column:
13210
- case actualChartTypes.line:
13211
- case actualChartTypes.area:
13220
+ case chartTypes.ColumnChart:
13221
+ case chartTypes.LineChart:
13222
+ case chartTypes.AreaChart:
13212
13223
  labelData.push(d.data[0]);
13213
13224
  break;
13214
- case actualChartTypes.stackColumn:
13225
+ case chartTypes.StackColumnChart:
13215
13226
  stackColumnData.forEach((dta) => labelData.push(dta[0]));
13216
13227
  break;
13217
- case actualChartTypes.stackArea:
13228
+ case chartTypes.StackAreaChart:
13218
13229
  stackAreaData.forEach((dta) => labelData.push(dta[0]));
13219
13230
  break;
13220
13231
  }
13221
13232
  });
13222
13233
  chartData.forEach((d) => {
13223
13234
  switch (d.properties.type) {
13224
- case actualChartTypes.column:
13225
- case actualChartTypes.line:
13226
- case actualChartTypes.area:
13235
+ case chartTypes.ColumnChart:
13236
+ case chartTypes.LineChart:
13237
+ case chartTypes.AreaChart:
13227
13238
  labelData.push(
13228
13239
  d.data[d.data.length - 1]
13229
13240
  );
13230
13241
  break;
13231
- case actualChartTypes.stackColumn:
13242
+ case chartTypes.StackColumnChart:
13232
13243
  stackColumnData.forEach(
13233
13244
  (dta) => labelData.push(dta[dta.length - 1])
13234
13245
  );
13235
13246
  break;
13236
- case actualChartTypes.stackArea:
13247
+ case chartTypes.StackAreaChart:
13237
13248
  stackAreaData.forEach(
13238
13249
  (dta) => labelData.push(dta[dta.length - 1])
13239
13250
  );
@@ -13244,18 +13255,18 @@
13244
13255
  case "1":
13245
13256
  chartData.forEach((d) => {
13246
13257
  switch (d.properties.type) {
13247
- case actualChartTypes.column:
13248
- case actualChartTypes.line:
13249
- case actualChartTypes.area:
13258
+ case chartTypes.ColumnChart:
13259
+ case chartTypes.LineChart:
13260
+ case chartTypes.AreaChart:
13250
13261
  d.data.forEach((j) => labelData.push(j));
13251
13262
  break;
13252
- case actualChartTypes.stackColumn:
13263
+ case chartTypes.StackColumnChart:
13253
13264
  let stackColumnIndex = stackColumnData.findIndex((id2) => id2.key === d.properties.legend);
13254
13265
  if (stackColumnIndex !== -1) {
13255
13266
  stackColumnData[stackColumnIndex].forEach((dta) => labelData.push(dta));
13256
13267
  }
13257
13268
  break;
13258
- case actualChartTypes.stackArea:
13269
+ case chartTypes.StackAreaChart:
13259
13270
  let stackAreaIndex = stackAreaData.findIndex((id2) => id2.key === d.properties.legend);
13260
13271
  if (stackAreaIndex !== -1) {
13261
13272
  stackAreaData[stackAreaIndex].forEach((dta) => labelData.push(dta));
@@ -13297,7 +13308,7 @@
13297
13308
  },
13298
13309
  data: {
13299
13310
  x: d.dimension && d.legend ? { dimension: d.dimension, legend: d.legend, type: d.type, axis: d.axis || d.data.axis } : { dimension: d.data.dimension, legend: d.key, type: d.data.type, stacklegend: d.data.legend, axis: d.data.axis },
13300
- y: d.value || d.value == 0 ? d.value : d.data.type != actualChartTypes.stackColumn ? d[1] ? d[1] : 0 : d[1] > 0 ? d[1] : d[0],
13311
+ 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],
13301
13312
  prevValue: d[0] >= 0 ? d[0] : d[1],
13302
13313
  position: parseInt(d.labelPosition) ? parseInt(d.labelPosition) : parseInt(d.data.labelPosition),
13303
13314
  type: d.dimension && d.legend ? d.type : d.data.type,
@@ -13349,10 +13360,7 @@
13349
13360
  }
13350
13361
  finalAnnotationList.push(newAnnotation);
13351
13362
  });
13352
- makeAnnotations.editMode(
13353
- formatOptions.annotation.annotationDraggable
13354
- // && (!(self.attributes.fromReportBuilder == undefined && this.svgIndex != undefined))
13355
- ).accessors({
13363
+ makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
13356
13364
  x: function(d) {
13357
13365
  if (getChartType.includes(d.x.type) || getChartType.includes(d.type)) {
13358
13366
  let chartType = d.x.type || d.type;
@@ -13403,7 +13411,7 @@
13403
13411
  annotations.selectAll(".note-line").attr("hoverId", (d) => d.data.currentLegend).style("stroke", formatOptions.annotation.connectorColor || "#ccc").attr("stroke-dasharray", connectedStyle[formatOptions.annotation.connectorStyle]).filter((d) => d._dx == 0 && d._dy == 0).remove();
13404
13412
  annotations.selectAll(".annotation-note-label").filter((d) => d.data && d.data.isVisible).style("display", "block");
13405
13413
  }).on("noteclick", function(annotation2) {
13406
- if (formatOptions.annotation.annotationDraggable) {
13414
+ if (formatOptions.annotation.annotationDraggable && isReportEditable) {
13407
13415
  annotation2.data.isVisible = false;
13408
13416
  oldAnnotationList.forEach((d) => {
13409
13417
  if (d.data.x.dimension == annotation2.data.x.dimension && d.data.x.legend == annotation2.data.x.legend && d.data.x.type == annotation2.data.x.type && d.data.prevValue == annotation2.data.prevValue) {
@@ -13427,8 +13435,8 @@
13427
13435
  const conditionallyResetOldAnnotations = (oldAnnotationList, formatOptions, chartType) => {
13428
13436
  try {
13429
13437
  let path2 = [
13430
- actualChartTypes.pie,
13431
- actualChartTypes.sunburst
13438
+ chartTypes.PieChart,
13439
+ chartTypes.DonutChart
13432
13440
  ].includes(chartType) ? "plotArea" : "annotation";
13433
13441
  const isDraggable = formatOptions[path2].annotationDraggable;
13434
13442
  const isMeasureReplaced = false;
@@ -13455,28 +13463,28 @@
13455
13463
  };
13456
13464
  const dataLabelsPosition = (yCordinate, position, yScale, minValue, prevValue, chartType) => {
13457
13465
  try {
13458
- let allStackCharts = [actualChartTypes.line, actualChartTypes.stackLine, actualChartTypes.stackArea, actualChartTypes.stackArea100, actualChartTypes.stackLine100, actualChartTypes.stackArea];
13466
+ let allStackCharts = [chartTypes.LineChart, chartTypes.StackLineChart, chartTypes.StackAreaChart, chartTypes.NormalizedStackAreaChart, chartTypes.NormalizedStackLineChart, chartTypes.StackAreaChart];
13459
13467
  prevValue ? prevValue : prevValue = 0;
13460
13468
  switch (position) {
13461
13469
  case 1:
13462
13470
  let yOffset;
13463
13471
  switch (chartType) {
13464
- case actualChartTypes.line:
13465
- case actualChartTypes.bar:
13466
- case actualChartTypes.column:
13467
- case actualChartTypes.area:
13468
- case actualChartTypes.stackArea:
13472
+ case chartTypes.LineChart:
13473
+ case chartTypes.HorizontalBarChart:
13474
+ case chartTypes.ColumnChart:
13475
+ case chartTypes.AreaChart:
13476
+ case chartTypes.StackAreaChart:
13469
13477
  yOffset = yCordinate < 0 ? yScale(yCordinate) + 7 : yScale(yCordinate) - 15;
13470
13478
  break;
13471
- case actualChartTypes.stackBar:
13472
- case actualChartTypes.stackLine100:
13473
- case actualChartTypes.stackLine:
13474
- case actualChartTypes.stackArea100:
13475
- case actualChartTypes.stackArea:
13476
- case actualChartTypes.stackColumn:
13479
+ case chartTypes.StackHorizontalBarChart:
13480
+ case chartTypes.NormalizedStackLineChart:
13481
+ case chartTypes.StackLineChart:
13482
+ case chartTypes.NormalizedStackAreaChart:
13483
+ case chartTypes.StackAreaChart:
13484
+ case chartTypes.StackColumnChart:
13477
13485
  yOffset = yCordinate < 0 ? yScale(yCordinate) + 5 : yScale(yCordinate) - 15;
13478
13486
  break;
13479
- case actualChartTypes.tornadoChart:
13487
+ case chartTypes.TornadoChart:
13480
13488
  yOffset = yScale(yCordinate) + yScale.bandwidth() / 2;
13481
13489
  break;
13482
13490
  default:
@@ -13553,19 +13561,19 @@
13553
13561
  let legendsParentTag = temp.append("foreignObject").attr("x", -margin.left).attr("y", tableStartY + yCordinate).attr("width", margin.left).attr("height", cellHeight2);
13554
13562
  let innerdiv = legendsParentTag.append("xhtml:div").style("display", "flex").style("justify-content", "flex-start").style("align-items", "center").attr("class", "parentClass").style("flex-wrap", "nowrap").style("pointer-events", "auto").style("width", cellWidth).style("height", `${cellHeight2}px`).style("padding-left", `5px`).style("padding-right", `3px`).style("border-width", getBorderStyle(formatOptions, i, void 0, dimensionCount, legendsCount, "width")).style("border-style", getBorderStyle(formatOptions, i, void 0, dimensionCount, legendsCount, "style")).style("border-color", getBorderStyle(formatOptions, i, void 0, dimensionCount, legendsCount, "color"));
13555
13563
  switch (chartType) {
13556
- case actualChartTypes.column:
13557
- case actualChartTypes.stackColumn:
13558
- case actualChartTypes.stackColumn100:
13564
+ case chartTypes.ColumnChart:
13565
+ case chartTypes.StackColumnChart:
13566
+ case chartTypes.NormalizedStackColumnChart:
13559
13567
  innerdiv.append("xhtml:div").style("height", "10px").style("width", "15px").style("background", data.properties.color).style("border-radius", "1px");
13560
13568
  break;
13561
- case actualChartTypes.line:
13562
- case actualChartTypes.stackLine:
13563
- case actualChartTypes.stackLine100:
13569
+ case chartTypes.LineChart:
13570
+ case chartTypes.StackLineChart:
13571
+ case chartTypes.NormalizedStackLineChart:
13564
13572
  getLineShape(data, innerdiv, formatOptions);
13565
13573
  break;
13566
- case actualChartTypes.area:
13567
- case actualChartTypes.stackArea:
13568
- case actualChartTypes.stackArea100:
13574
+ case chartTypes.AreaChart:
13575
+ case chartTypes.StackAreaChart:
13576
+ case chartTypes.NormalizedStackAreaChart:
13569
13577
  getAreaShape(data, innerdiv, formatOptions);
13570
13578
  break;
13571
13579
  }
@@ -13592,7 +13600,7 @@
13592
13600
  let cellHeight = 20;
13593
13601
  let yCordinate = 0;
13594
13602
  let calWidthForSeriesNames = calculatedRange[0] ? calculatedRange[0] : 0;
13595
- let isNormalizedChart = chartType == actualChartTypes.stackColumn100 || chartType == actualChartTypes.stackLine100 || chartType == actualChartTypes.stackArea100;
13603
+ let isNormalizedChart = chartType == chartTypes.NormalizedStackColumnChart || chartType == chartTypes.NormalizedStackLineChart || chartType == chartTypes.NormalizedStackAreaChart;
13596
13604
  let outerPadding = 2;
13597
13605
  let fontStyle = formatOptions.dataTableProperties.dataTableFontStyle;
13598
13606
  let legendStringMaxLength = 0;
@@ -14372,7 +14380,7 @@
14372
14380
  throw error;
14373
14381
  }
14374
14382
  }
14375
- function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d3Annotation2, labelExcludeList, individualLabelColor, oldAnnotationList, formatOptions, chartType, height, width, innerWidth2, dimensionList, innerHeight2, widgetId, svg, dataTableHeight, barChart) {
14383
+ function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d3Annotation2, labelExcludeList, individualLabelColor, oldAnnotationList, formatOptions, chartType, height, width, innerWidth2, dimensionList, innerHeight2, widgetId, svg, dataTableHeight, isReportEditable, barChart) {
14376
14384
  try {
14377
14385
  let fromReportBuilder = false;
14378
14386
  let annotationType = formatOptions.annotation.annotationType ?? "1";
@@ -14517,7 +14525,7 @@
14517
14525
  }
14518
14526
  finalAnnotationList.push(newAnnotation);
14519
14527
  });
14520
- makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && !(fromReportBuilder == void 0 && widgetId != void 0)).accessors({
14528
+ makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
14521
14529
  x: function(d) {
14522
14530
  if (barChart) {
14523
14531
  return dataLabelsPositionForBarChartFamily(formatOptions, d.x, parseFloat(d.position), yScaleLeft, minValue, d.prevValue, chartType);
@@ -14555,7 +14563,7 @@
14555
14563
  annotations.selectAll(".note-line").attr("hoverId", (d) => d.data.currentLegend).style("stroke", formatOptions.annotation.connectorColor || "#ccc").filter((d) => d._dx == 0 && d._dy == 0).remove();
14556
14564
  annotations.selectAll(".annotation-note-label").filter((d) => d.data && d.data.isVisible).style("display", "block");
14557
14565
  }).on("noteclick", function(annotation2) {
14558
- if (formatOptions.annotation.annotationDraggable) {
14566
+ if (formatOptions.annotation.annotationDraggable && isReportEditable) {
14559
14567
  annotation2.data.isVisible = false;
14560
14568
  oldAnnotationList.forEach((d) => {
14561
14569
  if (d.data.x == annotation2.data.x && d.data.y == annotation2.data.y) {
@@ -14643,12 +14651,12 @@
14643
14651
  ).map((d) => d) : responsiveDimList;
14644
14652
  gTag.selectAll("#yAxisRect").remove();
14645
14653
  gTag.selectAll("#yAxisG").remove();
14646
- let yRect = gTag.append("rect").attr("id", "yAxisRect").attr("transform", chartType === actualChartTypes.tornadoChart ? `translate(${-xLabelMargin - 20},0)` : `translate(${xaxisLabelPosition === 0 ? -xLabelMargin - 5 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0) + (-xLabelMargin - 5)},0)`).attr("height", innerHeight2).attr("width", chartType === actualChartTypes.tornadoChart ? xLabelMargin + 20 : xLabelMargin + 5).attr(
14654
+ let yRect = gTag.append("rect").attr("id", "yAxisRect").attr("transform", chartType === chartTypes.TornadoChart ? `translate(${-xLabelMargin - 20},0)` : `translate(${xaxisLabelPosition === 0 ? -xLabelMargin - 5 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0) + (-xLabelMargin - 5)},0)`).attr("height", innerHeight2).attr("width", chartType === chartTypes.TornadoChart ? xLabelMargin + 20 : xLabelMargin + 5).attr(
14647
14655
  "fill",
14648
14656
  formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !== "#ffffff" ? formatOptions.xAxisLabel.xAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
14649
14657
  );
14650
- const YaxisG = gTag.append("g").attr("id", "yAxisG").attr("transform", chartType === actualChartTypes.tornadoChart ? `translate(${xScaleBottom(0)},0)` : `translate(${xaxisLabelPosition === 0 ? 0 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0)},0)`).call(yAxis);
14651
- if (chartType !== actualChartTypes.tornadoChart) {
14658
+ const YaxisG = gTag.append("g").attr("id", "yAxisG").attr("transform", chartType === chartTypes.TornadoChart ? `translate(${xScaleBottom(0)},0)` : `translate(${xaxisLabelPosition === 0 ? 0 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0)},0)`).call(yAxis);
14659
+ if (chartType !== chartTypes.TornadoChart) {
14652
14660
  let foreignObject = YaxisG.selectAll("g").append("foreignObject").attr("class", "testingoverflowing").attr("width", xLabelMargin).attr("height", "20px").attr(
14653
14661
  "transform",
14654
14662
  `rotate(${90 - formatOptions.xAxisLabel.xAxisLabelRotation})
@@ -14662,7 +14670,7 @@
14662
14670
  formatOptions.xAxisLabel.xAxisLabelVisibility ? "visible" : "hidden"
14663
14671
  ).attr("title", (d, i) => formatedResponsiveDimList[i]).html((d, i) => formatedResponsiveDimList[i]);
14664
14672
  }
14665
- if (chartType === actualChartTypes.tornadoChart) {
14673
+ if (chartType === chartTypes.TornadoChart) {
14666
14674
  YaxisG.selectAll("text").attr("dx", `${-(xScaleBottom(yMaxLeft * 0.01) + 15)}px`).style("fill", formatOptions.xAxisLabel.xAxisLabelColor !== "#ffffff" ? formatOptions.xAxisLabel.xAxisLabelColor : "none").style("font-family", formatOptions.xAxisLabel.xAxisLabelFontFamily).style("color", formatOptions.xAxisLabel.xAxisLabelColor).style("font-size", formatOptions.xAxisLabel.xAxisLabelFontSize + "px").style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
14667
14675
  "text-decoration",
14668
14676
  fontStyle.includes("Underline") ? "Underline" : ""
@@ -14670,15 +14678,17 @@
14670
14678
  "visibility",
14671
14679
  formatOptions.xAxisLabel.xAxisLabelVisibility ? "visible" : "hidden"
14672
14680
  ).attr("title", (d, i) => responsiveXaxisLabel(dimensionList, innerWidth2)[i]).html((d, i) => responsiveXaxisLabel(dimensionList, innerWidth2)[i]);
14673
- const YaxisRightG = gTag.append("g").attr("transform", `translate(${xScaleBottom(0)},0)`).call(xAxisTop);
14674
- YaxisRightG.selectAll("line").style("shape-rendering", "crispEdges").style("stroke", formatOptions.plotArea.gridLinesColor).attr(
14675
- "visibility",
14676
- formatOptions.xAxisLabel.xAxisLabelVisibility ? "visible" : formatOptions.plotArea.gridLinesVertical ? "visible" : "hidden"
14677
- );
14678
- YaxisRightG.select(".domain").style("shape-rendering", "crispEdges").style(
14679
- "stroke",
14680
- formatOptions.xAxisLabel.xAxisColor
14681
- ).attr("stroke-width", formatOptions.xAxisLabel.xAxisWidth ? formatOptions.xAxisLabel.xAxisWidth : formatOptions.plotArea.plotAreaBorderThickness);
14681
+ if (xAxisTop) {
14682
+ const YaxisRightG = gTag.append("g").attr("transform", `translate(${xScaleBottom(0)},0)`).call(xAxisTop);
14683
+ YaxisRightG.selectAll("line").style("shape-rendering", "crispEdges").style("stroke", formatOptions.plotArea.gridLinesColor).attr(
14684
+ "visibility",
14685
+ formatOptions.xAxisLabel.xAxisLabelVisibility ? "visible" : formatOptions.plotArea.gridLinesVertical ? "visible" : "hidden"
14686
+ );
14687
+ YaxisRightG.select(".domain").style("shape-rendering", "crispEdges").style("stroke", formatOptions.xAxisLabel.xAxisColor).attr(
14688
+ "stroke-width",
14689
+ formatOptions.xAxisLabel.xAxisWidth ?? formatOptions.plotArea.plotAreaBorderThickness
14690
+ );
14691
+ }
14682
14692
  } else {
14683
14693
  YaxisG.selectAll("text").style(
14684
14694
  "visibility",
@@ -14705,7 +14715,7 @@
14705
14715
  formatOptions.plotArea.plotAreaDisplayUnits,
14706
14716
  formatOptions.annotation.annotationNumberFormat,
14707
14717
  formatOptions.annotation.annotationDecimalPrecision,
14708
- chartType === actualChartTypes.tornadoChart
14718
+ chartType === chartTypes.TornadoChart
14709
14719
  );
14710
14720
  const formattedLength = String(formattedValue).length;
14711
14721
  const scaledX = xScale(xCordinate);
@@ -14981,33 +14991,33 @@
14981
14991
  };
14982
14992
  const fileName$b = "CommonFunctions.ts";
14983
14993
  [
14984
- actualChartTypes.bar,
14985
- actualChartTypes.stackColumn,
14986
- actualChartTypes.stackColumn100,
14987
- actualChartTypes.line,
14988
- actualChartTypes.stackLine,
14989
- actualChartTypes.stackLine100,
14990
- actualChartTypes.area,
14991
- actualChartTypes.stackArea,
14992
- actualChartTypes.stackArea100
14994
+ chartTypes.ColumnChart,
14995
+ chartTypes.StackColumnChart,
14996
+ chartTypes.NormalizedStackColumnChart,
14997
+ chartTypes.LineChart,
14998
+ chartTypes.StackLineChart,
14999
+ chartTypes.NormalizedStackLineChart,
15000
+ chartTypes.AreaChart,
15001
+ chartTypes.StackAreaChart,
15002
+ chartTypes.NormalizedStackAreaChart
14993
15003
  ];
14994
15004
  [
14995
- actualChartTypes.pie,
14996
- actualChartTypes.pieOfPie,
14997
- actualChartTypes.sunburst,
14998
- actualChartTypes.pyramidChart,
14999
- actualChartTypes.organizationalChart,
15000
- actualChartTypes.vennDiagramChart,
15001
- actualChartTypes.progressChart,
15002
- actualChartTypes.maps,
15003
- actualChartTypes.wordCloud,
15004
- actualChartTypes.sankey,
15005
- actualChartTypes.speedometerChart,
15006
- actualChartTypes.radialBarChart
15005
+ chartTypes.PieChart,
15006
+ chartTypes.PieofPie,
15007
+ chartTypes.DonutChart,
15008
+ chartTypes.PyramidChart,
15009
+ chartTypes.OrganizationChart,
15010
+ chartTypes.VennChart,
15011
+ chartTypes.ProgressChart,
15012
+ chartTypes.Maps,
15013
+ chartTypes.WordCloud,
15014
+ chartTypes.SankeyChart,
15015
+ chartTypes.Speedometer,
15016
+ chartTypes.RadialBarChart
15007
15017
  ];
15008
- function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, inputSeries, chartId, legendShape) {
15018
+ function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, inputSeries, chartId, legendShape, chartType) {
15009
15019
  try {
15010
- let seriesData = [...inputSeries].reverse();
15020
+ let seriesData = chartType !== chartTypes.TornadoChart ? [...inputSeries].reverse() : [...inputSeries];
15011
15021
  let position = formatOptions.legends.legendPosition;
15012
15022
  let horizontalLegendAlignment = formatOptions.legends.legendAlignmentTopBottom;
15013
15023
  let verticalLegendAlignment = formatOptions.legends.legendAlignment;
@@ -15136,12 +15146,12 @@
15136
15146
  return Symbol$1().type(Markershapes(d.markerShape)).size(d.markerSize * 50)();
15137
15147
  }).attr("visibility", (d) => {
15138
15148
  const hideByX = !xScale(d.dimension) && xScale(d.dimension) !== 0;
15139
- const visible = formatOptions.marker.markerVisibility ? checkVisibleConditions(chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) ? "hidden" : [actualChartTypes.stackLine100, "CombiLine"].includes(type) ? "visible" : [actualChartTypes.stackArea, actualChartTypes.area, "CombiArea", "CombiStackArea"].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? "visible" : "hidden" : "visible" : type === "CombiLine" ? "visible" : ["Area", "CombiArea"].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? "visible" : "hidden" : "hidden";
15149
+ const visible = formatOptions.marker.markerVisibility ? checkVisibleConditions(chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) ? "hidden" : [chartTypes.NormalizedStackLineChart, "CombiLine"].includes(type) ? "visible" : [chartTypes.StackAreaChart, chartTypes.AreaChart, "CombiArea", "CombiStackArea"].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? "visible" : "hidden" : "visible" : type === "CombiLine" ? "visible" : ["Area", "CombiArea"].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? "visible" : "hidden" : "hidden";
15140
15150
  return hideByX ? "hidden" : visible;
15141
15151
  }).attr("transform", (d) => {
15142
15152
  let requiredYScale = d.axis == "Primary" ? yScale : yScaleRight;
15143
15153
  const x2 = xScale(d.dimension);
15144
- const y2 = [actualChartTypes.stackArea100, actualChartTypes.stackArea, actualChartTypes.stackLine, actualChartTypes.stackLine100, "CombiStackArea"].includes(type) ? d[1] > 0 ? requiredYScale(d[1]) : requiredYScale(d[0]) : requiredYScale(d.value);
15154
+ const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart, "CombiStackArea"].includes(type) ? d[1] > 0 ? requiredYScale(d[1]) : requiredYScale(d[0]) : requiredYScale(d.value);
15145
15155
  return `translate(${x2},${y2})`;
15146
15156
  }).on("mousemove", function(event2, d) {
15147
15157
  const dataPoint = d;
@@ -15158,7 +15168,7 @@
15158
15168
  {
15159
15169
  key: formatOptions.yAxisTitle.yAxisTitleText || dataPoint.value,
15160
15170
  value: getNumberWithFormat(
15161
- [actualChartTypes.stackLine100, actualChartTypes.stackArea100, ""].includes(type) ? dataPoint[1] - dataPoint[0] : dataPoint.value,
15171
+ [chartTypes.NormalizedStackLineChart, chartTypes.NormalizedStackAreaChart, ""].includes(type) ? dataPoint[1] - dataPoint[0] : dataPoint.value,
15162
15172
  formatOptions.toolTip.toolTipDisplayUnits,
15163
15173
  formatOptions.toolTip.toolTipNumberFormat,
15164
15174
  formatOptions.toolTip.toolTipDecimalPrecision
@@ -15180,12 +15190,12 @@
15180
15190
  parentG.selectAll(".halo").remove();
15181
15191
  parentG.insert("circle", ":first-child").attr("class", "halo").attr("cx", xScale(dataPoint.dimension)).attr("cy", () => {
15182
15192
  const requiredYScale = dataPoint.axis === "Primary" ? yScale : yScaleRight;
15183
- return [actualChartTypes.stackArea100, actualChartTypes.stackArea, actualChartTypes.stackLine, actualChartTypes.stackLine100, "CombiStackArea"].includes(type) ? dataPoint[1] > 0 ? requiredYScale(dataPoint[1]) : requiredYScale(dataPoint[0]) : requiredYScale(dataPoint.value);
15193
+ return [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart, "CombiStackArea"].includes(type) ? dataPoint[1] > 0 ? requiredYScale(dataPoint[1]) : requiredYScale(dataPoint[0]) : requiredYScale(dataPoint.value);
15184
15194
  }).attr("fill", legendEntry.markerColor).attr("opacity", 0.5).attr("r", legendEntry.markerSize * 10);
15185
15195
  select$2(this).transition().duration(100).attr("transform", () => {
15186
15196
  const requiredYScale = dataPoint.axis === "Primary" ? yScale : yScaleRight;
15187
15197
  const x2 = xScale(dataPoint.dimension);
15188
- const y2 = [actualChartTypes.stackArea100, actualChartTypes.stackArea, actualChartTypes.stackLine, actualChartTypes.stackLine100, "CombiStackArea"].includes(type) ? dataPoint[1] > 0 ? requiredYScale(dataPoint[1]) : requiredYScale(dataPoint[0]) : requiredYScale(dataPoint.value);
15198
+ const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart, "CombiStackArea"].includes(type) ? dataPoint[1] > 0 ? requiredYScale(dataPoint[1]) : requiredYScale(dataPoint[0]) : requiredYScale(dataPoint.value);
15189
15199
  return `translate(${x2},${y2}) scale(1.3)`;
15190
15200
  });
15191
15201
  }).on("mouseout", function(event2, d) {
@@ -15196,7 +15206,7 @@
15196
15206
  select$2(this).transition().duration(100).attr("transform", () => {
15197
15207
  const requiredYScale = dataPoint.axis === "Primary" ? yScale : yScaleRight;
15198
15208
  const x2 = xScale(dataPoint.dimension);
15199
- const y2 = [actualChartTypes.stackArea100, actualChartTypes.stackArea, actualChartTypes.stackLine, actualChartTypes.stackLine100, "CombiStackArea"].includes(type) ? dataPoint[1] > 0 ? requiredYScale(dataPoint[1]) : requiredYScale(dataPoint[0]) : requiredYScale(dataPoint.value);
15209
+ const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart, "CombiStackArea"].includes(type) ? dataPoint[1] > 0 ? requiredYScale(dataPoint[1]) : requiredYScale(dataPoint[0]) : requiredYScale(dataPoint.value);
15200
15210
  return `translate(${x2},${y2}) scale(1)`;
15201
15211
  });
15202
15212
  });
@@ -15240,7 +15250,7 @@
15240
15250
  { key: formatOptions.xAxisTitle.xAxisTitleText, value: lineData[legendIndex].data[dimensionIndex].dimension },
15241
15251
  {
15242
15252
  key: lineData[legendIndex].properties.currentMeasure ? lineData[legendIndex].properties.currentMeasure : this.basestyle.YAxisTitle.YAxisTitleText,
15243
- value: getNumberWithFormat(chartType === actualChartTypes.stackArea100 ? legendIndex === 0 ? lineData[legendIndex].data[dimensionIndex].value : lineData[legendIndex].data[dimensionIndex].value - lineData[legendIndex - 1].data[dimensionIndex].value : lineData[legendIndex].data[dimensionIndex].value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision)
15253
+ value: getNumberWithFormat(chartType === chartTypes.NormalizedStackAreaChart ? legendIndex === 0 ? lineData[legendIndex].data[dimensionIndex].value : lineData[legendIndex].data[dimensionIndex].value - lineData[legendIndex - 1].data[dimensionIndex].value : lineData[legendIndex].data[dimensionIndex].value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision)
15244
15254
  },
15245
15255
  { key: "Legend", value: lineData[legendIndex].data[dimensionIndex].legend.includes("~$~") ? lineData[legendIndex].data[dimensionIndex].legend.split("~$~")[1] : lineData[legendIndex].data[dimensionIndex].legend }
15246
15256
  // { key: "Calculated Tooltip", value: lineData[legendIndex].data[dimensionIndex]. },
@@ -15606,11 +15616,11 @@
15606
15616
  let customLegendShape;
15607
15617
  if (!legendShape) {
15608
15618
  let legendType = d.properties.type;
15609
- if (legendType == actualChartTypes.column || legendType == actualChartTypes.stackColumn) {
15619
+ if (legendType == chartTypes.ColumnChart || legendType == chartTypes.StackColumnChart) {
15610
15620
  customLegendShape = staticLegendShape.rectangle;
15611
- } else if (legendType == actualChartTypes.line || legendType == actualChartTypes.stackLine) {
15621
+ } else if (legendType == chartTypes.LineChart || legendType == chartTypes.StackLineChart) {
15612
15622
  customLegendShape = staticLegendShape.line;
15613
- } else if (legendType == actualChartTypes.area || legendType == actualChartTypes.stackArea) {
15623
+ } else if (legendType == chartTypes.AreaChart || legendType == chartTypes.StackAreaChart) {
15614
15624
  customLegendShape = staticLegendShape.areaWithLine;
15615
15625
  }
15616
15626
  }
@@ -16009,7 +16019,7 @@
16009
16019
  return {
16010
16020
  ...item,
16011
16021
  properties,
16012
- data: normalizedData
16022
+ data: item.data
16013
16023
  };
16014
16024
  });
16015
16025
  } catch (error) {
@@ -16129,12 +16139,13 @@
16129
16139
  const ColumnChart = ({
16130
16140
  isDateType,
16131
16141
  formatOptions,
16132
- data
16142
+ data,
16143
+ isReportEditable
16133
16144
  }) => {
16134
16145
  const chartId = crypto.randomUUID();
16135
16146
  let columnWidth = 0;
16136
16147
  let scrollbarVisible = false;
16137
- const chartType = actualChartTypes.column;
16148
+ const chartType = chartTypes.ColumnChart;
16138
16149
  const svgRef = require$$0$1.useRef();
16139
16150
  const seriesData = generalizedChartData(
16140
16151
  data.ChartData,
@@ -16568,8 +16579,8 @@
16568
16579
  key: formatOptions.yAxisTitle.yAxisTitleText || d.value,
16569
16580
  value: getNumberWithFormat(
16570
16581
  [
16571
- actualChartTypes.stackLine100,
16572
- actualChartTypes.stackArea100,
16582
+ chartTypes.NormalizedStackLineChart,
16583
+ chartTypes.NormalizedStackAreaChart,
16573
16584
  ""
16574
16585
  ].includes(chartType) ? d[1] - d[0] : d.value,
16575
16586
  formatOptions.toolTip.toolTipDisplayUnits,
@@ -16652,7 +16663,8 @@
16652
16663
  chartId,
16653
16664
  svg,
16654
16665
  xScaleForLegends,
16655
- columnWidth
16666
+ columnWidth,
16667
+ isReportEditable
16656
16668
  );
16657
16669
  addDataTable(
16658
16670
  formatOptions.plotArea.fitChart,
@@ -16693,13 +16705,14 @@
16693
16705
  const CustomColumnChart = ({
16694
16706
  isDateType,
16695
16707
  formatOptions,
16696
- data
16708
+ data,
16709
+ isReportEditable
16697
16710
  }) => {
16698
16711
  const chartId = crypto.randomUUID();
16699
16712
  let columnWidth = 0;
16700
16713
  let scrollbarVisible = false;
16701
16714
  let stackChartData = [];
16702
- const chartType = actualChartTypes.customColumnChart;
16715
+ const chartType = chartTypes.CustomColumnChart;
16703
16716
  const svgRef = require$$0$1.useRef();
16704
16717
  const seriesData = generalizedChartData(
16705
16718
  data.ChartData,
@@ -16741,6 +16754,7 @@
16741
16754
  let yScaleRight;
16742
16755
  let xScale;
16743
16756
  let xScaleForLegends;
16757
+ let calculatedRange;
16744
16758
  let stackAreaChartDataForPrimaryAxis = [];
16745
16759
  let stackAreaChartDataForSecondaryAxis = [];
16746
16760
  let stackColumnChartDataForPrimaryAxis = [];
@@ -16806,7 +16820,10 @@
16806
16820
  chartTitleHeight,
16807
16821
  secondaryAxisTitleWidth,
16808
16822
  legendMargin,
16809
- secondaryYLabel
16823
+ secondaryYLabel,
16824
+ visibleBars,
16825
+ columnWidth,
16826
+ scrollbarVisible
16810
16827
  } = marginCalculation(
16811
16828
  // for all margin related calculations
16812
16829
  width,
@@ -16942,27 +16959,27 @@
16942
16959
  let yMinRight = Infinity;
16943
16960
  let tempChartData = [];
16944
16961
  seriesData.forEach((series, i) => {
16945
- if (![actualChartTypes.stackColumn, actualChartTypes.stackArea].includes(series.properties.type)) {
16962
+ if (![chartTypes.StackColumnChart, chartTypes.StackAreaChart].includes(series.properties.type)) {
16946
16963
  tempChartData.push(series);
16947
- series.properties.type !== actualChartTypes.line && legendList.push(series.legend);
16964
+ series.properties.type !== chartTypes.LineChart && legendList.push(series.legend);
16948
16965
  } else if (!legendList.includes("stackLegend")) {
16949
16966
  legendList.push(`stackLegend`);
16950
16967
  }
16951
16968
  if (series.properties.axis === "Secondary") {
16952
16969
  secondaryStackAxisData.push(series);
16953
- if (series.properties.type == actualChartTypes.stackColumn) {
16970
+ if (series.properties.type == chartTypes.StackColumnChart) {
16954
16971
  secondaryStackColumnAxisData.push(series);
16955
16972
  }
16956
- if (series.properties.type == actualChartTypes.stackArea) {
16973
+ if (series.properties.type == chartTypes.StackAreaChart) {
16957
16974
  secondaryStackAreaAxisData.push(series);
16958
16975
  }
16959
16976
  }
16960
16977
  if (series.properties.axis === "Primary") {
16961
16978
  primaryStackAxisData.push(series);
16962
- if (series.properties.type == actualChartTypes.stackColumn) {
16979
+ if (series.properties.type == chartTypes.StackColumnChart) {
16963
16980
  primaryStackColumnAxisData.push(series);
16964
16981
  }
16965
- if (series.properties.type == actualChartTypes.stackArea) {
16982
+ if (series.properties.type == chartTypes.StackAreaChart) {
16966
16983
  primaryStackAreaAxisData.push(series);
16967
16984
  }
16968
16985
  }
@@ -17174,6 +17191,13 @@
17174
17191
  0
17175
17192
  ]);
17176
17193
  }
17194
+ calculatedRange = [0, innerWidth2];
17195
+ };
17196
+ const getXScale = () => {
17197
+ xScaleForLegends = band().domain(chartJSON.legendList).range([0, columnWidth]).paddingInner(
17198
+ chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
17199
+ );
17200
+ xScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
17177
17201
  };
17178
17202
  const initAxis = () => {
17179
17203
  {
@@ -17226,23 +17250,28 @@
17226
17250
  ).tickPadding(8).tickSizeOuter(0);
17227
17251
  }
17228
17252
  };
17253
+ const getXAxis = () => {
17254
+ xAxis = axisBottom(xScale).tickSize(
17255
+ formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? formatOptions.plotArea.gridLinesVertical ? -(dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2) : parseFloat(formatOptions.plotArea.ticksHeight) * ((dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2) / 100) * (formatOptions.xAxisLabel.xAxisPosition == "1" ? 1 : -1) : 0 : 0
17256
+ ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
17257
+ };
17229
17258
  const getChartType = (lineData) => {
17230
17259
  lineData.forEach((data2) => {
17231
17260
  switch (data2.properties.type) {
17232
- case actualChartTypes.column:
17261
+ case chartTypes.ColumnChart:
17233
17262
  drawColumnChart(data2);
17234
17263
  break;
17235
- case actualChartTypes.line:
17264
+ case chartTypes.LineChart:
17236
17265
  drawLineChart([data2]);
17237
17266
  break;
17238
- case actualChartTypes.area:
17267
+ case chartTypes.AreaChart:
17239
17268
  drawAreaChart([data2]);
17240
17269
  break;
17241
- case actualChartTypes.stackColumn:
17270
+ case chartTypes.StackColumnChart:
17242
17271
  stackColumnData = createStackData(data2);
17243
17272
  drawStackColumnChart();
17244
17273
  break;
17245
- case actualChartTypes.stackArea:
17274
+ case chartTypes.StackAreaChart:
17246
17275
  stackAreaData = createStackData(data2);
17247
17276
  drawStackAreaChart(data2);
17248
17277
  break;
@@ -17291,8 +17320,8 @@
17291
17320
  key: formatOptions.yAxisTitle.yAxisTitleText || d.value,
17292
17321
  value: getNumberWithFormat(
17293
17322
  [
17294
- actualChartTypes.stackLine100,
17295
- actualChartTypes.stackArea100,
17323
+ chartTypes.NormalizedStackLineChart,
17324
+ chartTypes.NormalizedStackAreaChart,
17296
17325
  ""
17297
17326
  ].includes(chartType) ? d[1] - d[0] : d.value,
17298
17327
  formatOptions.toolTip.toolTipDisplayUnits,
@@ -17547,7 +17576,7 @@
17547
17576
  );
17548
17577
  filteredData = JSON.parse(JSON.stringify(requiredData));
17549
17578
  filteredData.forEach((data2, i) => {
17550
- if (data2.properties.type === actualChartTypes.stackColumn || data2.properties.type === actualChartTypes.stackArea) {
17579
+ if (data2.properties.type === chartTypes.StackColumnChart || data2.properties.type === chartTypes.StackAreaChart) {
17551
17580
  data2.data.forEach(
17552
17581
  (stackData, pos) => filteredData[i].data[pos]["data"] = stackData.data.filter(
17553
17582
  (d) => filteredDimension.includes(d.dimension)
@@ -17562,6 +17591,8 @@
17562
17591
  drawCustomChart();
17563
17592
  };
17564
17593
  const drawCustomChart = () => {
17594
+ getXScale();
17595
+ getXAxis();
17565
17596
  getChartType(filteredData);
17566
17597
  initXaxis$1(
17567
17598
  gTag,
@@ -17604,7 +17635,8 @@
17604
17635
  innerHeight2,
17605
17636
  chartId,
17606
17637
  svg,
17607
- xScaleForLegends
17638
+ xScaleForLegends,
17639
+ isReportEditable
17608
17640
  );
17609
17641
  };
17610
17642
  const createStackData = (requiredStackChatData) => {
@@ -17663,11 +17695,12 @@
17663
17695
  const LayeredColumnChart = ({
17664
17696
  isDateType,
17665
17697
  formatOptions,
17666
- data
17698
+ data,
17699
+ isReportEditable
17667
17700
  }) => {
17668
17701
  const chartId = crypto.randomUUID();
17669
17702
  let columnWidth = 0;
17670
- const chartType = actualChartTypes.layeredColumnChart;
17703
+ const chartType = chartTypes.LayeredColumnChart;
17671
17704
  const svgRef = require$$0$1.useRef();
17672
17705
  const seriesData = generalizedChartData(
17673
17706
  data.ChartData,
@@ -18046,8 +18079,8 @@
18046
18079
  key: formatOptions.yAxisTitle.yAxisTitleText || d.value,
18047
18080
  value: getNumberWithFormat(
18048
18081
  [
18049
- actualChartTypes.stackLine100,
18050
- actualChartTypes.stackArea100,
18082
+ chartTypes.NormalizedStackLineChart,
18083
+ chartTypes.NormalizedStackAreaChart,
18051
18084
  ""
18052
18085
  ].includes(chartType) ? d[1] - d[0] : d.value,
18053
18086
  formatOptions.toolTip.toolTipDisplayUnits,
@@ -18124,7 +18157,8 @@
18124
18157
  chartId,
18125
18158
  svg,
18126
18159
  void 0,
18127
- columnWidth
18160
+ columnWidth,
18161
+ isReportEditable
18128
18162
  );
18129
18163
  if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
18130
18164
  if (formatOptions.xAxisLabel.xAxisPosition != "1")
@@ -18141,7 +18175,7 @@
18141
18175
  void 0,
18142
18176
  void 0,
18143
18177
  dataTableHeight,
18144
- actualChartTypes.column,
18178
+ chartTypes.ColumnChart,
18145
18179
  formatOptions,
18146
18180
  yLabel,
18147
18181
  yTitle,
@@ -18174,12 +18208,13 @@
18174
18208
  const StackColumnChart = ({
18175
18209
  isDateType,
18176
18210
  formatOptions,
18177
- data
18211
+ data,
18212
+ isReportEditable
18178
18213
  }) => {
18179
18214
  const chartId = crypto.randomUUID();
18180
18215
  let columnWidth = 0;
18181
18216
  let scrollbarVisible = false;
18182
- const chartType = actualChartTypes.stackColumn;
18217
+ const chartType = chartTypes.StackColumnChart;
18183
18218
  const svgRef = require$$0$1.useRef();
18184
18219
  const seriesData = generalizedChartData(
18185
18220
  data.ChartData,
@@ -18626,7 +18661,9 @@
18626
18661
  filteredDimension,
18627
18662
  innerHeight2,
18628
18663
  chartId,
18629
- svg
18664
+ svg,
18665
+ dataTableHeight,
18666
+ isReportEditable
18630
18667
  );
18631
18668
  if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
18632
18669
  if (formatOptions.xAxisLabel.xAxisPosition != "1") {
@@ -18895,11 +18932,12 @@
18895
18932
  const NormalizedStackColumnChart = ({
18896
18933
  isDateType,
18897
18934
  formatOptions,
18898
- data
18935
+ data,
18936
+ isReportEditable
18899
18937
  }) => {
18900
18938
  const chartId = crypto.randomUUID();
18901
18939
  let columnWidth = 0;
18902
- const chartType = actualChartTypes.stackColumn100;
18940
+ const chartType = chartTypes.NormalizedStackColumnChart;
18903
18941
  const svgRef = require$$0$1.useRef();
18904
18942
  const seriesData = generalizedChartData(
18905
18943
  data.ChartData,
@@ -19350,7 +19388,9 @@
19350
19388
  filteredDimension,
19351
19389
  innerHeight2,
19352
19390
  chartId,
19353
- svg
19391
+ svg,
19392
+ dataTableHeight,
19393
+ isReportEditable
19354
19394
  );
19355
19395
  if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
19356
19396
  if (formatOptions.xAxisLabel.xAxisPosition != "1") {
@@ -19674,7 +19714,7 @@
19674
19714
  ).attr(
19675
19715
  "transform",
19676
19716
  !formatOptions.plotArea.fitChart && chartsWithXScrollFlag ? `translate(${margin.left},${margin.top + innerHeight2 + (formatOptions?.xAxisLabel?.xAxisPosition == "1" ? 0 : xLabel)})` : !formatOptions.plotArea.fitChart && chartsWithYScrollFlag ? `translate(${margin.left},${height - xTitle - 5})` : `translate(${margin.left},${margin.top + innerHeight2 + (chartsWithXScrollFlag ? formatOptions?.xAxisLabel?.xAxisPosition == "1" ? 0 : xLabel : chartType == "tornado" ? xLabel + 5 : yLabel + 5)})`
19677
- // `translate(${margin.left},${Margin.top + innerHeight + (chartsWithXScrollFlag ? (formatOptions?.xAxisLabel?.xAxisPosition == "1" ? 0 : Xlabel) : (attributes.type == ActualChartTypes.TornadoChart) ? Xlabel + 5 : yLabel + 5) })`
19717
+ // `translate(${margin.left},${Margin.top + innerHeight + (chartsWithXScrollFlag ? (formatOptions?.xAxisLabel?.xAxisPosition == "1" ? 0 : Xlabel) : (attributes.type == chartTypes.TornadoChart) ? Xlabel + 5 : yLabel + 5) })`
19678
19718
  ).attr("class", "xAxisTitle").attr("width", innerWidth2).attr("height", xTitle + "px").style("z-index", "9999");
19679
19719
  if (formatOptions.xAxisTitle.xAxisDynamicTitleText.length !== 0) {
19680
19720
  object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", formatOptions.xAxisTitle.xAxisTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").html(
@@ -19931,7 +19971,7 @@
19931
19971
  }) => {
19932
19972
  const chartId = crypto.randomUUID();
19933
19973
  const columnWidth = 0;
19934
- const chartType = actualChartTypes.columnHistogram;
19974
+ const chartType = chartTypes.ColumnHistogramChart;
19935
19975
  const svgRef = require$$0$1.useRef();
19936
19976
  const seriesData = data.ChartData;
19937
19977
  const dimensionList = data.DimensionList;
@@ -20415,11 +20455,12 @@
20415
20455
  const LineChart = ({
20416
20456
  isDateType,
20417
20457
  formatOptions,
20418
- data
20458
+ data,
20459
+ isReportEditable
20419
20460
  }) => {
20420
20461
  const chartId = crypto.randomUUID();
20421
20462
  const barWidth = 0;
20422
- const chartType = actualChartTypes.line;
20463
+ const chartType = chartTypes.LineChart;
20423
20464
  const svgRef = require$$0$1.useRef();
20424
20465
  const seriesData = generalizedChartData(
20425
20466
  data.ChartData,
@@ -20910,7 +20951,8 @@
20910
20951
  filteredDimension,
20911
20952
  innerHeight2,
20912
20953
  chartId,
20913
- svg
20954
+ svg,
20955
+ isReportEditable
20914
20956
  );
20915
20957
  let newSeriesLabelArray = prepareDataForSeriesLabel(
20916
20958
  innerWidth2,
@@ -20963,11 +21005,12 @@
20963
21005
  const StackLineChart = ({
20964
21006
  isDateType,
20965
21007
  formatOptions,
20966
- data
21008
+ data,
21009
+ isReportEditable
20967
21010
  }) => {
20968
21011
  const chartId = crypto.randomUUID();
20969
21012
  const barWidth = 0;
20970
- const chartType = actualChartTypes.stackLine;
21013
+ const chartType = chartTypes.StackLineChart;
20971
21014
  const svgRef = require$$0$1.useRef();
20972
21015
  const seriesData = generalizedChartData(
20973
21016
  data.ChartData,
@@ -21411,7 +21454,9 @@
21411
21454
  filteredDimension,
21412
21455
  innerHeight2,
21413
21456
  chartId,
21414
- svg
21457
+ svg,
21458
+ dataTableHeight,
21459
+ isReportEditable
21415
21460
  );
21416
21461
  let newSeriesLabelArray = prepareDataForSeriesLabel(
21417
21462
  innerWidth2,
@@ -21498,11 +21543,12 @@
21498
21543
  const NormalisedStackLineChart = ({
21499
21544
  isDateType,
21500
21545
  formatOptions,
21501
- data
21546
+ data,
21547
+ isReportEditable
21502
21548
  }) => {
21503
21549
  const chartId = crypto.randomUUID();
21504
21550
  const barWidth = 0;
21505
- const chartType = actualChartTypes.stackLine100;
21551
+ const chartType = chartTypes.NormalizedStackLineChart;
21506
21552
  const svgRef = require$$0$1.useRef();
21507
21553
  const seriesData = generalizedChartData(
21508
21554
  data.ChartData,
@@ -21908,7 +21954,9 @@
21908
21954
  filteredDimension,
21909
21955
  innerHeight2,
21910
21956
  chartId,
21911
- svg
21957
+ svg,
21958
+ dataTableHeight,
21959
+ isReportEditable
21912
21960
  );
21913
21961
  let newSeriesLabelArray = prepareDataForSeriesLabel(
21914
21962
  innerWidth2,
@@ -21988,11 +22036,12 @@
21988
22036
  const HorizontalBarChart = ({
21989
22037
  isDateType,
21990
22038
  formatOptions,
21991
- data
22039
+ data,
22040
+ isReportEditable
21992
22041
  }) => {
21993
22042
  const chartId = crypto.randomUUID();
21994
22043
  let columnWidth = 0;
21995
- const chartType = actualChartTypes.horizontalBar;
22044
+ const chartType = chartTypes.HorizontalBarChart;
21996
22045
  const svgRef = require$$0$1.useRef();
21997
22046
  const seriesData = generalizedChartData(
21998
22047
  data.ChartData,
@@ -22385,7 +22434,7 @@
22385
22434
  {
22386
22435
  key: formatOptions.yAxisTitle.yAxisTitleText || d.value,
22387
22436
  value: getNumberWithFormat(
22388
- [actualChartTypes.stackLine100, actualChartTypes.stackArea100, ""].includes(chartType) ? d[1] - d[0] : d.value,
22437
+ [chartTypes.NormalizedStackLineChart, chartTypes.NormalizedStackAreaChart, ""].includes(chartType) ? d[1] - d[0] : d.value,
22389
22438
  formatOptions.toolTip.toolTipDisplayUnits,
22390
22439
  formatOptions.toolTip.toolTipNumberFormat,
22391
22440
  formatOptions.toolTip.toolTipDecimalPrecision
@@ -22468,6 +22517,7 @@
22468
22517
  yScaleLegends,
22469
22518
  columnWidth,
22470
22519
  false,
22520
+ isReportEditable,
22471
22521
  barChart
22472
22522
  );
22473
22523
  };
@@ -22484,11 +22534,12 @@
22484
22534
  const StackHorizontalChart = ({
22485
22535
  isDateType,
22486
22536
  formatOptions,
22487
- data
22537
+ data,
22538
+ isReportEditable
22488
22539
  }) => {
22489
22540
  const chartId = crypto.randomUUID();
22490
22541
  let columnWidth = 0;
22491
- const chartType = actualChartTypes.stackBar;
22542
+ const chartType = chartTypes.StackHorizontalBarChart;
22492
22543
  const svgRef = require$$0$1.useRef();
22493
22544
  const seriesData = generalizedChartData(
22494
22545
  data.ChartData,
@@ -22922,6 +22973,7 @@
22922
22973
  chartId,
22923
22974
  svg,
22924
22975
  0,
22976
+ isReportEditable,
22925
22977
  barChart
22926
22978
  );
22927
22979
  getConnectors();
@@ -23174,11 +23226,12 @@
23174
23226
  const NormalizedStackHorizontalBarChart = ({
23175
23227
  isDateType,
23176
23228
  formatOptions,
23177
- data
23229
+ data,
23230
+ isReportEditable
23178
23231
  }) => {
23179
23232
  const chartId = crypto.randomUUID();
23180
23233
  let columnWidth = 0;
23181
- const chartType = actualChartTypes.stackBar100;
23234
+ const chartType = chartTypes.NormalizedStackHorizontalBarChart;
23182
23235
  const svgRef = require$$0$1.useRef();
23183
23236
  const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse();
23184
23237
  const dimensionList = data.DimensionList;
@@ -23584,6 +23637,7 @@
23584
23637
  chartId,
23585
23638
  svg,
23586
23639
  0,
23640
+ isReportEditable,
23587
23641
  barChart
23588
23642
  );
23589
23643
  };
@@ -23634,11 +23688,12 @@
23634
23688
  const LayeredHorizontalBarChart = ({
23635
23689
  isDateType,
23636
23690
  formatOptions,
23637
- data
23691
+ data,
23692
+ isReportEditable
23638
23693
  }) => {
23639
23694
  const chartId = crypto.randomUUID();
23640
23695
  let columnWidth = 0;
23641
- const chartType = actualChartTypes.layeredBarChart;
23696
+ const chartType = chartTypes.LayeredHorizontalBarChart;
23642
23697
  const svgRef = require$$0$1.useRef();
23643
23698
  const seriesData = generalizedChartData(
23644
23699
  data.ChartData,
@@ -23985,8 +24040,8 @@
23985
24040
  key: formatOptions.yAxisTitle.yAxisTitleText || d.value,
23986
24041
  value: getNumberWithFormat(
23987
24042
  [
23988
- actualChartTypes.stackLine100,
23989
- actualChartTypes.stackArea100,
24043
+ chartTypes.NormalizedStackLineChart,
24044
+ chartTypes.NormalizedStackAreaChart,
23990
24045
  ""
23991
24046
  ].includes(chartType) ? d[1] - d[0] : d.value,
23992
24047
  formatOptions.toolTip.toolTipDisplayUnits,
@@ -24074,6 +24129,7 @@
24074
24129
  yScale,
24075
24130
  columnWidth,
24076
24131
  false,
24132
+ isReportEditable,
24077
24133
  barChart
24078
24134
  );
24079
24135
  getConnectors();
@@ -24315,7 +24371,7 @@
24315
24371
  }) => {
24316
24372
  const chartId = crypto.randomUUID();
24317
24373
  const columnWidth = 0;
24318
- const chartType = actualChartTypes.columnHistogram;
24374
+ const chartType = chartTypes.ColumnHistogramChart;
24319
24375
  const svgRef = require$$0$1.useRef();
24320
24376
  const seriesData = data.ChartData;
24321
24377
  const dimensionList = data.DimensionList;
@@ -24782,11 +24838,12 @@
24782
24838
  const AreaChart = ({
24783
24839
  isDateType,
24784
24840
  formatOptions,
24785
- data
24841
+ data,
24842
+ isReportEditable
24786
24843
  }) => {
24787
24844
  const chartId = crypto.randomUUID();
24788
24845
  const barWidth = 0;
24789
- const chartType = actualChartTypes.area;
24846
+ const chartType = chartTypes.AreaChart;
24790
24847
  const svgRef = require$$0$1.useRef();
24791
24848
  const seriesData = generalizedChartData(
24792
24849
  data.ChartData,
@@ -25251,7 +25308,8 @@
25251
25308
  filteredDimension,
25252
25309
  innerHeight2,
25253
25310
  chartId,
25254
- svg
25311
+ svg,
25312
+ isReportEditable
25255
25313
  );
25256
25314
  let newSeriesLabelArray = prepareDataForSeriesLabel(
25257
25315
  innerWidth2,
@@ -25305,11 +25363,12 @@
25305
25363
  const StackAreaChart = ({
25306
25364
  isDateType,
25307
25365
  formatOptions,
25308
- data
25366
+ data,
25367
+ isReportEditable
25309
25368
  }) => {
25310
25369
  const chartId = crypto.randomUUID();
25311
25370
  const barWidth = 0;
25312
- const chartType = actualChartTypes.stackArea;
25371
+ const chartType = chartTypes.StackAreaChart;
25313
25372
  const svgRef = require$$0$1.useRef();
25314
25373
  const seriesData = generalizedChartData(
25315
25374
  data.ChartData,
@@ -25790,7 +25849,9 @@
25790
25849
  filteredDimension,
25791
25850
  innerHeight2,
25792
25851
  chartId,
25793
- svg
25852
+ svg,
25853
+ dataTableHeight,
25854
+ isReportEditable
25794
25855
  );
25795
25856
  let newSeriesLabelArray = prepareDataForSeriesLabel(
25796
25857
  innerWidth2,
@@ -25870,11 +25931,12 @@
25870
25931
  const NormalizedStackAreaChart = ({
25871
25932
  isDateType,
25872
25933
  formatOptions,
25873
- data
25934
+ data,
25935
+ isReportEditable
25874
25936
  }) => {
25875
25937
  const chartId = crypto.randomUUID();
25876
25938
  const barWidth = 0;
25877
- const chartType = actualChartTypes.stackArea100;
25939
+ const chartType = chartTypes.NormalizedStackAreaChart;
25878
25940
  const svgRef = require$$0$1.useRef();
25879
25941
  const seriesData = generalizedChartData(
25880
25942
  data.ChartData,
@@ -26351,7 +26413,9 @@
26351
26413
  filteredDimension,
26352
26414
  innerHeight2,
26353
26415
  chartId,
26354
- svg
26416
+ svg,
26417
+ dataTableHeight,
26418
+ isReportEditable
26355
26419
  );
26356
26420
  let newSeriesLabelArray = prepareDataForSeriesLabel(
26357
26421
  innerWidth2,
@@ -53163,7 +53227,7 @@
53163
53227
  const chartId = crypto.randomUUID?.();
53164
53228
  let columnWidth = 0;
53165
53229
  let colorScale;
53166
- const chartType = actualChartTypes.waterfall;
53230
+ const chartType = chartTypes.WaterfallChart;
53167
53231
  const svgRef = require$$0$1.useRef();
53168
53232
  const seriesData = generalizedChartData(data.ChartData, data.DimensionList);
53169
53233
  const dimensionList = data.DimensionList;
@@ -53795,11 +53859,12 @@
53795
53859
  const TornadoChart = ({
53796
53860
  isDateType,
53797
53861
  formatOptions,
53798
- data
53862
+ data,
53863
+ isReportEditable
53799
53864
  }) => {
53800
53865
  const chartId = crypto.randomUUID();
53801
53866
  let columnWidth = 0;
53802
- const chartType = actualChartTypes.tornadoChart;
53867
+ const chartType = chartTypes.TornadoChart;
53803
53868
  const svgRef = require$$0$1.useRef();
53804
53869
  const seriesData = generalizedChartData(data.ChartData, data.DimensionList);
53805
53870
  const dimensionList = data.DimensionList;
@@ -53835,13 +53900,11 @@
53835
53900
  let svg;
53836
53901
  let gTag;
53837
53902
  let yScaleLeft;
53838
- let yScaleRight;
53839
53903
  let xScale;
53840
53904
  let xScaleForLegends;
53841
53905
  let calculatedRange;
53842
53906
  let yAxisLeft;
53843
53907
  let xAxis;
53844
- let yAxisRight;
53845
53908
  let filteredDimension;
53846
53909
  let filteredData = [];
53847
53910
  let isSensitivityChart = false;
@@ -53852,7 +53915,7 @@
53852
53915
  chartType,
53853
53916
  chartData: [],
53854
53917
  formatOptions,
53855
- legendList: [],
53918
+ legendList: data.LegendList,
53856
53919
  secondaryAxisDrawn: false,
53857
53920
  yMaxLeft: 0,
53858
53921
  yMaxRight: 0,
@@ -53901,7 +53964,7 @@
53901
53964
  maxNumberForSecondaryAxis,
53902
53965
  chartJSON.yMaxLeft,
53903
53966
  formatOptions,
53904
- chartJSON.legendList,
53967
+ chartJSON.legendList.map((d) => d["alias"]),
53905
53968
  chartJSON.dimensionList,
53906
53969
  chartJSON.yMaxRight,
53907
53970
  isSecondaryAxisDrawn,
@@ -53942,7 +54005,7 @@
53942
54005
  innerHeight2,
53943
54006
  innerWidth2,
53944
54007
  yAxisLeft,
53945
- yAxisRight,
54008
+ null,
53946
54009
  xScale,
53947
54010
  chartJSON.yMaxLeft,
53948
54011
  chartJSON.dimensionList,
@@ -54024,53 +54087,59 @@
54024
54087
  width,
54025
54088
  legendMargin,
54026
54089
  formatOptions,
54027
- seriesData,
54090
+ mapSeriesDataWithLegendList(seriesData, chartJSON.legendList),
54028
54091
  chartId,
54029
- staticLegendShape.rectangle
54092
+ staticLegendShape.rectangle,
54093
+ chartType
54094
+ );
54095
+ };
54096
+ const mapSeriesDataWithLegendList = (seriesData2, legendList) => {
54097
+ return seriesData2.map((series, index2) => ({
54098
+ ...series,
54099
+ properties: legendList[index2] ? { ...legendList[index2] } : {}
54100
+ })).filter(
54101
+ (series) => series.properties && Object.keys(series.properties).length > 0
54030
54102
  );
54031
54103
  };
54032
54104
  const preProcessChartData = () => {
54033
- const allChartData = [];
54034
- const legendList = [];
54035
- let formatedDimensionList = [];
54036
- let firstMeasure = seriesData[0]?.properties.currentMeasure;
54105
+ const firstMeasure = seriesData[0]?.properties.currentMeasure;
54037
54106
  let yMaxLeft = 0;
54038
54107
  let yMaxRight = -Infinity;
54039
- seriesData.forEach((series) => {
54040
- legendList.push(series.legend);
54041
- series.data.forEach((point2) => {
54042
- if (series.properties.currentMeasure === firstMeasure) {
54043
- point2.value = -point2.value;
54044
- }
54045
- allChartData.push(point2);
54108
+ const processedSeriesData = seriesData.map((series) => {
54109
+ const isFirstMeasure = series.properties.currentMeasure === firstMeasure;
54110
+ const newData = series.data.map((point2) => {
54111
+ const newValue = isFirstMeasure ? -Math.abs(point2.value) : Math.abs(point2.value);
54112
+ return {
54113
+ ...point2,
54114
+ value: newValue
54115
+ };
54046
54116
  });
54047
- let measuresArray = series.data.map((d) => d.value);
54048
- if (series.properties.currentMeasure === firstMeasure) {
54049
- yMaxLeft = Math.min(yMaxLeft, Math.min(...measuresArray));
54050
- } else {
54051
- yMaxRight = Math.max(yMaxRight, Math.max(...measuresArray));
54052
- }
54117
+ const values = newData.map((d) => d.value);
54118
+ if (isFirstMeasure) yMaxLeft = Math.min(yMaxLeft, Math.min(...values));
54119
+ else yMaxRight = Math.max(yMaxRight, Math.max(...values));
54120
+ return {
54121
+ ...series,
54122
+ data: newData
54123
+ };
54053
54124
  });
54054
- chartJSON.chartData = allChartData;
54055
- chartJSON.legendList = legendList;
54125
+ chartJSON.chartData = processedSeriesData;
54056
54126
  chartJSON.yMaxLeft = yMaxLeft;
54057
54127
  chartJSON.yMaxRight = yMaxRight;
54058
- formatedDimensionList = isDateType ? setDateFormats(
54128
+ const formatedDimensionList = isDateType ? setDateFormats(
54059
54129
  formatOptions.xAxisLabel.xAxisNumberFormat,
54060
54130
  chartJSON.dimensionList
54061
- ).map((d) => d) : chartJSON.dimensionList;
54131
+ ) : chartJSON.dimensionList;
54062
54132
  chartJSON.dimensionList.forEach((dim, i) => {
54063
- chartJSON.formattedDimensionListMap.set(dim, formatedDimensionList[i]);
54064
- });
54065
- filteredData = JSON.parse(JSON.stringify(seriesData));
54066
- if (!formatOptions.plotArea.fitChart) {
54067
- filteredDimension = chartJSON.dimensionList.slice(
54068
- scrollPosition,
54069
- scrollPosition + visibleBars
54133
+ chartJSON.formattedDimensionListMap.set(
54134
+ dim,
54135
+ formatedDimensionList[i]
54070
54136
  );
54071
- } else {
54072
- filteredDimension = chartJSON.dimensionList;
54073
- }
54137
+ });
54138
+ filteredData = JSON.parse(JSON.stringify(processedSeriesData));
54139
+ filteredDimension = !formatOptions.plotArea.fitChart ? chartJSON.dimensionList.slice(
54140
+ scrollPosition,
54141
+ scrollPosition + visibleBars
54142
+ ) : chartJSON.dimensionList;
54074
54143
  if (formatOptions.plotArea.hideZeroValues) {
54075
54144
  chartJSON.hideZeroValues = true;
54076
54145
  }
@@ -54089,18 +54158,7 @@
54089
54158
  }
54090
54159
  let adjustedPosition = formatOptions.annotation.annotationVisibility != "5" && formatOptions.annotation.annotationPosition == "1" ? 20 : 0;
54091
54160
  let scaleFactor = formatOptions.annotation.annotationVisibility != "5" ? chartJSON.yMaxLeft / maxValue !== 1 ? Math.abs(chartJSON.yMaxLeft / maxValue) * 100 < 10 ? 3 : 0 : Math.abs(chartJSON.yMaxRight / maxValue) * 100 < 10 ? 3 : 0 : 0;
54092
- let yAxisLabelArray = responsiveYaxisLabel$1(
54093
- chartJSON.yMaxRight,
54094
- chartJSON.yMaxLeft,
54095
- innerHeight2,
54096
- formatOptions,
54097
- chartJSON,
54098
- customYaxisMinValue,
54099
- customYaxisMaxValue,
54100
- barChart,
54101
- innerWidth2
54102
- ).yAxisLabelArray;
54103
- chartJSON.yMaxLeft = yAxisLabelArray[0];
54161
+ chartJSON.yMaxLeft = chartJSON.yMaxLeft;
54104
54162
  xScaleForLegends = linear$1().domain([chartJSON.yMaxLeft * (1.2 + (left2 ? scaleFactor : 0)), chartJSON.yMaxRight * (1.2 + (right2 ? scaleFactor : 0))]).range([adjustedPosition, innerWidth2 - adjustedPosition]);
54105
54163
  xScale = xScaleForLegends;
54106
54164
  calculatedRange = [0, innerWidth2];
@@ -54114,7 +54172,7 @@
54114
54172
  yAxisLeft = axisLeft(yScaleLeft).tickSize(
54115
54173
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -(innerWidth2 - xScaleForLegends(0)) : 0 : 0
54116
54174
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(chartJSON.dimensionList, innerWidth2));
54117
- yAxisRight = axisRight(yScaleLeft).tickSize(
54175
+ axisRight(yScaleLeft).tickSize(
54118
54176
  formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -xScaleForLegends(0) : 0 : 0
54119
54177
  ).tickSizeOuter(0).tickValues(responsiveXaxisLabel(chartJSON.dimensionList, innerWidth2));
54120
54178
  };
@@ -54155,29 +54213,46 @@
54155
54213
  ).customTickValue ?? (dataTableHeight > 0 ? (innerWidth2 - dataTableHeight) / 30 : innerWidth2 / 30)
54156
54214
  ).tickPadding(8).tickSizeOuter(0);
54157
54215
  };
54158
- const getChartType = (lineData) => {
54216
+ const getChartType = () => {
54217
+ gTag.selectAll(".parentGroup").remove();
54159
54218
  formatOptions.plotArea.plotAreaCalculatedHigh;
54160
54219
  formatOptions.plotArea.plotAreaCalculatedLow;
54161
- gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(filteredData).enter().append("g").attr("class", (d) => d.data[0].legend.replace(/ /g, "-")).selectAll("rect").data((d) => d.data.map((child) => ({
54162
- ...child,
54163
- parentProperties: d.properties
54164
- }))).enter().append("rect").attr("class", "rect").attr("y", (d) => d.dimension ? yScaleLeft(d.dimension) : yScaleLeft("defaultEntry")).attr("x", (d) => xScale(Math.max(0, d.value))).attr("stroke-dasharray", (d) => d.stackBorderStyle == 2 ? "5,3" : "0").attr("stroke-width", (d) => d.stackBorderWidth + "px").attr("stroke", (d) => d.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? d.stackBorderColor : "none").style("shape-rendering", "crispEdges").attr("width", (d) => d.value ? Math.abs(xScale(d.value) - xScale(0)) : 0).attr("height", yScaleLeft.bandwidth()).style("fill", (d) => d.parentProperties.color).attr("opacity", 1).on("mousemove", (event2, d) => {
54220
+ const parent = gTag.append("g").attr("class", "parentGroup");
54221
+ parent.selectAll("rect").data(
54222
+ filteredData.flatMap(
54223
+ (d) => d.data.map((child) => ({
54224
+ ...child,
54225
+ legendText: d.legend.replace("-", "~$~").split("~$~")[1].trim(),
54226
+ properties: d.properties
54227
+ }))
54228
+ )
54229
+ ).enter().append("rect").attr("class", "rect").attr("y", (d) => d.legendText ? yScaleLeft(d.legendText) : yScaleLeft("defaultEntry")).attr("height", yScaleLeft.bandwidth()).attr("x", (d) => d.value >= 0 ? xScale(0) : xScale(d.value)).attr("width", (d) => Math.abs(xScale(d.value) - xScale(0))).style("shape-rendering", "crispEdges").attr("stroke-dasharray", (d) => d.properties.stackBorderStyle == 2 ? "5,3" : "0").attr("stroke-width", (d) => `${d.properties.stackBorderWidth}px`).attr(
54230
+ "stroke",
54231
+ (d) => d.properties.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? d.properties.stackBorderColor : "none"
54232
+ ).style(
54233
+ "fill",
54234
+ (d) => d.properties.color
54235
+ ).on("mousemove", (event2, d) => {
54165
54236
  showTooltipOnMouseMove(
54166
54237
  [
54167
- { key: "Measure", value: d.legend },
54168
- { key: "Legend", value: d.dimension },
54238
+ { key: "Measure", value: d.dimension },
54239
+ { key: "Legend", value: d.legendText },
54169
54240
  {
54170
54241
  key: "Value",
54171
- value: d.value < 0 ? getNumberWithFormat(-d.value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, true) : getNumberWithFormat(d.value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, true)
54242
+ value: getNumberWithFormat(
54243
+ Math.abs(d.value),
54244
+ formatOptions.toolTip.toolTipDisplayUnits,
54245
+ formatOptions.toolTip.toolTipNumberFormat,
54246
+ formatOptions.toolTip.toolTipDecimalPrecision,
54247
+ true
54248
+ )
54172
54249
  }
54173
54250
  ],
54174
54251
  formatOptions,
54175
- void 0,
54176
- d.parentProperties
54252
+ event2,
54253
+ d.properties
54177
54254
  );
54178
- }).on("mouseout", () => {
54179
- hideTooltipOnMouseOut();
54180
- });
54255
+ }).on("mouseout", hideTooltipOnMouseOut);
54181
54256
  };
54182
54257
  const setSVGContainer = (margin2) => {
54183
54258
  innerWidth2 = width - margin2.left - margin2.right;
@@ -54260,7 +54335,7 @@
54260
54335
  filteredData,
54261
54336
  yScaleLeft,
54262
54337
  xScale,
54263
- yScaleRight,
54338
+ null,
54264
54339
  // need to pass secondary axis scale if secondary axis is drawn
54265
54340
  margin,
54266
54341
  d3Annotation,
@@ -54282,6 +54357,7 @@
54282
54357
  yScaleLeft,
54283
54358
  columnWidth,
54284
54359
  isSensitivityChart,
54360
+ isReportEditable,
54285
54361
  barChart
54286
54362
  );
54287
54363
  };