pace-chart-lib 1.0.32 → 1.0.33
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.
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisFunctions.d.ts +30 -4
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisTypes.types.d.ts +0 -1
- package/dist/Components/Charts/Core/Common.types.d.ts +2 -9
- package/dist/Components/Charts/Core/CommonFunctions.d.ts +2 -11
- package/dist/Components/Charts/Core/DefaultProperties.types.d.ts +0 -3
- package/dist/pace-chart-lib.es.js +342 -672
- package/dist/pace-chart-lib.umd.js +342 -672
- package/package.json +1 -1
|
@@ -10854,7 +10854,7 @@
|
|
|
10854
10854
|
Custom: "Custom"
|
|
10855
10855
|
};
|
|
10856
10856
|
var commonColors = /* @__PURE__ */ ((commonColors2) => {
|
|
10857
|
-
commonColors2["white"] = "#
|
|
10857
|
+
commonColors2["white"] = "#FFFFFF";
|
|
10858
10858
|
commonColors2["black"] = "#000000";
|
|
10859
10859
|
commonColors2["transparent"] = "#FFFFFF00";
|
|
10860
10860
|
return commonColors2;
|
|
@@ -10865,14 +10865,6 @@
|
|
|
10865
10865
|
tornadoEntryName2["default"] = "defaultEntry";
|
|
10866
10866
|
return tornadoEntryName2;
|
|
10867
10867
|
})(tornadoEntryName || {});
|
|
10868
|
-
var waterfallKeys = /* @__PURE__ */ ((waterfallKeys2) => {
|
|
10869
|
-
waterfallKeys2["total"] = "Total";
|
|
10870
|
-
waterfallKeys2["base"] = "base";
|
|
10871
|
-
waterfallKeys2["dimensionTotal"] = "dimensionTotal";
|
|
10872
|
-
waterfallKeys2["up"] = "up";
|
|
10873
|
-
waterfallKeys2["down"] = "down";
|
|
10874
|
-
return waterfallKeys2;
|
|
10875
|
-
})(waterfallKeys || {});
|
|
10876
10868
|
const defaultChartFormatOptions = {
|
|
10877
10869
|
chartDescription: {
|
|
10878
10870
|
chartDescriptionVisibility: false,
|
|
@@ -10925,9 +10917,7 @@
|
|
|
10925
10917
|
hideZeroValues: false,
|
|
10926
10918
|
xAxisSortBy: "0",
|
|
10927
10919
|
customSort: [],
|
|
10928
|
-
labelTextWrap: true
|
|
10929
|
-
multiLineLabelWrap: false,
|
|
10930
|
-
maxXAxisLabelWidth: 100
|
|
10920
|
+
labelTextWrap: true
|
|
10931
10921
|
},
|
|
10932
10922
|
xAxisScale: {
|
|
10933
10923
|
absoluteXAxisScale: false,
|
|
@@ -11448,8 +11438,7 @@
|
|
|
11448
11438
|
dataTableNumberFormat: ",",
|
|
11449
11439
|
dataTableDecimalPrecision: "2",
|
|
11450
11440
|
dataTableDisplayUnits: "None",
|
|
11451
|
-
dataTableLabelColor: commonColors.black
|
|
11452
|
-
dataTableAxisLabel: true
|
|
11441
|
+
dataTableLabelColor: commonColors.black
|
|
11453
11442
|
},
|
|
11454
11443
|
dataTableOuterBorder: {
|
|
11455
11444
|
borderButtonVisibility: true,
|
|
@@ -11559,7 +11548,6 @@
|
|
|
11559
11548
|
div.style.fontSize = fontSize == void 0 ? "" : fontSize + "px";
|
|
11560
11549
|
div.style.fontFamily = fontFamily == void 0 ? "" : fontFamily;
|
|
11561
11550
|
div.style.margin = "0";
|
|
11562
|
-
div.style.padding = "1px";
|
|
11563
11551
|
div.style.border = "none";
|
|
11564
11552
|
if (fixedWidth) {
|
|
11565
11553
|
div.style.width = fixedWidth + "px";
|
|
@@ -11622,16 +11610,6 @@
|
|
|
11622
11610
|
);
|
|
11623
11611
|
let actualDimesionWidth = dimensionHeightWidthArray[0] + 5;
|
|
11624
11612
|
let maxDimensionWidth = dimensionHeightWidthArray[3] + 10;
|
|
11625
|
-
let dimensionLength;
|
|
11626
|
-
if (formatOptions.xAxisLabel.labelTextWrap) {
|
|
11627
|
-
if (formatOptions.xAxisLabel.multiLineLabelWrap) {
|
|
11628
|
-
dimensionLength = formatOptions.xAxisLabel.maxXAxisLabelWidth;
|
|
11629
|
-
} else {
|
|
11630
|
-
dimensionLength = maxDimensionWidth < height * 0.15 ? maxDimensionWidth : height * 0.15;
|
|
11631
|
-
}
|
|
11632
|
-
} else {
|
|
11633
|
-
dimensionLength = maxDimensionWidth;
|
|
11634
|
-
}
|
|
11635
11613
|
let xTitle = formatOptions.xAxisTitle.xAxisTitleVisibility ? formatOptions.xAxisTitle.xAxisDynamicTitleText.length !== 0 ? calculateWidthHeightDynamically(
|
|
11636
11614
|
formatOptions.xAxisTitle.xAxisTitleHTML,
|
|
11637
11615
|
void 0,
|
|
@@ -11642,7 +11620,7 @@
|
|
|
11642
11620
|
"Helvetica"
|
|
11643
11621
|
)[1] : isDataTableDrawnWithAxis ? 5 : 0;
|
|
11644
11622
|
xTitle = xTitle > height * 0.1 ? height * 0.1 : xTitle;
|
|
11645
|
-
let xLabel = isDataTableDrawnWithAxis ? 0 : formatOptions.xAxisLabel.xAxisLabelVisibility ?
|
|
11623
|
+
let xLabel = isDataTableDrawnWithAxis ? 0 : formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.labelTextWrap ? maxDimensionWidth < height * 0.15 ? maxDimensionWidth : height * 0.15 : maxDimensionWidth : 0;
|
|
11646
11624
|
let yTitle = formatOptions.yAxisTitle.yAxisTitleVisibility ? formatOptions.yAxisTitle.yAxisDynamicTitleText.length !== 0 ? calculateWidthHeightDynamically(
|
|
11647
11625
|
formatOptions.yAxisTitle.yAxisTitleHTML,
|
|
11648
11626
|
void 0,
|
|
@@ -11653,9 +11631,7 @@
|
|
|
11653
11631
|
"Helvetica"
|
|
11654
11632
|
)[1] : 0;
|
|
11655
11633
|
yTitle = yTitle > width * 0.1 ? width * 0.1 : yTitle;
|
|
11656
|
-
|
|
11657
|
-
const updatedYMaxLeft = yMaxLeft * 1.1;
|
|
11658
|
-
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(updatedMaxNumberForPrimaryAxis, updatedYMaxLeft, formatOptions, false, isNormalizedChart) + 5 : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0) + 10;
|
|
11634
|
+
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) + 5 : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0) + 10;
|
|
11659
11635
|
let secondaryYLabel = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? responsiveYaxisMargin(
|
|
11660
11636
|
maxNumberForSecondaryAxis,
|
|
11661
11637
|
yMaxRight,
|
|
@@ -11803,7 +11779,7 @@
|
|
|
11803
11779
|
bottom2 = xAxisRelatedMargin + 5 + scrollHeightConstant;
|
|
11804
11780
|
break;
|
|
11805
11781
|
case staticLegendPosition.bottom:
|
|
11806
|
-
bottom2 =
|
|
11782
|
+
bottom2 = 40 + xAxisRelatedMargin + scrollHeightConstant;
|
|
11807
11783
|
top2 = metrics.chartTitleHeight + 5 + (isNormalizedChart ? 12 : 0);
|
|
11808
11784
|
break;
|
|
11809
11785
|
case staticLegendPosition.left:
|
|
@@ -12121,45 +12097,21 @@
|
|
|
12121
12097
|
return format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12122
12098
|
case staticNumberUnits.currency_USD:
|
|
12123
12099
|
formatter = `,.${decimalValues}f`;
|
|
12124
|
-
if (measureValue < 0) {
|
|
12125
|
-
const number2 = Math.abs(measureValue);
|
|
12126
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12127
|
-
}
|
|
12128
12100
|
return "$" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12129
12101
|
case staticNumberUnits.currency_CAD:
|
|
12130
12102
|
formatter = `,.${decimalValues}f`;
|
|
12131
|
-
if (measureValue < 0) {
|
|
12132
|
-
const number2 = Math.abs(measureValue);
|
|
12133
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12134
|
-
}
|
|
12135
12103
|
return "C$" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12136
12104
|
case staticNumberUnits.currency_EUR:
|
|
12137
12105
|
formatter = `,.${decimalValues}f`;
|
|
12138
|
-
if (measureValue < 0) {
|
|
12139
|
-
const number2 = Math.abs(measureValue);
|
|
12140
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12141
|
-
}
|
|
12142
12106
|
return "€" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12143
12107
|
case staticNumberUnits.currency_CHF:
|
|
12144
12108
|
formatter = `,.${decimalValues}f`;
|
|
12145
|
-
if (measureValue < 0) {
|
|
12146
|
-
const number2 = Math.abs(measureValue);
|
|
12147
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12148
|
-
}
|
|
12149
12109
|
return "CHF" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12150
12110
|
case staticNumberUnits.currency_UK:
|
|
12151
12111
|
formatter = `,.${decimalValues}f`;
|
|
12152
|
-
if (measureValue < 0) {
|
|
12153
|
-
const number2 = Math.abs(measureValue);
|
|
12154
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12155
|
-
}
|
|
12156
12112
|
return "£" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12157
12113
|
case staticNumberUnits.currency_INR:
|
|
12158
12114
|
formatter = `,.${decimalValues}f`;
|
|
12159
|
-
if (measureValue < 0) {
|
|
12160
|
-
const number2 = Math.abs(measureValue);
|
|
12161
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12162
|
-
}
|
|
12163
12115
|
return "₹" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12164
12116
|
case staticNumberUnits.commaSeparated:
|
|
12165
12117
|
formatter = `,.${decimalValues}f`;
|
|
@@ -12338,9 +12290,10 @@
|
|
|
12338
12290
|
}
|
|
12339
12291
|
function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJSON, customYaxisMinValue, customYaxisMaxValue, barChart, innerWidth2) {
|
|
12340
12292
|
try {
|
|
12341
|
-
let yAxisIntervalsVisibility = formatOptions.yAxisLabel.yAxisIntervalsVisibility;
|
|
12342
12293
|
let autoLabelFlag = false;
|
|
12343
|
-
let customYaxisIntervalValue =
|
|
12294
|
+
let customYaxisIntervalValue = parseFloat(
|
|
12295
|
+
formatOptions.yAxisLabel.yAxisIntervalText
|
|
12296
|
+
);
|
|
12344
12297
|
let yAxisLabelArray = [];
|
|
12345
12298
|
let customTickValue;
|
|
12346
12299
|
const isTornadoChart = chartJSON.chartType === chartTypes.TornadoChart;
|
|
@@ -12564,13 +12517,14 @@
|
|
|
12564
12517
|
throw error;
|
|
12565
12518
|
}
|
|
12566
12519
|
}
|
|
12567
|
-
function initXaxis$1(gTag, chartJSON, xLabel, formatOptions, dataTableHeight, yScaleLeft, xAxis, dimensionHeightWidthArray, height, barWidth, isDateType, innerWidth2, innerHeight2, filteredDimensionList
|
|
12520
|
+
function initXaxis$1(gTag, chartJSON, xLabel, formatOptions, dataTableHeight, yScaleLeft, xAxis, dimensionHeightWidthArray, height, barWidth, isDateType, innerWidth2, innerHeight2, filteredDimensionList) {
|
|
12568
12521
|
try {
|
|
12569
12522
|
let responsiveDimList = chartJSON.chartType !== chartTypes.ColumnHistogramChart ? responsiveXaxisLabel(
|
|
12570
12523
|
filteredDimensionList,
|
|
12571
12524
|
innerWidth2
|
|
12572
12525
|
) : [];
|
|
12573
12526
|
let formatedResponsiveDimList = [];
|
|
12527
|
+
let actualDimesionWidth = dimensionHeightWidthArray[0] + 5;
|
|
12574
12528
|
let maxDimensionWidth = dimensionHeightWidthArray[3] + 10;
|
|
12575
12529
|
if (chartJSON.chartType != chartTypes.ColumnHistogramChart) {
|
|
12576
12530
|
formatedResponsiveDimList = isDateType ? setDateFormats(
|
|
@@ -12607,26 +12561,11 @@
|
|
|
12607
12561
|
`translate(0,${xaxisLabelPosition == "0" ? dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2 : xaxisLabelPosition == "1" ? 0 : yScaleLeft(0)})`
|
|
12608
12562
|
).call(xAxis);
|
|
12609
12563
|
let dx = xaxisLabelPosition === "1" ? "5" : "0";
|
|
12610
|
-
let
|
|
12611
|
-
|
|
12612
|
-
if (formatOptions.xAxisLabel.multiLineLabelWrap) {
|
|
12613
|
-
dimensionWidthUpdated = formatOptions.xAxisLabel.maxXAxisLabelWidth;
|
|
12614
|
-
} else {
|
|
12615
|
-
dimensionWidthUpdated = maxDimensionWidth < height * 0.15 ? maxDimensionWidth : height * 0.15;
|
|
12616
|
-
}
|
|
12617
|
-
} else {
|
|
12618
|
-
dimensionWidthUpdated = formatOptions.xAxisLabel.xAxisLabelRotation == 0 ? barWidth : maxDimensionWidth;
|
|
12619
|
-
}
|
|
12620
|
-
const dimHeight = xScale.step();
|
|
12621
|
-
const lineHeight = parseInt(formatOptions.xAxisLabel.xAxisLabelFontSize) * 1.2;
|
|
12622
|
-
const maxLines = Math.floor(dimHeight / lineHeight);
|
|
12623
|
-
let foreignObject = XaxisG.selectAll("g").append("foreignObject").attr("class", "testingoverflowing").style("width", Math.round(dimensionWidthUpdated)).style("height", dimHeight + "px").attr(
|
|
12564
|
+
let width = formatOptions.xAxisLabel.labelTextWrap ? maxDimensionWidth < height * 0.125 ? maxDimensionWidth : height * 0.125 : formatOptions.xAxisLabel.xAxisLabelRotation == 0 ? barWidth : actualDimesionWidth;
|
|
12565
|
+
let foreignObject = XaxisG.selectAll("g").append("foreignObject").attr("class", "testingoverflowing").style("width", Math.round(width)).style("height", "20px").attr(
|
|
12624
12566
|
"transform",
|
|
12625
|
-
(d, i) => `rotate(${xaxisLabelPosition === "1" ? -formatOptions.xAxisLabel.xAxisLabelRotation : formatOptions.xAxisLabel.xAxisLabelRotation != 0 ? 180 - formatOptions.xAxisLabel.xAxisLabelRotation : 0}) translate (${formatOptions.xAxisLabel.xAxisLabelRotation != 0 ? dx + `, -${i == 0 && isAreaTypeChartAndNotFitChart ? 15 :
|
|
12567
|
+
(d, i) => `rotate(${xaxisLabelPosition === "1" ? -formatOptions.xAxisLabel.xAxisLabelRotation : formatOptions.xAxisLabel.xAxisLabelRotation != 0 ? 180 - formatOptions.xAxisLabel.xAxisLabelRotation : 0}) translate (${formatOptions.xAxisLabel.xAxisLabelRotation != 0 ? dx + `, -${i == 0 && isAreaTypeChartAndNotFitChart ? 15 : 5}` : -width / 2 + " , " + (xaxisLabelPosition === "1" ? "-15" : "8")})`
|
|
12626
12568
|
);
|
|
12627
|
-
if (formatOptions.xAxisLabel.xAxisLabelRotation != 0) {
|
|
12628
|
-
foreignObject.style("align-content", "center");
|
|
12629
|
-
}
|
|
12630
12569
|
if (detectBrowserName() === "safari") {
|
|
12631
12570
|
foreignObject.attr(
|
|
12632
12571
|
"width",
|
|
@@ -12636,17 +12575,10 @@
|
|
|
12636
12575
|
let xLabelsObj = foreignObject.append("xhtml:h3").style(
|
|
12637
12576
|
"transform",
|
|
12638
12577
|
detectBrowserName() === "safari" ? "" : xaxisLabelPosition === "1" ? "" : formatOptions.xAxisLabel.xAxisLabelRotation != 0 ? "rotate(180deg)" : "0"
|
|
12639
|
-
)
|
|
12640
|
-
if (formatOptions.xAxisLabel.labelTextWrap && !formatOptions.xAxisLabel.multiLineLabelWrap || !formatOptions.xAxisLabel.labelTextWrap) {
|
|
12641
|
-
xLabelsObj.style("white-space", "pre").style("text-overflow", "ellipsis").style("overflow", "hidden");
|
|
12642
|
-
}
|
|
12643
|
-
if (formatOptions.xAxisLabel.labelTextWrap && formatOptions.xAxisLabel.multiLineLabelWrap) {
|
|
12644
|
-
xLabelsObj.style("-webkit-line-clamp", maxLines.toString()).style("display", "-webkit-box").style("-webkit-box-orient", "vertical").style("overflow", "hidden").style("word-break", "break-word").style("white-space", "normal");
|
|
12645
|
-
}
|
|
12646
|
-
xLabelsObj.style(
|
|
12578
|
+
).style("white-space", "pre").style("text-overflow", "ellipsis").style(
|
|
12647
12579
|
"text-align",
|
|
12648
12580
|
formatOptions.xAxisLabel.xAxisLabelRotation != 0 ? "start" : "center"
|
|
12649
|
-
).style("user-select", "none").style("margin", 0).style("padding", "0 1px").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(
|
|
12581
|
+
).style("user-select", "none").style("margin", 0).style("padding", "0 1px").style("overflow", "hidden").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(
|
|
12650
12582
|
"text-decoration",
|
|
12651
12583
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
12652
12584
|
).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").style(
|
|
@@ -12797,7 +12729,7 @@
|
|
|
12797
12729
|
}
|
|
12798
12730
|
}
|
|
12799
12731
|
function getTransformStringForXaxisLabelPosition(barChart, margin, formatOptions, innerHeight2, xLabel, yLabel) {
|
|
12800
|
-
return barChart ? `rotate(-90) translate(-${margin.top + innerHeight2},${margin.left -
|
|
12732
|
+
return barChart ? `rotate(-90) translate(-${margin.top + innerHeight2},${margin.left - 15 - xLabel})` : `translate(${margin.left},${margin.top + innerHeight2 + (formatOptions?.xAxisLabel?.xAxisPosition == "1" ? 0 : barChart ? yLabel : xLabel)})`;
|
|
12801
12733
|
}
|
|
12802
12734
|
function setXaxistitle$1(formatOptions, barChart, svg, margin, xLabel, height, xTitle, chartType, yLabel, innerWidth2, innerHeight2) {
|
|
12803
12735
|
try {
|
|
@@ -12816,7 +12748,7 @@
|
|
|
12816
12748
|
formatOptions.xAxisTitle.xAxisTitleHTML ? formatOptions.xAxisTitle.xAxisTitleHTML : formatOptions.xAxisTitle.xAxisTitleText
|
|
12817
12749
|
);
|
|
12818
12750
|
} else {
|
|
12819
|
-
object2.append("xhtml:h3").style("white-space", "pre").style("text-overflow", "ellipsis").style("user-select", "none").style("margin", 0).style("padding", 0).style("text-align", "center").style("overflow", "hidden").attr("class", "xAxisTitle").style("text-anchor", "middle").style("color", "rgba(119,119,119)").style("font-size", "12px").style("font-size", formatOptions.xAxisTitle.xAxisTitleFontSize).style("font-family", formatOptions.xAxisTitle.xAxisTitleFontFamily).style("font-style", formatOptions.xAxisTitle.xAxisTitleFontStyle).attr(
|
|
12751
|
+
object2.append("xhtml:h3").style("white-space", "pre").style("text-overflow", "ellipsis").style("user-select", "none").style("margin", 0).style("padding", 0).style("text-align", "center").style("overflow", "hidden").attr("class", "xAxisTitle").style("padding-top", "5px").style("text-anchor", "middle").style("color", "rgba(119,119,119)").style("font-size", "12px").style("font-size", formatOptions.xAxisTitle.xAxisTitleFontSize).style("font-family", formatOptions.xAxisTitle.xAxisTitleFontFamily).style("font-style", formatOptions.xAxisTitle.xAxisTitleFontStyle).attr(
|
|
12820
12752
|
"title",
|
|
12821
12753
|
formatOptions.xAxisTitle.xAxisTitleText !== "~$~Dimension" ? formatOptions.xAxisTitle.xAxisTitleText : ""
|
|
12822
12754
|
).html(
|
|
@@ -12877,15 +12809,8 @@
|
|
|
12877
12809
|
"visibility",
|
|
12878
12810
|
formatOptions.chartTitle.chartTitleVisibility ? "visible" : "hidden"
|
|
12879
12811
|
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", width).attr("height", chartTitleHeight + "px");
|
|
12880
|
-
const parseHTMLText = (html) => {
|
|
12881
|
-
const temp = document.createElement("div");
|
|
12882
|
-
temp.innerHTML = html;
|
|
12883
|
-
return temp.textContent || temp.innerText || "";
|
|
12884
|
-
};
|
|
12885
|
-
const hasHTML = !!formatOptions.chartTitle.chartTitleHTML;
|
|
12886
|
-
const titleText = hasHTML ? parseHTMLText(formatOptions.chartTitle.chartTitleHTML) : formatOptions.chartTitle.chartTitleText;
|
|
12887
12812
|
if (formatOptions.chartTitle.dynamicTitleText.length !== 0) {
|
|
12888
|
-
object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title",
|
|
12813
|
+
object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", formatOptions.chartTitle.chartTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").html(
|
|
12889
12814
|
formatOptions.chartTitle.chartTitleHTML ? formatOptions.chartTitle.chartTitleHTML : formatOptions.chartTitle.chartTitleText
|
|
12890
12815
|
);
|
|
12891
12816
|
} else {
|
|
@@ -12912,13 +12837,11 @@
|
|
|
12912
12837
|
if (index2 == -1) return legend;
|
|
12913
12838
|
return legend.slice(index2 + 3);
|
|
12914
12839
|
}
|
|
12915
|
-
|
|
12916
|
-
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, isAATornado) {
|
|
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) {
|
|
12917
12841
|
try {
|
|
12918
12842
|
const isTornadoChart = chartType === chartTypes.TornadoChart;
|
|
12919
12843
|
let annotationType = formatOptions.annotation.annotationType ?? "1";
|
|
12920
12844
|
let annotationPosition = formatOptions.annotation.annotationPosition.toString() != "4" ? formatOptions.annotation.annotationPosition : null;
|
|
12921
|
-
let dataLabelColor = formatOptions?.annotation?.annotationSetLabelColor == "2" ? "color" : "labelColor";
|
|
12922
12845
|
if (formatOptions.annotation.annotationVisibility) {
|
|
12923
12846
|
let Disable = [annotationType == "1" ? "connector" : ""];
|
|
12924
12847
|
let labelData = [];
|
|
@@ -12952,8 +12875,7 @@
|
|
|
12952
12875
|
Measure: d.data[0].value,
|
|
12953
12876
|
Legend: d.data[0].legend,
|
|
12954
12877
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12955
|
-
Labelcolor: d.properties
|
|
12956
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12878
|
+
Labelcolor: d.properties.labelColor,
|
|
12957
12879
|
Axis: d.properties.axis
|
|
12958
12880
|
});
|
|
12959
12881
|
}
|
|
@@ -12968,8 +12890,7 @@
|
|
|
12968
12890
|
Measure: d.data[d.data.length - 1].value,
|
|
12969
12891
|
Legend: d.data[d.data.length - 1].legend,
|
|
12970
12892
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12971
|
-
Labelcolor: d.properties
|
|
12972
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12893
|
+
Labelcolor: d.properties.labelColor,
|
|
12973
12894
|
Axis: d.properties.axis
|
|
12974
12895
|
});
|
|
12975
12896
|
}
|
|
@@ -12985,8 +12906,7 @@
|
|
|
12985
12906
|
Measure: d.data[0].value,
|
|
12986
12907
|
Legend: d.data[0].legend,
|
|
12987
12908
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12988
|
-
Labelcolor: d.properties
|
|
12989
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12909
|
+
Labelcolor: d.properties.labelColor,
|
|
12990
12910
|
Axis: d.properties.axis
|
|
12991
12911
|
});
|
|
12992
12912
|
}
|
|
@@ -12999,8 +12919,7 @@
|
|
|
12999
12919
|
Measure: d.data[d.data.length - 1].value,
|
|
13000
12920
|
Legend: d.data[d.data.length - 1].legend,
|
|
13001
12921
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13002
|
-
Labelcolor: d.properties
|
|
13003
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12922
|
+
Labelcolor: d.properties.labelColor,
|
|
13004
12923
|
Axis: d.properties.axis
|
|
13005
12924
|
});
|
|
13006
12925
|
}
|
|
@@ -13016,8 +12935,7 @@
|
|
|
13016
12935
|
Measure: d.data[i].value,
|
|
13017
12936
|
Legend: d.data[i].legend,
|
|
13018
12937
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13019
|
-
Labelcolor: d.properties
|
|
13020
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12938
|
+
Labelcolor: d.properties.labelColor,
|
|
13021
12939
|
Axis: d.properties.axis
|
|
13022
12940
|
});
|
|
13023
12941
|
}
|
|
@@ -13039,8 +12957,7 @@
|
|
|
13039
12957
|
Measure: d.data[i].value,
|
|
13040
12958
|
Legend: d.data[i].legend,
|
|
13041
12959
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13042
|
-
Labelcolor: d.properties
|
|
13043
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12960
|
+
Labelcolor: d.properties.labelColor,
|
|
13044
12961
|
Axis: d.properties.axis
|
|
13045
12962
|
});
|
|
13046
12963
|
}
|
|
@@ -13055,8 +12972,7 @@
|
|
|
13055
12972
|
Measure: d.data[0].value,
|
|
13056
12973
|
Legend: d.data[0].legend,
|
|
13057
12974
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13058
|
-
Labelcolor: d.properties
|
|
13059
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12975
|
+
Labelcolor: d.properties.labelColor,
|
|
13060
12976
|
Axis: d.properties.axis
|
|
13061
12977
|
});
|
|
13062
12978
|
break;
|
|
@@ -13067,8 +12983,7 @@
|
|
|
13067
12983
|
Measure: d.data[d.data.length - 1].value,
|
|
13068
12984
|
Legend: d.data[d.data.length - 1].legend,
|
|
13069
12985
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13070
|
-
Labelcolor: d.properties
|
|
13071
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12986
|
+
Labelcolor: d.properties.labelColor,
|
|
13072
12987
|
Axis: d.properties.axis
|
|
13073
12988
|
});
|
|
13074
12989
|
break;
|
|
@@ -13079,8 +12994,7 @@
|
|
|
13079
12994
|
Measure: d.data[0].value,
|
|
13080
12995
|
Legend: d.data[0].legend,
|
|
13081
12996
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13082
|
-
Labelcolor: d.properties
|
|
13083
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12997
|
+
Labelcolor: d.properties.labelColor,
|
|
13084
12998
|
Axis: d.properties.axis
|
|
13085
12999
|
});
|
|
13086
13000
|
if (d.data[d.data.length - 1])
|
|
@@ -13089,8 +13003,7 @@
|
|
|
13089
13003
|
Measure: d.data[d.data.length - 1].value,
|
|
13090
13004
|
Legend: d.data[d.data.length - 1].legend,
|
|
13091
13005
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13092
|
-
Labelcolor: d.properties
|
|
13093
|
-
hoverText: getHoverText(d, isAATornado),
|
|
13006
|
+
Labelcolor: d.properties.labelColor,
|
|
13094
13007
|
Axis: d.properties.axis
|
|
13095
13008
|
});
|
|
13096
13009
|
break;
|
|
@@ -13122,8 +13035,7 @@
|
|
|
13122
13035
|
position: parseInt(d.LabelPosition),
|
|
13123
13036
|
currentLegend: d.Legend,
|
|
13124
13037
|
//d.Legend.replaceAll(" ", "-"), need to check for this case by space replaced with -
|
|
13125
|
-
isVisible: true
|
|
13126
|
-
hoverId: d.hoverText.replace(/\s+/g, "-")
|
|
13038
|
+
isVisible: true
|
|
13127
13039
|
} : {
|
|
13128
13040
|
x: d.Dimension,
|
|
13129
13041
|
y: { measure: d.Measure, axis: d.Axis },
|
|
@@ -13149,7 +13061,7 @@
|
|
|
13149
13061
|
};
|
|
13150
13062
|
if (barChart) {
|
|
13151
13063
|
let requiredXScale = d.Axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
13152
|
-
(responsiveXaxisLabel(dimensionList,
|
|
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;
|
|
13153
13065
|
} else {
|
|
13154
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;
|
|
13155
13067
|
}
|
|
@@ -13297,7 +13209,7 @@
|
|
|
13297
13209
|
}
|
|
13298
13210
|
for (let i = 0; i < chartData.length; i++) {
|
|
13299
13211
|
chartData.forEach((d) => {
|
|
13300
|
-
if (d.properties.type && d.properties.type !=
|
|
13212
|
+
if (d.properties.type && d.properties.type != "Column" && !getChartType.includes(d.properties.type))
|
|
13301
13213
|
getChartType.push(d.properties.type);
|
|
13302
13214
|
});
|
|
13303
13215
|
}
|
|
@@ -13405,168 +13317,6 @@
|
|
|
13405
13317
|
labelData;
|
|
13406
13318
|
break;
|
|
13407
13319
|
case "6":
|
|
13408
|
-
chartData.forEach((d, k2) => {
|
|
13409
|
-
let annotationVisibility = d.properties.annotation.toString();
|
|
13410
|
-
switch (d.properties.type) {
|
|
13411
|
-
case chartTypes.ColumnChart:
|
|
13412
|
-
switch (annotationVisibility) {
|
|
13413
|
-
case "1":
|
|
13414
|
-
for (let i = 0; i < chartData[k2].data.length; i++) {
|
|
13415
|
-
labelData.push(d.data[i]);
|
|
13416
|
-
}
|
|
13417
|
-
break;
|
|
13418
|
-
case "2":
|
|
13419
|
-
labelData;
|
|
13420
|
-
break;
|
|
13421
|
-
case "3":
|
|
13422
|
-
labelData.push(d.data[0]);
|
|
13423
|
-
break;
|
|
13424
|
-
case "4":
|
|
13425
|
-
labelData.push(d.data[d.data.length - 1]);
|
|
13426
|
-
break;
|
|
13427
|
-
case "5":
|
|
13428
|
-
labelData.push(d.data[0]);
|
|
13429
|
-
labelData.push(d.data[d.data.length - 1]);
|
|
13430
|
-
break;
|
|
13431
|
-
}
|
|
13432
|
-
break;
|
|
13433
|
-
case chartTypes.AreaChart:
|
|
13434
|
-
case chartTypes.LineChart:
|
|
13435
|
-
switch (annotationVisibility) {
|
|
13436
|
-
case "1":
|
|
13437
|
-
for (let i = 0; i < chartData[k2].data.length; i++) {
|
|
13438
|
-
labelData.push(
|
|
13439
|
-
{
|
|
13440
|
-
dimension: d.data[i].dimension,
|
|
13441
|
-
value: d.data[i].value,
|
|
13442
|
-
legend: d.data[i].legend,
|
|
13443
|
-
labelPosition: d.data[i].labelPosition,
|
|
13444
|
-
labelColor: d.data[i].labelColor,
|
|
13445
|
-
axis: d.data[i].axis,
|
|
13446
|
-
type: chartTypes.LineChart
|
|
13447
|
-
}
|
|
13448
|
-
);
|
|
13449
|
-
}
|
|
13450
|
-
break;
|
|
13451
|
-
case "2":
|
|
13452
|
-
labelData;
|
|
13453
|
-
break;
|
|
13454
|
-
case "3":
|
|
13455
|
-
labelData.push(
|
|
13456
|
-
{
|
|
13457
|
-
dimension: d.data[0].dimension,
|
|
13458
|
-
value: d.data[0].value,
|
|
13459
|
-
legend: d.data[0].legend,
|
|
13460
|
-
labelPosition: d.data[0].labelPosition,
|
|
13461
|
-
labelcolor: d.data[0].labelColor,
|
|
13462
|
-
axis: d.data[0].axis,
|
|
13463
|
-
type: chartTypes.LineChart
|
|
13464
|
-
}
|
|
13465
|
-
);
|
|
13466
|
-
break;
|
|
13467
|
-
case "4":
|
|
13468
|
-
labelData.push(
|
|
13469
|
-
{
|
|
13470
|
-
dimension: d.data[d.data.length - 1].dimension,
|
|
13471
|
-
value: d.data[d.data.length - 1].value,
|
|
13472
|
-
legend: d.data[d.data.length - 1].legend,
|
|
13473
|
-
labelPosition: d.data[d.data.length - 1].labelPosition,
|
|
13474
|
-
labelcolor: d.data[d.data.length - 1].labelColor,
|
|
13475
|
-
axis: d.data[d.data.length - 1].axis,
|
|
13476
|
-
type: chartTypes.LineChart
|
|
13477
|
-
}
|
|
13478
|
-
);
|
|
13479
|
-
break;
|
|
13480
|
-
case "5":
|
|
13481
|
-
labelData.push(
|
|
13482
|
-
{
|
|
13483
|
-
dimension: d.data[0].dimension,
|
|
13484
|
-
value: d.data[0].value,
|
|
13485
|
-
legend: d.data[0].legend,
|
|
13486
|
-
labelPosition: d.data[0].labelPosition,
|
|
13487
|
-
labelcolor: d.data[0].labelColor,
|
|
13488
|
-
axis: d.data[0].axis,
|
|
13489
|
-
type: chartTypes.LineChart
|
|
13490
|
-
}
|
|
13491
|
-
);
|
|
13492
|
-
labelData.push(
|
|
13493
|
-
{
|
|
13494
|
-
dimension: d.data[d.data.length - 1].dimension,
|
|
13495
|
-
value: d.data[d.data.length - 1].value,
|
|
13496
|
-
legend: d.data[d.data.length - 1].legend,
|
|
13497
|
-
labelPosition: d.data[d.data.length - 1].labelPosition,
|
|
13498
|
-
labelcolor: d.data[d.data.length - 1].labelColor,
|
|
13499
|
-
axis: d.data[d.data.length - 1].axis,
|
|
13500
|
-
type: chartTypes.LineChart
|
|
13501
|
-
}
|
|
13502
|
-
);
|
|
13503
|
-
break;
|
|
13504
|
-
}
|
|
13505
|
-
break;
|
|
13506
|
-
case chartTypes.StackColumnChart:
|
|
13507
|
-
const stackColumnIndex = stackColumnData.findIndex((id2) => id2.key === d.properties.legend);
|
|
13508
|
-
stackColumnIndex !== -1 && stackColumnData[stackColumnIndex].forEach((dta, j) => {
|
|
13509
|
-
switch (String(stackColumnData[stackColumnIndex].individualAnnotationVisibility)) {
|
|
13510
|
-
case "1":
|
|
13511
|
-
labelData.push(stackColumnData[stackColumnIndex][j]);
|
|
13512
|
-
break;
|
|
13513
|
-
case "2":
|
|
13514
|
-
labelData;
|
|
13515
|
-
break;
|
|
13516
|
-
case "3":
|
|
13517
|
-
let label3 = stackColumnData[stackColumnIndex][0];
|
|
13518
|
-
if (!labelData.find((data) => data.key == label3.key))
|
|
13519
|
-
labelData.push(label3);
|
|
13520
|
-
break;
|
|
13521
|
-
case "4":
|
|
13522
|
-
let label4 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
|
|
13523
|
-
if (!labelData.find((data) => data.key == label4.key))
|
|
13524
|
-
labelData.push(label4);
|
|
13525
|
-
break;
|
|
13526
|
-
case "5":
|
|
13527
|
-
let label5 = stackColumnData[stackColumnIndex][0];
|
|
13528
|
-
let label6 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
|
|
13529
|
-
if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
|
|
13530
|
-
labelData.push(stackColumnData[stackColumnIndex][0]);
|
|
13531
|
-
labelData.push(stackColumnData[stackColumnIndex][stackColumnData[0].length - 1]);
|
|
13532
|
-
break;
|
|
13533
|
-
}
|
|
13534
|
-
}
|
|
13535
|
-
});
|
|
13536
|
-
break;
|
|
13537
|
-
case chartTypes.StackAreaChart:
|
|
13538
|
-
const stackIndex = stackAreaData.findIndex((id2) => id2.key === d.properties.legend);
|
|
13539
|
-
stackIndex != -1 && stackAreaData[stackIndex].forEach((dta, j) => {
|
|
13540
|
-
switch (String(stackAreaData[stackIndex].individualAnnotationVisibility)) {
|
|
13541
|
-
case "1":
|
|
13542
|
-
labelData.push(stackAreaData[stackIndex][j]);
|
|
13543
|
-
break;
|
|
13544
|
-
case "2":
|
|
13545
|
-
labelData;
|
|
13546
|
-
break;
|
|
13547
|
-
case "3":
|
|
13548
|
-
let label3 = stackAreaData[stackIndex][0];
|
|
13549
|
-
if (!labelData.find((data) => data.key == label3.key))
|
|
13550
|
-
labelData.push(label3);
|
|
13551
|
-
break;
|
|
13552
|
-
case "4":
|
|
13553
|
-
let label4 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
|
|
13554
|
-
if (!labelData.find((data) => data.key == label4.key))
|
|
13555
|
-
labelData.push(label4);
|
|
13556
|
-
break;
|
|
13557
|
-
case "5":
|
|
13558
|
-
let label5 = stackAreaData[stackIndex][0];
|
|
13559
|
-
let label6 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
|
|
13560
|
-
if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
|
|
13561
|
-
labelData.push(label5);
|
|
13562
|
-
labelData.push(label6);
|
|
13563
|
-
break;
|
|
13564
|
-
}
|
|
13565
|
-
}
|
|
13566
|
-
});
|
|
13567
|
-
break;
|
|
13568
|
-
}
|
|
13569
|
-
});
|
|
13570
13320
|
break;
|
|
13571
13321
|
}
|
|
13572
13322
|
let maxValue = 0;
|
|
@@ -13599,7 +13349,7 @@
|
|
|
13599
13349
|
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],
|
|
13600
13350
|
prevValue: d[0] >= 0 ? d[0] : d[1],
|
|
13601
13351
|
position: parseInt(d.labelPosition) ? parseInt(d.labelPosition) : parseInt(d.data.labelPosition),
|
|
13602
|
-
type: d.type,
|
|
13352
|
+
type: d.dimension && d.legend ? d.type : d.data.type,
|
|
13603
13353
|
currentLegend: d.legend?.includes("~$~") ? d.legend.split("~$~")[1] : d.key?.includes("~$~") ? d.key.split("~$~")[1] : d.legend ?? d.key,
|
|
13604
13354
|
isVisible: true
|
|
13605
13355
|
},
|
|
@@ -13622,7 +13372,7 @@
|
|
|
13622
13372
|
d["legend"] && d.dimension ? (
|
|
13623
13373
|
// ? finalLegendseries.includes(d.Legend.includes("~$~") ? d.Legend.split("~$~")[1] : d.Legend) &&
|
|
13624
13374
|
// filteredDimensionList.includes(d.Dimension) &&
|
|
13625
|
-
!labelExcludeList.includes(d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend) && (d.
|
|
13375
|
+
!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
|
|
13626
13376
|
) : (
|
|
13627
13377
|
// finalLegendseries.includes(d["key"].includes("~$~") ? d["key"].split("~$~")[1] : d["key"]) &&
|
|
13628
13378
|
// this.filteredDimensionList.includes(d.data["Dimension"]) &&
|
|
@@ -13650,15 +13400,17 @@
|
|
|
13650
13400
|
});
|
|
13651
13401
|
makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
|
|
13652
13402
|
x: function(d) {
|
|
13653
|
-
|
|
13654
|
-
|
|
13403
|
+
if (getChartType.includes(d.x.type) || getChartType.includes(d.type)) {
|
|
13404
|
+
let chartType = d.x.type || d.type;
|
|
13655
13405
|
switch (chartType) {
|
|
13656
|
-
case
|
|
13406
|
+
case "StackColumn":
|
|
13657
13407
|
return xScale(d.x.dimension) + xScaleForLegends(d.x.stacklegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2;
|
|
13658
|
-
|
|
13659
|
-
case
|
|
13660
|
-
case
|
|
13408
|
+
break;
|
|
13409
|
+
case "StackArea":
|
|
13410
|
+
case "Line":
|
|
13411
|
+
case "Area":
|
|
13661
13412
|
return xScale(d.x.dimension);
|
|
13413
|
+
break;
|
|
13662
13414
|
}
|
|
13663
13415
|
} else {
|
|
13664
13416
|
if (d.x.legend) {
|
|
@@ -13668,11 +13420,10 @@
|
|
|
13668
13420
|
}
|
|
13669
13421
|
},
|
|
13670
13422
|
y: function(d) {
|
|
13671
|
-
const chartType = d.type ?? d.x.type;
|
|
13672
13423
|
if (d.x.axis == axisTypes.primary) {
|
|
13673
|
-
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue,
|
|
13424
|
+
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue, d.type);
|
|
13674
13425
|
} else {
|
|
13675
|
-
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue,
|
|
13426
|
+
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue, d.type);
|
|
13676
13427
|
}
|
|
13677
13428
|
}
|
|
13678
13429
|
}).on("dragend", function(annotation2) {
|
|
@@ -13803,7 +13554,7 @@
|
|
|
13803
13554
|
let dataTableHeight = 20;
|
|
13804
13555
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
13805
13556
|
formatOptions.xAxisLabel.xAxisLabelVisibility = false;
|
|
13806
|
-
let exactAvailableWidth = yLabel + yTitle;
|
|
13557
|
+
let exactAvailableWidth = yLabel + yTitle - 36;
|
|
13807
13558
|
seriesData.forEach((data, i) => {
|
|
13808
13559
|
let tempObj = {
|
|
13809
13560
|
"data": data.data.filter((data2) => dimensionList.includes(data2.dimension)),
|
|
@@ -13895,14 +13646,14 @@
|
|
|
13895
13646
|
selectAll("#dataTableG" + chartId).remove();
|
|
13896
13647
|
let tag = currentTag.append("g").attr("id", "dataTableG" + chartId);
|
|
13897
13648
|
dataTable.forEach((data, i) => {
|
|
13898
|
-
yCordinate = yCordinate +
|
|
13649
|
+
yCordinate = yCordinate + cellHeight;
|
|
13899
13650
|
cellHeight = data.properties.height;
|
|
13900
13651
|
getLegendsAppended(tag, i, data, cellHeight);
|
|
13901
13652
|
let parentTag = tag.append("g").attr("class", "dataTableBorder").selectAll("#scaling-svg" + chartId + " .foreignObject").data((d, pos) => data["data"]).enter().filter((d) => xAxis(d.dimension)).append("g").attr("fill", commonColors.transparent).attr(
|
|
13902
13653
|
"transform",
|
|
13903
13654
|
(d, index2) => `translate(${index2 === 0 ? 0 : xAxis(d.dimension) - cellWidth / 2},0)`
|
|
13904
13655
|
);
|
|
13905
|
-
if (i == 0
|
|
13656
|
+
if (i == 0) {
|
|
13906
13657
|
parentTag.append("foreignObject").attr("class", "dataTableColHeaders").attr("x", 0).attr("y", tableStartY).attr("id", (d, index2) => index2).attr("width", (d, index2) => index2 === 0 ? cellWidth + outerPadding + calWidthForSeriesNames / 2 : index2 === dimensionCount - 1 ? cellWidth + outerPadding - calWidthForSeriesNames / 2 : cellWidth).attr("height", "20px").append("xhtml:div").style("width", (d, index2) => index2 === 0 ? cellWidth + outerPadding + calWidthForSeriesNames / 2 : index2 === dimensionCount - 1 ? cellWidth + outerPadding - calWidthForSeriesNames / 2 : cellWidth).style("height", `${20}px`).style("border-width", (d, index2) => getBorderStyle(formatOptions, index2, void 0, dimensionCount, legendsCount, "width", "colHeaders")).style("border-style", (d, index2) => getBorderStyle(formatOptions, index2, void 0, dimensionCount, legendsCount, "style", "colHeaders")).style("border-color", (d, index2) => getBorderStyle(formatOptions, index2, void 0, dimensionCount, legendsCount, "color", "colHeaders")).style("text-align", "center").style("white-space", "nowrap").style("text-overflow", "ellipsis").style("overflow", "hidden").style("padding-left", "3px").style("font-size", formatOptions.dataTableProperties.dataTableFontSize + "px").style("font-family", formatOptions.dataTableProperties.dataTableFontFamily).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
13907
13658
|
"text-decoration",
|
|
13908
13659
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -14677,7 +14428,6 @@
|
|
|
14677
14428
|
let makeAnnotations = d3Annotation2.annotation();
|
|
14678
14429
|
let connector = formatOptions.annotation.connectorType;
|
|
14679
14430
|
let labelType = formatOptions.annotation.annotationVisibility;
|
|
14680
|
-
let dataLabelColor = formatOptions?.annotation?.annotationSetLabelColor == "2" ? "color" : "labelColor";
|
|
14681
14431
|
let fontStyle = formatOptions.annotation.annotationFontStyle;
|
|
14682
14432
|
let connectorType = formatOptions.annotation.connectorType ? formatOptions.annotation.connectorType.toLowerCase() : "None";
|
|
14683
14433
|
oldAnnotationList = conditionallyResetOldAnnotations(oldAnnotationList, formatOptions, chartType);
|
|
@@ -14785,7 +14535,7 @@
|
|
|
14785
14535
|
height: 15,
|
|
14786
14536
|
width: 15
|
|
14787
14537
|
},
|
|
14788
|
-
color: d.properties
|
|
14538
|
+
color: d.properties.labelColor,
|
|
14789
14539
|
type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
|
|
14790
14540
|
height,
|
|
14791
14541
|
width
|
|
@@ -14918,67 +14668,54 @@
|
|
|
14918
14668
|
"visibility",
|
|
14919
14669
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
|
|
14920
14670
|
);
|
|
14921
|
-
xAxisG.select(".domain").
|
|
14671
|
+
xAxisG.select(".domain").attr(
|
|
14672
|
+
"visibility",
|
|
14673
|
+
formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
|
|
14674
|
+
).style("shape-rendering", "crispEdges").style(
|
|
14922
14675
|
"stroke",
|
|
14923
|
-
formatOptions.yAxisLabel.
|
|
14676
|
+
formatOptions.yAxisLabel.yAxisColorInverted
|
|
14924
14677
|
).attr("stroke-width", formatOptions.yAxisLabel.yAxisWidth ? formatOptions.yAxisLabel.yAxisWidth : formatOptions.plotArea.plotAreaBorderThickness);
|
|
14925
14678
|
} catch (error) {
|
|
14926
14679
|
throw error;
|
|
14927
14680
|
}
|
|
14928
14681
|
};
|
|
14929
|
-
function getTransformStringForYaxisLabels(isTornadoChart, xaxisLabelPosition, formatOptions, xScaleBottom, yMaxLeft, xLabelMargin, labelWidth
|
|
14682
|
+
function getTransformStringForYaxisLabels(isTornadoChart, xaxisLabelPosition, formatOptions, xScaleBottom, yMaxLeft, xLabelMargin, labelWidth) {
|
|
14930
14683
|
return isTornadoChart ? `rotate(${90 - formatOptions.xAxisLabel.xAxisLabelRotation})
|
|
14931
|
-
translate(${-(xScaleBottom(yMaxLeft * 0.01) + xLabelMargin)}
|
|
14932
|
-
translate(${formatOptions.xAxisLabel.xAxisLabelRotation != 0 ? `${xaxisLabelPosition === 1 ? 10 : -xLabelMargin},${-
|
|
14684
|
+
translate(${-(xScaleBottom(yMaxLeft * 0.01) + xLabelMargin)} ,-8)` : `rotate(${90 - formatOptions.xAxisLabel.xAxisLabelRotation})
|
|
14685
|
+
translate(${formatOptions.xAxisLabel.xAxisLabelRotation != 0 ? `${xaxisLabelPosition === 1 ? 10 : -xLabelMargin},${-10}` : -labelWidth / 2 + " ,2"})`;
|
|
14933
14686
|
}
|
|
14934
|
-
const initYaxisBar = (formatOptions, gTag, xLabel, innerHeight2, innerWidth2, yAxis, xAxisTop, xScaleBottom, yMaxLeft, dimensionList, chartType, isDateType, width, dimensionHeightWidthArray, columnWidth
|
|
14687
|
+
const initYaxisBar = (formatOptions, gTag, xLabel, innerHeight2, innerWidth2, yAxis, xAxisTop, xScaleBottom, yMaxLeft, dimensionList, chartType, isDateType, width, dimensionHeightWidthArray, columnWidth) => {
|
|
14935
14688
|
try {
|
|
14936
14689
|
const isTornadoChart = chartType === chartTypes.TornadoChart;
|
|
14937
14690
|
let fontStyle = formatOptions.xAxisLabel.xAxisLabelFontStyle;
|
|
14938
14691
|
let xaxisLabelPosition = parseInt(formatOptions.xAxisLabel.xAxisPosition);
|
|
14939
14692
|
let responsiveDimList = responsiveXaxisLabel(dimensionList, innerHeight2);
|
|
14693
|
+
let labelWidth = formatOptions.xAxisLabel.labelTextWrap ? dimensionHeightWidthArray[3] + 10 < width * 0.1 ? dimensionHeightWidthArray[3] + 10 : width * 0.1 : formatOptions.xAxisLabel.xAxisLabelRotation == 0 ? columnWidth : dimensionHeightWidthArray[0] + 5;
|
|
14694
|
+
let xLabelMargin = formatOptions.xAxisLabel.labelTextWrap ? labelWidth : xLabel;
|
|
14940
14695
|
let formatedResponsiveDimList = isDateType ? setDateFormats(
|
|
14941
14696
|
formatOptions.xAxisLabel.xAxisNumberFormat,
|
|
14942
14697
|
responsiveDimList.map((d) => d)
|
|
14943
14698
|
).map((d) => d) : responsiveDimList;
|
|
14944
14699
|
gTag.selectAll("#yAxisRect").remove();
|
|
14945
14700
|
gTag.selectAll("#yAxisG").remove();
|
|
14946
|
-
let xLabelMargin;
|
|
14947
|
-
if (formatOptions.xAxisLabel.labelTextWrap) {
|
|
14948
|
-
if (formatOptions.xAxisLabel.multiLineLabelWrap) {
|
|
14949
|
-
xLabelMargin = formatOptions.xAxisLabel.maxXAxisLabelWidth;
|
|
14950
|
-
} else {
|
|
14951
|
-
xLabelMargin = xLabel;
|
|
14952
|
-
}
|
|
14953
|
-
} else {
|
|
14954
|
-
xLabelMargin = xLabel;
|
|
14955
|
-
}
|
|
14956
|
-
let dimHeight = xScale.step();
|
|
14957
|
-
const lineHeight = parseInt(formatOptions.xAxisLabel.xAxisLabelFontSize) * 1.2;
|
|
14958
|
-
const maxLines = Math.floor(dimHeight / lineHeight);
|
|
14959
14701
|
let yRect = gTag.append("rect").attr("id", "yAxisRect").attr("transform", chartType === chartTypes.TornadoChart ? `translate(${-xLabelMargin + 10},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(
|
|
14960
14702
|
"fill",
|
|
14961
14703
|
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !== commonColors.white ? formatOptions.xAxisLabel.xAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
14962
14704
|
);
|
|
14963
14705
|
const YaxisG = gTag.append("g").attr("id", "yAxisG").attr("transform", isTornadoChart ? `translate(${xScaleBottom(0)},0)` : `translate(${xaxisLabelPosition === 0 ? 0 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0)},0)`).call(yAxis);
|
|
14964
|
-
|
|
14965
|
-
"
|
|
14966
|
-
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14706
|
+
if (true) {
|
|
14707
|
+
let foreignObject = YaxisG.selectAll("g").append("foreignObject").attr("class", "testingoverflowing").attr("width", xLabelMargin).attr("height", "20px").attr(
|
|
14708
|
+
"transform",
|
|
14709
|
+
getTransformStringForYaxisLabels(isTornadoChart, xaxisLabelPosition, formatOptions, xScaleBottom, yMaxLeft, xLabelMargin, labelWidth)
|
|
14710
|
+
);
|
|
14711
|
+
foreignObject.append("xhtml:h3").style("white-space", "pre").style("text-overflow", "ellipsis").style("text-align", formatOptions.xAxisLabel.xAxisLabelRotation == 0 ? "center" : "start").style("user-select", "none").style("margin", 0).style("padding", 0).style("overflow", "hidden").style("font-family", formatOptions.xAxisLabel.xAxisLabelFontFamily).style("font-style", formatOptions.xAxisLabel.xAxisLabelFontStyle).style("color", formatOptions.xAxisLabel.xAxisLabelColor).style("font-size", formatOptions.xAxisLabel.xAxisLabelFontSize + "px").style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
14712
|
+
"text-decoration",
|
|
14713
|
+
fontStyle.includes("Underline") ? "Underline" : ""
|
|
14714
|
+
).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").style(
|
|
14715
|
+
"visibility",
|
|
14716
|
+
formatOptions.xAxisLabel.xAxisLabelVisibility ? "visible" : "hidden"
|
|
14717
|
+
).attr("title", (d, i) => formatedResponsiveDimList[i]).html((d, i) => formatedResponsiveDimList[i]);
|
|
14974
14718
|
}
|
|
14975
|
-
xLabelh3.style("padding", 0).style("font-family", formatOptions.xAxisLabel.xAxisLabelFontFamily).style("font-style", formatOptions.xAxisLabel.xAxisLabelFontStyle).style("color", formatOptions.xAxisLabel.xAxisLabelColor).style("font-size", formatOptions.xAxisLabel.xAxisLabelFontSize + "px").style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
14976
|
-
"text-decoration",
|
|
14977
|
-
fontStyle.includes("Underline") ? "Underline" : ""
|
|
14978
|
-
).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").style(
|
|
14979
|
-
"visibility",
|
|
14980
|
-
formatOptions.xAxisLabel.xAxisLabelVisibility ? "visible" : "hidden"
|
|
14981
|
-
).attr("title", (d, i) => formatedResponsiveDimList[i]).html((d, i) => formatedResponsiveDimList[i]);
|
|
14982
14719
|
if (chartType === chartTypes.TornadoChart) {
|
|
14983
14720
|
if (xAxisTop) {
|
|
14984
14721
|
const YaxisRightG = gTag.append("g").attr("transform", `translate(${xScaleBottom(0)},0)`).call(xAxisTop);
|
|
@@ -15009,12 +14746,9 @@
|
|
|
15009
14746
|
"visibility",
|
|
15010
14747
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : formatOptions.plotArea.gridLinesVertical ? "visible" : "hidden"
|
|
15011
14748
|
);
|
|
15012
|
-
YaxisG.select(".domain").style("shape-rendering", "crispEdges").
|
|
15013
|
-
"stroke-width",
|
|
15014
|
-
formatOptions.xAxisLabel.xAxisWidth ?? formatOptions.plotArea.plotAreaBorderThickness
|
|
15015
|
-
).style(
|
|
14749
|
+
YaxisG.select(".domain").style("shape-rendering", "crispEdges").style(
|
|
15016
14750
|
"stroke",
|
|
15017
|
-
formatOptions.xAxisLabel.
|
|
14751
|
+
formatOptions.xAxisLabel.xAxisColorInverted
|
|
15018
14752
|
);
|
|
15019
14753
|
} catch (e) {
|
|
15020
14754
|
throw e;
|
|
@@ -15103,8 +14837,8 @@
|
|
|
15103
14837
|
const barWidthFromBand = (gapFraction, bandWidth) => bandWidth / (1 + gapFraction);
|
|
15104
14838
|
function calculateVisibleBars(innerWidth2, formatOptions, chartJSON) {
|
|
15105
14839
|
const plotAreaWidthPx = innerWidth2 > 0 ? innerWidth2 : 0;
|
|
15106
|
-
const minBarWidthPx =
|
|
15107
|
-
const gapFraction = !isNaN(parseFloat(formatOptions?.plotArea?.plotAreaGapWidth ?? "0")) ? parseFloat(formatOptions
|
|
14840
|
+
const minBarWidthPx = 25;
|
|
14841
|
+
const gapFraction = !isNaN(parseFloat(formatOptions?.plotArea?.plotAreaGapWidth ?? "0")) ? parseFloat(formatOptions.plotArea.plotAreaGapWidth) / 100 : 0;
|
|
15108
14842
|
const totalCategories = Array.isArray(chartJSON?.dimensionList) ? chartJSON.dimensionList.length : 0;
|
|
15109
14843
|
let visibleBars = 0;
|
|
15110
14844
|
let columnWidth = 0;
|
|
@@ -15510,7 +15244,7 @@
|
|
|
15510
15244
|
svg,
|
|
15511
15245
|
seriesData,
|
|
15512
15246
|
7,
|
|
15513
|
-
height -
|
|
15247
|
+
height - 25,
|
|
15514
15248
|
width - 10,
|
|
15515
15249
|
30,
|
|
15516
15250
|
position,
|
|
@@ -15571,7 +15305,7 @@
|
|
|
15571
15305
|
return Symbol$1().type(Markershapes(d.markerShape)).size(d.markerSize * 50)();
|
|
15572
15306
|
}).attr("visibility", (d) => {
|
|
15573
15307
|
const hideByX = !xScale(d.dimension) && xScale(d.dimension) !== 0;
|
|
15574
|
-
const visible = formatOptions.marker.markerVisibility ? checkVisibleConditions(chartData, d, type, hideZeroValues,
|
|
15308
|
+
const visible = formatOptions.marker.markerVisibility ? checkVisibleConditions(chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) ? visibilityCondition.hidden : [chartTypes.NormalizedStackLineChart, chartTypes.CombinationLine, chartTypes.CombinationArea].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? visibilityCondition.visible : visibilityCondition.hidden : [chartTypes.StackAreaChart, chartTypes.AreaChart, chartTypes.CombinationStackArea].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? visibilityCondition.visible : visibilityCondition.hidden : visibilityCondition.visible : [chartTypes.CombinationLine, chartTypes.CombinationArea].includes(type) ? visibilityCondition.visible : ["Area"].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? visibilityCondition.visible : visibilityCondition.hidden : visibilityCondition.hidden;
|
|
15575
15309
|
return hideByX ? visibilityCondition.hidden : visible;
|
|
15576
15310
|
}).attr("transform", (d) => {
|
|
15577
15311
|
let requiredYScale = d.axis == axisTypes.primary ? yScale : yScaleRight;
|
|
@@ -15640,10 +15374,10 @@
|
|
|
15640
15374
|
logError$2(fileName$b, "lineMarkers", error);
|
|
15641
15375
|
}
|
|
15642
15376
|
}
|
|
15643
|
-
const checkVisibleConditions = (chartData, d, type, hideZeroValues,
|
|
15377
|
+
const checkVisibleConditions = (chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) => {
|
|
15644
15378
|
try {
|
|
15645
15379
|
if (chartData[0].properties.axis && chartData[0].properties.axis === "Secondary") {
|
|
15646
|
-
return hideZeroValues && d.value == 0 || d.value >
|
|
15380
|
+
return hideZeroValues && d.value == 0 || d.value > secondaryCustomYaxisMaxValue || d.value < secondaryCustomYaxisMinValue;
|
|
15647
15381
|
} else if (type.includes("Stack")) {
|
|
15648
15382
|
return d.value > 0 ? hideZeroValues && d[1] == 0 || d[1] < customYaxisMinValue || d[1] > customYaxisMaxValue : hideZeroValues && d[0] == 0 || d[0] < customYaxisMinValue || d[0] > customYaxisMaxValue;
|
|
15649
15383
|
} else return hideZeroValues && d.value == 0 || d.value < customYaxisMinValue || d.value > customYaxisMaxValue;
|
|
@@ -15651,7 +15385,7 @@
|
|
|
15651
15385
|
logError$2(fileName$b, "checkVisibleConditions", error);
|
|
15652
15386
|
}
|
|
15653
15387
|
};
|
|
15654
|
-
function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType
|
|
15388
|
+
function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType) {
|
|
15655
15389
|
try {
|
|
15656
15390
|
let mousemove = function(event2) {
|
|
15657
15391
|
try {
|
|
@@ -15665,14 +15399,13 @@
|
|
|
15665
15399
|
}
|
|
15666
15400
|
let mindiff = 1e99;
|
|
15667
15401
|
for (let k2 = 0; k2 < lineData.length; k2++) {
|
|
15668
|
-
|
|
15669
|
-
let diff1 = Math.abs(m[1] - yScaleLeft(requiredValue));
|
|
15402
|
+
let diff1 = Math.abs(m[1] - yScaleLeft(lineData[k2].data[dimensionIndex].value));
|
|
15670
15403
|
if (diff1 < mindiff) {
|
|
15671
15404
|
mindiff = diff1;
|
|
15672
15405
|
legendIndex = k2;
|
|
15673
15406
|
}
|
|
15674
15407
|
}
|
|
15675
|
-
focus.attr("transform", getCoordinates(lineData[legendIndex], dimensionIndex, xScale, yScaleLeft
|
|
15408
|
+
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([
|
|
15676
15409
|
{ key: formatOptions.xAxisTitle.xAxisTitleText, value: lineData[legendIndex].data[dimensionIndex].dimension },
|
|
15677
15410
|
{
|
|
15678
15411
|
key: lineData[legendIndex].properties.currentMeasure ? lineData[legendIndex].properties.currentMeasure : this.basestyle.YAxisTitle.YAxisTitleText,
|
|
@@ -15680,7 +15413,7 @@
|
|
|
15680
15413
|
},
|
|
15681
15414
|
{ key: "Legend", value: lineData[legendIndex].data[dimensionIndex].legend.includes("~$~") ? lineData[legendIndex].data[dimensionIndex].legend.split("~$~")[1] : lineData[legendIndex].data[dimensionIndex].legend }
|
|
15682
15415
|
// { key: "Calculated Tooltip", value: lineData[legendIndex].data[dimensionIndex]. },
|
|
15683
|
-
], formatOptions
|
|
15416
|
+
], formatOptions));
|
|
15684
15417
|
} catch (error) {
|
|
15685
15418
|
logError$2(fileName$b, "onHoverMarkerForAreaChartFamily.mousemove", error);
|
|
15686
15419
|
}
|
|
@@ -15698,10 +15431,9 @@
|
|
|
15698
15431
|
logError$2(fileName$b, "onHoverMarkerForAreaChartFamily", error);
|
|
15699
15432
|
}
|
|
15700
15433
|
}
|
|
15701
|
-
const getCoordinates = (chartData, pos, xScale, yScaleLeft
|
|
15434
|
+
const getCoordinates = (chartData, pos, xScale, yScaleLeft) => {
|
|
15702
15435
|
try {
|
|
15703
|
-
|
|
15704
|
-
return `translate(${xScale(chartData.data[pos].dimension)},${yScaleLeft(requiredValue)})`;
|
|
15436
|
+
return `translate(${xScale(chartData.data[pos].dimension)},${yScaleLeft(chartData.data[pos].value)})`;
|
|
15705
15437
|
} catch (error) {
|
|
15706
15438
|
logError$2(fileName$b, "getCoordinates", error);
|
|
15707
15439
|
}
|
|
@@ -16066,10 +15798,7 @@
|
|
|
16066
15798
|
}
|
|
16067
15799
|
let vennSaparator = isVennChart && (legendPosition == staticLegendPosition.bottom || legendPosition == staticLegendPosition.top) ? i != seriesData.length - 1 ? " |" : "" : "";
|
|
16068
15800
|
let legendColor = isVennChart ? chartFormatOptions.legends.legendSelectedUnicolor : chartFormatOptions.legends.legendColorMode == legendColorMode.multiColor ? d.properties.color ? d.properties.color : commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
|
|
16069
|
-
innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).style(
|
|
16070
|
-
"background",
|
|
16071
|
-
d.properties.axis == axisTypes.secondary && chartFormatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor
|
|
16072
|
-
).style("font-size", (!isVennChart ? d.properties.fontSize : chartFormatOptions.legends.legendFontSize) + "px").style("font-family", !isVennChart ? d.properties.fontFamily : chartFormatOptions.legends.legendFontFamily).style(
|
|
15801
|
+
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(
|
|
16073
15802
|
"font-style",
|
|
16074
15803
|
() => {
|
|
16075
15804
|
let style = !isVennChart ? d.properties.fontStyle : chartFormatOptions.legends.legendFontStyle;
|
|
@@ -16110,8 +15839,7 @@
|
|
|
16110
15839
|
}
|
|
16111
15840
|
function getLineShape(d, innerDiv, formatOptions) {
|
|
16112
15841
|
try {
|
|
16113
|
-
|
|
16114
|
-
let shape = innerDiv.append("div").style("height", "2px").style("width", lineStyle == "dashed" ? "25px" : "20px").style("background", commonColors.transparent).style("position", "relative").style("border-top", lineStyle == "none" ? "unset" : lineStyle == "dotted" ? "2px dotted " + d.properties.color : lineStyle == "dashed" ? "2px dashed " + d.properties.color : "2px solid " + d.properties.color);
|
|
15842
|
+
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);
|
|
16115
15843
|
if (formatOptions.marker.markerVisibility) {
|
|
16116
15844
|
switch (d.properties.markerShape.toLowerCase()) {
|
|
16117
15845
|
case "circle":
|
|
@@ -16567,26 +16295,6 @@
|
|
|
16567
16295
|
return inputText;
|
|
16568
16296
|
}
|
|
16569
16297
|
};
|
|
16570
|
-
function modifySeriesDataForTornadoChart(seriesData, data, isAdvanceAnalyticsChart) {
|
|
16571
|
-
try {
|
|
16572
|
-
let splitLengend = function(legend) {
|
|
16573
|
-
const parts = legend.split(" - ");
|
|
16574
|
-
return parts.length > 1 ? parts[0] : legend;
|
|
16575
|
-
};
|
|
16576
|
-
const measureMap = /* @__PURE__ */ new Map();
|
|
16577
|
-
data?.LegendList?.forEach((legend) => {
|
|
16578
|
-
measureMap.set(splitLengend(legend?.name), legend);
|
|
16579
|
-
});
|
|
16580
|
-
return seriesData.map((series) => {
|
|
16581
|
-
return {
|
|
16582
|
-
...series,
|
|
16583
|
-
properties: measureMap.get(isAdvanceAnalyticsChart ? splitLengend(series.legend) : series.properties.currentMeasure) ?? series.properties
|
|
16584
|
-
};
|
|
16585
|
-
}).filter((series) => series.data[0].value !== 0);
|
|
16586
|
-
} catch (_) {
|
|
16587
|
-
return seriesData;
|
|
16588
|
-
}
|
|
16589
|
-
}
|
|
16590
16298
|
const ColumnChart = ({
|
|
16591
16299
|
isDateType,
|
|
16592
16300
|
formatOptions,
|
|
@@ -16606,14 +16314,14 @@
|
|
|
16606
16314
|
const barChart = false;
|
|
16607
16315
|
let isSecondaryAxisDrawn = false;
|
|
16608
16316
|
const isNormalizedChart = false;
|
|
16609
|
-
let customYaxisMinValue =
|
|
16610
|
-
let customYaxisMaxValue =
|
|
16611
|
-
let secondaryCustomYaxisMinValue =
|
|
16317
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
16318
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
16319
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
16612
16320
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
16613
|
-
)
|
|
16614
|
-
let secondaryCustomYaxisMaxValue =
|
|
16321
|
+
);
|
|
16322
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
16615
16323
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
16616
|
-
)
|
|
16324
|
+
);
|
|
16617
16325
|
let margin;
|
|
16618
16326
|
let yLabel;
|
|
16619
16327
|
let xLabel;
|
|
@@ -17008,10 +16716,10 @@
|
|
|
17008
16716
|
return yScale(0);
|
|
17009
16717
|
}).attr("height", 0).attr("fill", data2.properties.color).attr(
|
|
17010
16718
|
"stroke-dasharray",
|
|
17011
|
-
(d) =>
|
|
17012
|
-
).attr("stroke-width", (d) => `${
|
|
16719
|
+
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
16720
|
+
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
17013
16721
|
"stroke",
|
|
17014
|
-
(d) => data2.properties.stackBorderStyle
|
|
16722
|
+
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
17015
16723
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
17016
16724
|
"visibility",
|
|
17017
16725
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -17093,8 +16801,7 @@
|
|
|
17093
16801
|
isDateType,
|
|
17094
16802
|
innerWidth2,
|
|
17095
16803
|
innerHeight2,
|
|
17096
|
-
filteredDimension
|
|
17097
|
-
xScale
|
|
16804
|
+
filteredDimension
|
|
17098
16805
|
);
|
|
17099
16806
|
commonAnnotations(
|
|
17100
16807
|
seriesData,
|
|
@@ -17179,14 +16886,14 @@
|
|
|
17179
16886
|
const barChart = false;
|
|
17180
16887
|
let isSecondaryAxisDrawn = false;
|
|
17181
16888
|
const isNormalizedChart = false;
|
|
17182
|
-
let customYaxisMinValue =
|
|
17183
|
-
let customYaxisMaxValue =
|
|
17184
|
-
let secondaryCustomYaxisMinValue =
|
|
16889
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
16890
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
16891
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
17185
16892
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
17186
|
-
)
|
|
17187
|
-
let secondaryCustomYaxisMaxValue =
|
|
16893
|
+
);
|
|
16894
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
17188
16895
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
17189
|
-
)
|
|
16896
|
+
);
|
|
17190
16897
|
let margin;
|
|
17191
16898
|
let yLabel;
|
|
17192
16899
|
let xLabel;
|
|
@@ -17223,7 +16930,6 @@
|
|
|
17223
16930
|
let yAxisLeft;
|
|
17224
16931
|
let xAxis;
|
|
17225
16932
|
let yAxisRight;
|
|
17226
|
-
let totalValueMap = /* @__PURE__ */ new Map();
|
|
17227
16933
|
let filteredDimension;
|
|
17228
16934
|
let filteredData = [];
|
|
17229
16935
|
let requiredData = [];
|
|
@@ -17256,7 +16962,6 @@
|
|
|
17256
16962
|
formatOptions
|
|
17257
16963
|
));
|
|
17258
16964
|
preProcessChartData();
|
|
17259
|
-
updateStackAxisExtremes();
|
|
17260
16965
|
({ maxNumberForPrimaryAxis, maxNumberForSecondaryAxis } = customYscaleLabelFormatting$1(
|
|
17261
16966
|
// for calculating primary/secondary axis max number so that we can calculate margin accordinglt
|
|
17262
16967
|
formatOptions,
|
|
@@ -17321,6 +17026,7 @@
|
|
|
17321
17026
|
innerHeight2,
|
|
17322
17027
|
chartType
|
|
17323
17028
|
);
|
|
17029
|
+
updateStackAxisExtremes();
|
|
17324
17030
|
initScale();
|
|
17325
17031
|
initAxis();
|
|
17326
17032
|
initYaxis$1(
|
|
@@ -17416,13 +17122,9 @@
|
|
|
17416
17122
|
seriesData.forEach((series, i) => {
|
|
17417
17123
|
if (![chartTypes.StackColumnChart, chartTypes.StackAreaChart].includes(series.properties.type)) {
|
|
17418
17124
|
tempChartData.push(series);
|
|
17419
|
-
series.properties.type !== chartTypes.LineChart &&
|
|
17420
|
-
} else {
|
|
17421
|
-
|
|
17422
|
-
if (!legendList.includes(chartTypes.StackColumnChart)) {
|
|
17423
|
-
legendList.push(chartTypes.StackColumnChart);
|
|
17424
|
-
}
|
|
17425
|
-
}
|
|
17125
|
+
series.properties.type !== chartTypes.LineChart && legendList.push(series.legend);
|
|
17126
|
+
} else if (!legendList.includes("stackLegend")) {
|
|
17127
|
+
legendList.push(`stackLegend`);
|
|
17426
17128
|
}
|
|
17427
17129
|
if (series.properties.axis === "Secondary") {
|
|
17428
17130
|
secondaryStackAxisData.push(series);
|
|
@@ -17442,15 +17144,15 @@
|
|
|
17442
17144
|
primaryStackAreaAxisData.push(series);
|
|
17443
17145
|
}
|
|
17444
17146
|
}
|
|
17445
|
-
series.data
|
|
17147
|
+
series.data.forEach((point2) => {
|
|
17446
17148
|
const newPoint = {
|
|
17447
17149
|
...point2,
|
|
17448
17150
|
type: series.properties.type,
|
|
17449
17151
|
axis: series.properties.axis,
|
|
17450
|
-
labelPosition:
|
|
17152
|
+
labelPosition: series.properties.dataLabelPosition,
|
|
17451
17153
|
labelColor: series.properties.labelColor
|
|
17452
17154
|
};
|
|
17453
|
-
if (
|
|
17155
|
+
if (series.properties.axis === "Secondary") {
|
|
17454
17156
|
isSecondaryAxisDrawn = true;
|
|
17455
17157
|
yMaxRight = Math.max(yMaxRight, newPoint.value);
|
|
17456
17158
|
yMinRight = Math.min(yMinRight, newPoint.value);
|
|
@@ -17458,7 +17160,6 @@
|
|
|
17458
17160
|
yMaxLeft = Math.max(yMaxLeft, newPoint.value);
|
|
17459
17161
|
yMinLeft = Math.min(yMinLeft, newPoint.value);
|
|
17460
17162
|
}
|
|
17461
|
-
return newPoint;
|
|
17462
17163
|
});
|
|
17463
17164
|
});
|
|
17464
17165
|
filteredData = JSON.parse(JSON.stringify(seriesData));
|
|
@@ -17522,8 +17223,7 @@
|
|
|
17522
17223
|
properties: {
|
|
17523
17224
|
axis: d.properties.axis,
|
|
17524
17225
|
type: d.properties.type,
|
|
17525
|
-
legend: d.properties.legend
|
|
17526
|
-
annotation: d.properties.annotation
|
|
17226
|
+
legend: d.properties.legend
|
|
17527
17227
|
},
|
|
17528
17228
|
stackData: tempStackAreaChartDataForPrimaryAxis,
|
|
17529
17229
|
data: primaryStackAreaAxisData2
|
|
@@ -17534,8 +17234,7 @@
|
|
|
17534
17234
|
properties: {
|
|
17535
17235
|
axis: d.properties.axis,
|
|
17536
17236
|
type: d.properties.type,
|
|
17537
|
-
legend: d.properties.legend
|
|
17538
|
-
annotation: d.properties.annotation
|
|
17237
|
+
legend: d.properties.legend
|
|
17539
17238
|
},
|
|
17540
17239
|
stackData: tempStackAreaChartDataForSecondaryAxis,
|
|
17541
17240
|
data: secondaryStackAreaAxisData2
|
|
@@ -17546,8 +17245,7 @@
|
|
|
17546
17245
|
properties: {
|
|
17547
17246
|
axis: d.properties.axis,
|
|
17548
17247
|
type: d.properties.type,
|
|
17549
|
-
legend: d.properties.legend
|
|
17550
|
-
annotation: d.properties.annotation
|
|
17248
|
+
legend: d.properties.legend
|
|
17551
17249
|
},
|
|
17552
17250
|
stackData: tempStackColumnChartDataForPrimaryAxis,
|
|
17553
17251
|
data: primaryStackColumnAxisData2
|
|
@@ -17558,8 +17256,7 @@
|
|
|
17558
17256
|
properties: {
|
|
17559
17257
|
axis: d.properties.axis,
|
|
17560
17258
|
type: d.properties.type,
|
|
17561
|
-
legend: d.properties.legend
|
|
17562
|
-
annotation: d.properties.annotation
|
|
17259
|
+
legend: d.properties.legend
|
|
17563
17260
|
},
|
|
17564
17261
|
stackData: tempStackColumnChartDataForSecondaryAxis,
|
|
17565
17262
|
data: secondaryStackColumnAxisData2
|
|
@@ -17581,6 +17278,17 @@
|
|
|
17581
17278
|
}
|
|
17582
17279
|
};
|
|
17583
17280
|
const initScale = () => {
|
|
17281
|
+
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
17282
|
+
customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
|
|
17283
|
+
chartJSON.yMinLeft,
|
|
17284
|
+
innerHeight2,
|
|
17285
|
+
formatOptions,
|
|
17286
|
+
chartJSON,
|
|
17287
|
+
customYaxisMinValue,
|
|
17288
|
+
customYaxisMaxValue
|
|
17289
|
+
).yAxisLabelArray;
|
|
17290
|
+
chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
|
|
17291
|
+
chartJSON.yMinLeft = yAxisLabelArray[0];
|
|
17584
17292
|
{
|
|
17585
17293
|
yScaleLeft = linear$1().domain([
|
|
17586
17294
|
chartJSON.yMinLeft >= 0 ? customYaxisMinValue !== void 0 && !Number.isNaN(customYaxisMinValue) ? customYaxisMinValue : 0 : chartJSON.yMinLeft < 0 ? chartJSON.yMinLeft * 1.1 : chartJSON.yMinLeft * 0.9,
|
|
@@ -17610,7 +17318,7 @@
|
|
|
17610
17318
|
calculatedRange = [0, innerWidth2];
|
|
17611
17319
|
};
|
|
17612
17320
|
const getXScale = () => {
|
|
17613
|
-
xScaleForLegends = band().domain(chartJSON.legendList).range([0, columnWidth]).paddingInner(
|
|
17321
|
+
xScaleForLegends = band().domain(chartJSON.legendList.reverse()).range([0, columnWidth]).paddingInner(
|
|
17614
17322
|
chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
|
|
17615
17323
|
);
|
|
17616
17324
|
xScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
|
|
@@ -17708,7 +17416,7 @@
|
|
|
17708
17416
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
17709
17417
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
17710
17418
|
"hoverId",
|
|
17711
|
-
(d) =>
|
|
17419
|
+
(d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
|
|
17712
17420
|
).attr("transform", (d) => `translate(${xScale(d.dimension)}, 0)`);
|
|
17713
17421
|
columnGroupsEnter.merge(columnGroups).attr(
|
|
17714
17422
|
"transform",
|
|
@@ -17720,9 +17428,9 @@
|
|
|
17720
17428
|
}).attr("height", (d) => {
|
|
17721
17429
|
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
17722
17430
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
17723
|
-
}).attr("fill", data2.properties.color).attr("stroke-dasharray", (d) =>
|
|
17431
|
+
}).attr("fill", data2.properties.color).attr("stroke-dasharray", (d) => d.stackBorderStyle === 2 ? "5,3" : "0").attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
17724
17432
|
"stroke",
|
|
17725
|
-
(d) => data2.properties.stackBorderStyle
|
|
17433
|
+
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
17726
17434
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
17727
17435
|
"visibility",
|
|
17728
17436
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -17968,7 +17676,7 @@
|
|
|
17968
17676
|
).merge(rects).attr(
|
|
17969
17677
|
"hoverId",
|
|
17970
17678
|
(d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
|
|
17971
|
-
).attr("x", (d) => xScaleForLegends(
|
|
17679
|
+
).attr("x", (d) => xScaleForLegends("stackLegend")).attr(
|
|
17972
17680
|
"y",
|
|
17973
17681
|
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
17974
17682
|
).attr(
|
|
@@ -17984,12 +17692,12 @@
|
|
|
17984
17692
|
(sdata) => sdata.legend === d.key
|
|
17985
17693
|
);
|
|
17986
17694
|
const props = seriesData[seriesIndex]?.properties;
|
|
17987
|
-
return props?.stackBorderStyle
|
|
17695
|
+
return props?.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? props.stackBorderColor : "none";
|
|
17988
17696
|
}).attr("stroke-dasharray", (d, i, nodes) => {
|
|
17989
17697
|
const seriesIndex = Array.from(seriesData).findIndex(
|
|
17990
17698
|
(sdata) => sdata.legend === d.key
|
|
17991
17699
|
);
|
|
17992
|
-
return seriesData[seriesIndex]?.properties.stackBorderStyle
|
|
17700
|
+
return seriesData[seriesIndex]?.properties.stackBorderStyle === 2 ? "5,3" : "0";
|
|
17993
17701
|
}).attr("stroke-width", (d, i, nodes) => {
|
|
17994
17702
|
const seriesIndex = Array.from(seriesData).findIndex(
|
|
17995
17703
|
(sdata) => sdata.legend === d.key
|
|
@@ -18031,7 +17739,6 @@
|
|
|
18031
17739
|
filteredData = fData;
|
|
18032
17740
|
filteredDimension = fDimension;
|
|
18033
17741
|
visibleBars = fVisibleBars;
|
|
18034
|
-
createTotalMeasureValueMapForCustomColumChart(data, totalValueMap, filteredDimension);
|
|
18035
17742
|
checkAndupdateInputData(
|
|
18036
17743
|
primaryStackAreaAxisData,
|
|
18037
17744
|
primaryStackColumnAxisData,
|
|
@@ -18055,28 +17762,6 @@
|
|
|
18055
17762
|
});
|
|
18056
17763
|
drawCustomChart();
|
|
18057
17764
|
};
|
|
18058
|
-
function createTotalMeasureValueMapForCustomColumChart(data2, totalValueMap2, filteredDimension2) {
|
|
18059
|
-
totalValueMap2.clear();
|
|
18060
|
-
if (filteredDimension2 && filteredDimension2.length > 0) {
|
|
18061
|
-
filteredDimension2.forEach((dimension) => {
|
|
18062
|
-
let totalMeasureValue = 0;
|
|
18063
|
-
totalValueMap2.set(dimension, totalMeasureValue);
|
|
18064
|
-
});
|
|
18065
|
-
}
|
|
18066
|
-
if (data2.ChartData && data2.ChartData.length > 0) {
|
|
18067
|
-
data2.ChartData.forEach((series) => {
|
|
18068
|
-
if (series.properties.type.includes("Stack")) {
|
|
18069
|
-
series.data.forEach((dataPoint, index2) => {
|
|
18070
|
-
if (totalValueMap2.has(dataPoint.dimension)) {
|
|
18071
|
-
let existingTotal = totalValueMap2.get(dataPoint.dimension) || 0;
|
|
18072
|
-
existingTotal += dataPoint.value || 0;
|
|
18073
|
-
totalValueMap2.set(dataPoint.dimension, existingTotal);
|
|
18074
|
-
}
|
|
18075
|
-
});
|
|
18076
|
-
}
|
|
18077
|
-
});
|
|
18078
|
-
}
|
|
18079
|
-
}
|
|
18080
17765
|
const drawCustomChart = () => {
|
|
18081
17766
|
getXScale();
|
|
18082
17767
|
getXAxis();
|
|
@@ -18095,8 +17780,7 @@
|
|
|
18095
17780
|
isDateType,
|
|
18096
17781
|
innerWidth2,
|
|
18097
17782
|
innerHeight2,
|
|
18098
|
-
filteredDimension
|
|
18099
|
-
xScale
|
|
17783
|
+
filteredDimension
|
|
18100
17784
|
);
|
|
18101
17785
|
commonAnnotationsForCustomChart(
|
|
18102
17786
|
filteredData,
|
|
@@ -18126,24 +17810,10 @@
|
|
|
18126
17810
|
xScaleForLegends,
|
|
18127
17811
|
isReportEditable
|
|
18128
17812
|
);
|
|
18129
|
-
addTotalValue(
|
|
18130
|
-
totalValueMap,
|
|
18131
|
-
xScale,
|
|
18132
|
-
yScaleLeft,
|
|
18133
|
-
margin,
|
|
18134
|
-
d3Annotation,
|
|
18135
|
-
[],
|
|
18136
|
-
formatOptions,
|
|
18137
|
-
chartType,
|
|
18138
|
-
height,
|
|
18139
|
-
width,
|
|
18140
|
-
svg,
|
|
18141
|
-
isReportEditable
|
|
18142
|
-
);
|
|
18143
17813
|
};
|
|
18144
17814
|
const createStackData = (requiredStackChatData) => {
|
|
18145
17815
|
let legendList = requiredStackChatData.data.map((d) => d.legend);
|
|
18146
|
-
stackChartData = stack().keys(legendList).offset(
|
|
17816
|
+
stackChartData = stack().keys(legendList).offset(diverging)(requiredStackChatData.stackData);
|
|
18147
17817
|
requiredStackChatData.data.forEach(
|
|
18148
17818
|
(data2, index2) => data2.data.forEach((axisData, position) => {
|
|
18149
17819
|
axisData["0"] = stackChartData[index2][position][0];
|
|
@@ -18157,10 +17827,7 @@
|
|
|
18157
17827
|
stackData["color"] = JSON.parse(
|
|
18158
17828
|
JSON.stringify(requiredStackChatData.data[j].properties.color)
|
|
18159
17829
|
);
|
|
18160
|
-
|
|
18161
|
-
JSON.stringify(requiredStackChatData.data[j].properties.annotation)
|
|
18162
|
-
);
|
|
18163
|
-
d.data.labelPosition = formatOptions?.annotation?.annotationPosition.toString() === "4" ? requiredStackChatData.data[j].properties.dataLabelPosition.toString() : formatOptions?.annotation?.annotationPosition.toString();
|
|
17830
|
+
d.data.labelPosition = requiredStackChatData.data[j].properties.dataLabelPosition;
|
|
18164
17831
|
d.data["labelColor"] = seriesColor == "2" ? JSON.parse(
|
|
18165
17832
|
JSON.stringify(requiredStackChatData.data[j].properties.color)
|
|
18166
17833
|
) : JSON.parse(
|
|
@@ -18179,7 +17846,7 @@
|
|
|
18179
17846
|
d.data["color"] = JSON.parse(
|
|
18180
17847
|
JSON.stringify(requiredStackChatData.data[j].properties.color)
|
|
18181
17848
|
);
|
|
18182
|
-
d.data["legend"] =
|
|
17849
|
+
d.data["legend"] = `stackLegend`;
|
|
18183
17850
|
d.data["type"] = JSON.parse(
|
|
18184
17851
|
JSON.stringify(requiredStackChatData.data[j].properties.type)
|
|
18185
17852
|
);
|
|
@@ -18195,15 +17862,7 @@
|
|
|
18195
17862
|
chartJSON.yMinLeft = Math.min(chartJSON.yMinLeft, ...totals);
|
|
18196
17863
|
}
|
|
18197
17864
|
if (secondaryStackAxisData.length > 0) {
|
|
18198
|
-
const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(
|
|
18199
|
-
filteredDimension,
|
|
18200
|
-
secondaryStackColumnAxisData,
|
|
18201
|
-
false
|
|
18202
|
-
) : getStackedData(
|
|
18203
|
-
filteredDimension,
|
|
18204
|
-
secondaryStackAreaAxisData,
|
|
18205
|
-
false
|
|
18206
|
-
);
|
|
17865
|
+
const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(filteredDimension, secondaryStackColumnAxisData, false) : getStackedData(filteredDimension, secondaryStackAreaAxisData, false);
|
|
18207
17866
|
const totals = stackData.map((d) => d.total);
|
|
18208
17867
|
chartJSON.yMaxRight = Math.max(chartJSON.yMaxRight, ...totals);
|
|
18209
17868
|
chartJSON.yMinRight = Math.min(chartJSON.yMinRight, ...totals);
|
|
@@ -18237,14 +17896,14 @@
|
|
|
18237
17896
|
const barChart = false;
|
|
18238
17897
|
const isSecondaryAxisDrawn = false;
|
|
18239
17898
|
const isNormalizedChart = false;
|
|
18240
|
-
let customYaxisMinValue =
|
|
18241
|
-
let customYaxisMaxValue =
|
|
18242
|
-
|
|
17899
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
17900
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
17901
|
+
parseFloat(
|
|
18243
17902
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
18244
|
-
)
|
|
18245
|
-
|
|
17903
|
+
);
|
|
17904
|
+
parseFloat(
|
|
18246
17905
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
18247
|
-
)
|
|
17906
|
+
);
|
|
18248
17907
|
let margin;
|
|
18249
17908
|
let yLabel;
|
|
18250
17909
|
let xLabel;
|
|
@@ -18594,10 +18253,10 @@
|
|
|
18594
18253
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
18595
18254
|
}).attr("fill", data2.properties.color).attr(
|
|
18596
18255
|
"stroke-dasharray",
|
|
18597
|
-
(d) =>
|
|
18598
|
-
).attr("stroke-width", () => `${
|
|
18256
|
+
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
18257
|
+
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
18599
18258
|
"stroke",
|
|
18600
|
-
() => data2.properties.stackBorderStyle
|
|
18259
|
+
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
18601
18260
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr("opacity", 0.7).attr(
|
|
18602
18261
|
"visibility",
|
|
18603
18262
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -18666,8 +18325,7 @@
|
|
|
18666
18325
|
isDateType,
|
|
18667
18326
|
innerWidth2,
|
|
18668
18327
|
innerHeight2,
|
|
18669
|
-
filteredDimension
|
|
18670
|
-
xScale
|
|
18328
|
+
filteredDimension
|
|
18671
18329
|
);
|
|
18672
18330
|
commonAnnotations(
|
|
18673
18331
|
seriesData,
|
|
@@ -18756,14 +18414,14 @@
|
|
|
18756
18414
|
const seriesData = (generalizedChartData(data.ChartData, data.DimensionList) || []).reverse();
|
|
18757
18415
|
const barChart = false;
|
|
18758
18416
|
const isSecondaryAxisDrawn = false;
|
|
18759
|
-
let customYaxisMinValue =
|
|
18760
|
-
let customYaxisMaxValue =
|
|
18761
|
-
|
|
18417
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
18418
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
18419
|
+
parseFloat(
|
|
18762
18420
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
18763
|
-
)
|
|
18764
|
-
|
|
18421
|
+
);
|
|
18422
|
+
parseFloat(
|
|
18765
18423
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
18766
|
-
)
|
|
18424
|
+
);
|
|
18767
18425
|
let margin;
|
|
18768
18426
|
let yLabel;
|
|
18769
18427
|
let xLabel;
|
|
@@ -19078,16 +18736,16 @@
|
|
|
19078
18736
|
return props?.color || "gray";
|
|
19079
18737
|
}).attr("stroke", (d, i, nodes) => {
|
|
19080
18738
|
const { props } = getPropsForRect(nodes, i);
|
|
19081
|
-
return props?.stackBorderStyle
|
|
18739
|
+
return props?.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? props.stackBorderColor : "none";
|
|
19082
18740
|
}).attr("stroke-dasharray", (d, i, nodes) => {
|
|
19083
18741
|
const { props } = getPropsForRect(nodes, i);
|
|
19084
|
-
return props?.stackBorderStyle
|
|
18742
|
+
return props?.stackBorderStyle === 2 ? "5,3" : "0";
|
|
19085
18743
|
}).attr("stroke-width", (d, i, nodes) => {
|
|
19086
18744
|
const { props } = getPropsForRect(nodes, i);
|
|
19087
18745
|
return (props?.stackBorderWidth || 0) + "px";
|
|
19088
18746
|
}).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr("visibility", (d, i, nodes) => {
|
|
19089
18747
|
const { props } = getPropsForRect(nodes, i);
|
|
19090
|
-
return d.data[d.key]
|
|
18748
|
+
return d.data[d.key] === 0 && props?.hideZeroValues ? "hidden" : "visible";
|
|
19091
18749
|
}).on("mousemove", (event2, d) => {
|
|
19092
18750
|
showTooltipOnMouseMove(
|
|
19093
18751
|
[
|
|
@@ -19149,8 +18807,7 @@
|
|
|
19149
18807
|
isDateType,
|
|
19150
18808
|
innerWidth2,
|
|
19151
18809
|
innerHeight2,
|
|
19152
|
-
filteredDimension
|
|
19153
|
-
xScale
|
|
18810
|
+
filteredDimension
|
|
19154
18811
|
);
|
|
19155
18812
|
createStackLineData();
|
|
19156
18813
|
getChartType(filteredData);
|
|
@@ -19475,8 +19132,14 @@
|
|
|
19475
19132
|
const dimensionList = data.DimensionList;
|
|
19476
19133
|
const barChart = false;
|
|
19477
19134
|
const isSecondaryAxisDrawn = false;
|
|
19478
|
-
let customYaxisMinValue =
|
|
19479
|
-
let customYaxisMaxValue =
|
|
19135
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
19136
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
19137
|
+
parseFloat(
|
|
19138
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
19139
|
+
);
|
|
19140
|
+
parseFloat(
|
|
19141
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
19142
|
+
);
|
|
19480
19143
|
let margin;
|
|
19481
19144
|
let yLabel;
|
|
19482
19145
|
let xLabel;
|
|
@@ -19881,8 +19544,7 @@
|
|
|
19881
19544
|
isDateType,
|
|
19882
19545
|
innerWidth2,
|
|
19883
19546
|
innerHeight2,
|
|
19884
|
-
filteredDimension
|
|
19885
|
-
xScale
|
|
19547
|
+
filteredDimension
|
|
19886
19548
|
);
|
|
19887
19549
|
getChartType(filteredData);
|
|
19888
19550
|
stacklineAnnotations(
|
|
@@ -20497,10 +20159,16 @@
|
|
|
20497
20159
|
const barChart = false;
|
|
20498
20160
|
const isSecondaryAxisDrawn = false;
|
|
20499
20161
|
const isNormalizedChart = false;
|
|
20500
|
-
let customYaxisMinValue =
|
|
20501
|
-
let customYaxisMaxValue =
|
|
20502
|
-
let customXaxisMinValue =
|
|
20503
|
-
let customXaxisMaxValue =
|
|
20162
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
20163
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
20164
|
+
let customXaxisMinValue = parseFloat(formatOptions.xAxisLabel.xAxisMinText);
|
|
20165
|
+
let customXaxisMaxValue = parseFloat(formatOptions.xAxisLabel.xAxisMaxText);
|
|
20166
|
+
parseFloat(
|
|
20167
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
20168
|
+
);
|
|
20169
|
+
parseFloat(
|
|
20170
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
20171
|
+
);
|
|
20504
20172
|
let margin;
|
|
20505
20173
|
let yLabel;
|
|
20506
20174
|
let xLabel;
|
|
@@ -20976,8 +20644,7 @@
|
|
|
20976
20644
|
isDateType,
|
|
20977
20645
|
innerWidth2,
|
|
20978
20646
|
innerHeight2,
|
|
20979
|
-
filteredDimension
|
|
20980
|
-
xScale
|
|
20647
|
+
filteredDimension
|
|
20981
20648
|
);
|
|
20982
20649
|
getChartType();
|
|
20983
20650
|
};
|
|
@@ -21009,14 +20676,14 @@
|
|
|
21009
20676
|
const barChart = false;
|
|
21010
20677
|
let isSecondaryAxisDrawn = false;
|
|
21011
20678
|
const isNormalizedChart = false;
|
|
21012
|
-
let customYaxisMinValue =
|
|
21013
|
-
let customYaxisMaxValue =
|
|
21014
|
-
let secondaryCustomYaxisMinValue =
|
|
20679
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
20680
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
20681
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
21015
20682
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
21016
|
-
)
|
|
21017
|
-
let secondaryCustomYaxisMaxValue =
|
|
20683
|
+
);
|
|
20684
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
21018
20685
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
21019
|
-
)
|
|
20686
|
+
);
|
|
21020
20687
|
let margin;
|
|
21021
20688
|
let yLabel;
|
|
21022
20689
|
let xLabel;
|
|
@@ -21460,12 +21127,11 @@
|
|
|
21460
21127
|
xAxis,
|
|
21461
21128
|
dimensionHeightWidthArray,
|
|
21462
21129
|
height,
|
|
21463
|
-
|
|
21130
|
+
barWidth,
|
|
21464
21131
|
isDateType,
|
|
21465
21132
|
innerWidth2,
|
|
21466
21133
|
innerHeight2,
|
|
21467
|
-
filteredDimension
|
|
21468
|
-
xScale
|
|
21134
|
+
filteredDimension
|
|
21469
21135
|
);
|
|
21470
21136
|
getChartType(filteredData);
|
|
21471
21137
|
commonAnnotations(
|
|
@@ -21556,14 +21222,14 @@
|
|
|
21556
21222
|
const barChart = false;
|
|
21557
21223
|
const totalValueMap = /* @__PURE__ */ new Map();
|
|
21558
21224
|
const isSecondaryAxisDrawn = false;
|
|
21559
|
-
let customYaxisMinValue =
|
|
21560
|
-
let customYaxisMaxValue =
|
|
21561
|
-
let secondaryCustomYaxisMinValue =
|
|
21225
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
21226
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
21227
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
21562
21228
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
21563
|
-
)
|
|
21564
|
-
let secondaryCustomYaxisMaxValue =
|
|
21229
|
+
);
|
|
21230
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
21565
21231
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
21566
|
-
)
|
|
21232
|
+
);
|
|
21567
21233
|
let margin;
|
|
21568
21234
|
let yLabel;
|
|
21569
21235
|
let xLabel;
|
|
@@ -21998,8 +21664,7 @@
|
|
|
21998
21664
|
isDateType,
|
|
21999
21665
|
innerWidth2,
|
|
22000
21666
|
innerHeight2,
|
|
22001
|
-
filteredDimension
|
|
22002
|
-
xScale
|
|
21667
|
+
filteredDimension
|
|
22003
21668
|
);
|
|
22004
21669
|
createStackLineData();
|
|
22005
21670
|
getChartType(filteredData);
|
|
@@ -22130,14 +21795,14 @@
|
|
|
22130
21795
|
const dimensionList = data.DimensionList;
|
|
22131
21796
|
const barChart = false;
|
|
22132
21797
|
const isSecondaryAxisDrawn = false;
|
|
22133
|
-
let customYaxisMinValue =
|
|
22134
|
-
let customYaxisMaxValue =
|
|
22135
|
-
let secondaryCustomYaxisMinValue =
|
|
21798
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
21799
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
21800
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
22136
21801
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
22137
|
-
)
|
|
22138
|
-
let secondaryCustomYaxisMaxValue =
|
|
21802
|
+
);
|
|
21803
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
22139
21804
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
22140
|
-
)
|
|
21805
|
+
);
|
|
22141
21806
|
let margin;
|
|
22142
21807
|
let yLabel;
|
|
22143
21808
|
let xLabel;
|
|
@@ -22525,8 +22190,7 @@
|
|
|
22525
22190
|
isDateType,
|
|
22526
22191
|
innerWidth2,
|
|
22527
22192
|
innerHeight2,
|
|
22528
|
-
filteredDimension
|
|
22529
|
-
xScale
|
|
22193
|
+
filteredDimension
|
|
22530
22194
|
);
|
|
22531
22195
|
getChartType(filteredData);
|
|
22532
22196
|
stacklineAnnotations(
|
|
@@ -22648,14 +22312,14 @@
|
|
|
22648
22312
|
const barChart = true;
|
|
22649
22313
|
let isSecondaryAxisDrawn = false;
|
|
22650
22314
|
const isNormalizedChart = false;
|
|
22651
|
-
let customYaxisMinValue =
|
|
22652
|
-
let customYaxisMaxValue =
|
|
22653
|
-
let secondaryCustomYaxisMinValue =
|
|
22315
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
22316
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
22317
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
22654
22318
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
22655
|
-
)
|
|
22656
|
-
let secondaryCustomYaxisMaxValue =
|
|
22319
|
+
);
|
|
22320
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
22657
22321
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
22658
|
-
)
|
|
22322
|
+
);
|
|
22659
22323
|
let margin;
|
|
22660
22324
|
let yLabel;
|
|
22661
22325
|
let xLabel;
|
|
@@ -22898,9 +22562,7 @@
|
|
|
22898
22562
|
formatOptions,
|
|
22899
22563
|
chartJSON,
|
|
22900
22564
|
customYaxisMinValue,
|
|
22901
|
-
customYaxisMaxValue
|
|
22902
|
-
barChart,
|
|
22903
|
-
innerWidth2
|
|
22565
|
+
customYaxisMaxValue
|
|
22904
22566
|
).yAxisLabelArray;
|
|
22905
22567
|
chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
|
|
22906
22568
|
chartJSON.yMinLeft = yAxisLabelArray[0];
|
|
@@ -22979,7 +22641,7 @@
|
|
|
22979
22641
|
};
|
|
22980
22642
|
const getYAxis = () => {
|
|
22981
22643
|
yAxis = axisLeft(yScale).tickSize(
|
|
22982
|
-
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.
|
|
22644
|
+
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerWidth2 : parseFloat(formatOptions.plotArea.ticksHeight) * innerWidth2 * (formatOptions.xAxisLabel.xAxisPosition == "1" ? 1 : -1) : 0
|
|
22983
22645
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerHeight2));
|
|
22984
22646
|
};
|
|
22985
22647
|
const getChartType = (lineData) => {
|
|
@@ -22995,10 +22657,7 @@
|
|
|
22995
22657
|
lineData.forEach((data2) => {
|
|
22996
22658
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
22997
22659
|
column = column.enter().append("g").attr("class", "column parentGroup").merge(column);
|
|
22998
|
-
let columnGroups = column.selectAll(".column-group").data(
|
|
22999
|
-
data2.data.map((d) => ({ ...d, properties: data2.properties })),
|
|
23000
|
-
(d) => d.legend + d.dimension
|
|
23001
|
-
);
|
|
22660
|
+
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
23002
22661
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
23003
22662
|
"hoverId",
|
|
23004
22663
|
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
@@ -23068,7 +22727,7 @@
|
|
|
23068
22727
|
},
|
|
23069
22728
|
{
|
|
23070
22729
|
key: "Legend",
|
|
23071
|
-
value: d.
|
|
22730
|
+
value: d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend
|
|
23072
22731
|
}
|
|
23073
22732
|
],
|
|
23074
22733
|
formatOptions,
|
|
@@ -23092,14 +22751,12 @@
|
|
|
23092
22751
|
filteredDimension = fDimension;
|
|
23093
22752
|
visibleBars = fVisibleBars;
|
|
23094
22753
|
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
23095
|
-
if (formatOptions.xAxisLabel.hideZeroValues) {
|
|
23096
|
-
filteredDimension = filteredDimension.filter((d) => totalValueMap.get(d) !== 0);
|
|
23097
|
-
}
|
|
23098
22754
|
drawColumnChart();
|
|
23099
22755
|
};
|
|
23100
22756
|
const drawColumnChart = () => {
|
|
23101
22757
|
getYScale();
|
|
23102
22758
|
getYAxis();
|
|
22759
|
+
getChartType(filteredData);
|
|
23103
22760
|
initYaxisBar(
|
|
23104
22761
|
formatOptions,
|
|
23105
22762
|
gTag,
|
|
@@ -23115,10 +22772,8 @@
|
|
|
23115
22772
|
isDateType,
|
|
23116
22773
|
width,
|
|
23117
22774
|
dimensionHeightWidthArray,
|
|
23118
|
-
columnWidth
|
|
23119
|
-
yScale
|
|
22775
|
+
columnWidth
|
|
23120
22776
|
);
|
|
23121
|
-
getChartType(filteredData);
|
|
23122
22777
|
commonAnnotations(
|
|
23123
22778
|
filteredData,
|
|
23124
22779
|
yScale,
|
|
@@ -23176,8 +22831,14 @@
|
|
|
23176
22831
|
const dimensionList = data.DimensionList;
|
|
23177
22832
|
const barChart = true;
|
|
23178
22833
|
const isSecondaryAxisDrawn = false;
|
|
23179
|
-
let customYaxisMinValue =
|
|
23180
|
-
let customYaxisMaxValue =
|
|
22834
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
22835
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
22836
|
+
parseFloat(
|
|
22837
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
22838
|
+
);
|
|
22839
|
+
parseFloat(
|
|
22840
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
22841
|
+
);
|
|
23181
22842
|
let margin;
|
|
23182
22843
|
let yLabel;
|
|
23183
22844
|
let xLabel;
|
|
@@ -23461,7 +23122,7 @@
|
|
|
23461
23122
|
};
|
|
23462
23123
|
const getYAxis = () => {
|
|
23463
23124
|
yAxis = axisLeft(yScale).tickSize(
|
|
23464
|
-
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.
|
|
23125
|
+
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerWidth2 : parseFloat(formatOptions.plotArea.ticksHeight) * innerWidth2 * (formatOptions.xAxisLabel.xAxisPosition == "1" ? 1 : -1) : 0
|
|
23465
23126
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerHeight2));
|
|
23466
23127
|
};
|
|
23467
23128
|
const getChartType = (lineData) => {
|
|
@@ -23548,7 +23209,7 @@
|
|
|
23548
23209
|
filteredData = fData;
|
|
23549
23210
|
filteredDimension = fDimension;
|
|
23550
23211
|
visibleBars = fVisibleBars;
|
|
23551
|
-
createTotalMeasureValueMap(
|
|
23212
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
23552
23213
|
createStackLineData();
|
|
23553
23214
|
drawLineChart();
|
|
23554
23215
|
};
|
|
@@ -23570,8 +23231,7 @@
|
|
|
23570
23231
|
isDateType,
|
|
23571
23232
|
width,
|
|
23572
23233
|
dimensionHeightWidthArray,
|
|
23573
|
-
columnWidth
|
|
23574
|
-
yScale
|
|
23234
|
+
columnWidth
|
|
23575
23235
|
);
|
|
23576
23236
|
getChartType(filteredData);
|
|
23577
23237
|
stacklineAnnotations(
|
|
@@ -23880,8 +23540,14 @@
|
|
|
23880
23540
|
const dimensionList = data.DimensionList;
|
|
23881
23541
|
const barChart = true;
|
|
23882
23542
|
const isSecondaryAxisDrawn = false;
|
|
23883
|
-
let customYaxisMinValue =
|
|
23884
|
-
let customYaxisMaxValue =
|
|
23543
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
23544
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
23545
|
+
parseFloat(
|
|
23546
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
23547
|
+
);
|
|
23548
|
+
parseFloat(
|
|
23549
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
23550
|
+
);
|
|
23885
23551
|
let margin;
|
|
23886
23552
|
let yLabel;
|
|
23887
23553
|
let xLabel;
|
|
@@ -24128,9 +23794,13 @@
|
|
|
24128
23794
|
calculatedRange = [innerHeight2, 0];
|
|
24129
23795
|
};
|
|
24130
23796
|
const getYScale = () => {
|
|
24131
|
-
|
|
23797
|
+
columnWidth = (0.51 + 0.61 * (100 - parseFloat(formatOptions.plotArea.plotAreaGapWidth)) / 100) * (innerHeight2 / filteredDimension.length);
|
|
23798
|
+
yScale = band().domain(filteredDimension).range(calculatedRange).padding(
|
|
23799
|
+
0.3 * parseFloat(formatOptions.plotArea.plotAreaGapWidth) / 100
|
|
23800
|
+
);
|
|
24132
23801
|
};
|
|
24133
23802
|
const initAxis = () => {
|
|
23803
|
+
getYAxis();
|
|
24134
23804
|
{
|
|
24135
23805
|
xAxisBottom = axisBottom(xScaleBottom).tickSize(
|
|
24136
23806
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
|
|
@@ -24139,7 +23809,7 @@
|
|
|
24139
23809
|
};
|
|
24140
23810
|
const getYAxis = () => {
|
|
24141
23811
|
yAxis = axisLeft(yScale).tickSize(
|
|
24142
|
-
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.
|
|
23812
|
+
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerWidth2 : parseFloat(formatOptions.plotArea.ticksHeight) * innerWidth2 * (formatOptions.xAxisLabel.xAxisPosition == "1" ? 1 : -1) : 0
|
|
24143
23813
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerHeight2));
|
|
24144
23814
|
};
|
|
24145
23815
|
const getChartType = (lineData) => {
|
|
@@ -24173,7 +23843,7 @@
|
|
|
24173
23843
|
);
|
|
24174
23844
|
return { props: seriesData[groupIndex]?.properties, groupIndex };
|
|
24175
23845
|
};
|
|
24176
|
-
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) -
|
|
23846
|
+
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) - yScale.bandwidth() / 2).attr("height", yScale.bandwidth()).attr(
|
|
24177
23847
|
"fill",
|
|
24178
23848
|
(d, i, nodes) => getPropsForRect(nodes, i).props?.color || "gray"
|
|
24179
23849
|
).attr("stroke", (d, i, nodes) => {
|
|
@@ -24247,8 +23917,7 @@
|
|
|
24247
23917
|
isDateType,
|
|
24248
23918
|
width,
|
|
24249
23919
|
dimensionHeightWidthArray,
|
|
24250
|
-
columnWidth
|
|
24251
|
-
yScale
|
|
23920
|
+
columnWidth
|
|
24252
23921
|
);
|
|
24253
23922
|
getChartType(filteredData);
|
|
24254
23923
|
stacklineAnnotations(
|
|
@@ -24340,8 +24009,14 @@
|
|
|
24340
24009
|
const dimensionList = data.DimensionList;
|
|
24341
24010
|
const barChart = true;
|
|
24342
24011
|
const isSecondaryAxisDrawn = false;
|
|
24343
|
-
let customYaxisMinValue =
|
|
24344
|
-
let customYaxisMaxValue =
|
|
24012
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
24013
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
24014
|
+
parseFloat(
|
|
24015
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
24016
|
+
);
|
|
24017
|
+
parseFloat(
|
|
24018
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
24019
|
+
);
|
|
24345
24020
|
let margin;
|
|
24346
24021
|
let yLabel;
|
|
24347
24022
|
let xLabel;
|
|
@@ -24621,7 +24296,7 @@
|
|
|
24621
24296
|
};
|
|
24622
24297
|
const getYAxis = () => {
|
|
24623
24298
|
yAxis = axisLeft(yScale).tickSize(
|
|
24624
|
-
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.
|
|
24299
|
+
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerWidth2 : parseFloat(formatOptions.plotArea.ticksHeight) * innerWidth2 * (formatOptions.xAxisLabel.xAxisPosition == "1" ? 1 : -1) : 0
|
|
24625
24300
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerHeight2));
|
|
24626
24301
|
};
|
|
24627
24302
|
const getChartType = (lineData) => {
|
|
@@ -24739,8 +24414,7 @@
|
|
|
24739
24414
|
isDateType,
|
|
24740
24415
|
width,
|
|
24741
24416
|
dimensionHeightWidthArray,
|
|
24742
|
-
columnWidth
|
|
24743
|
-
yScale
|
|
24417
|
+
columnWidth
|
|
24744
24418
|
);
|
|
24745
24419
|
createStackLineData();
|
|
24746
24420
|
getChartType(filteredData);
|
|
@@ -25019,10 +24693,16 @@
|
|
|
25019
24693
|
const barChart = false;
|
|
25020
24694
|
const isSecondaryAxisDrawn = false;
|
|
25021
24695
|
const isNormalizedChart = false;
|
|
25022
|
-
let customYaxisMinValue =
|
|
25023
|
-
let customYaxisMaxValue =
|
|
25024
|
-
let customXaxisMinValue =
|
|
25025
|
-
let customXaxisMaxValue =
|
|
24696
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
24697
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
24698
|
+
let customXaxisMinValue = parseFloat(formatOptions.xAxisLabel.xAxisMinText);
|
|
24699
|
+
let customXaxisMaxValue = parseFloat(formatOptions.xAxisLabel.xAxisMaxText);
|
|
24700
|
+
parseFloat(
|
|
24701
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
24702
|
+
);
|
|
24703
|
+
parseFloat(
|
|
24704
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
24705
|
+
);
|
|
25026
24706
|
let margin;
|
|
25027
24707
|
let yLabel;
|
|
25028
24708
|
let xLabel;
|
|
@@ -25153,8 +24833,7 @@
|
|
|
25153
24833
|
isDateType,
|
|
25154
24834
|
innerWidth2,
|
|
25155
24835
|
innerHeight2,
|
|
25156
|
-
filteredDimension
|
|
25157
|
-
yScaleLeft
|
|
24836
|
+
filteredDimension
|
|
25158
24837
|
);
|
|
25159
24838
|
initYaxis$1(
|
|
25160
24839
|
gTag,
|
|
@@ -25533,14 +25212,14 @@
|
|
|
25533
25212
|
const barChart = false;
|
|
25534
25213
|
const isSecondaryAxisDrawn = false;
|
|
25535
25214
|
const isNormalizedChart = false;
|
|
25536
|
-
let customYaxisMinValue =
|
|
25537
|
-
let customYaxisMaxValue =
|
|
25538
|
-
let secondaryCustomYaxisMinValue =
|
|
25215
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
25216
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
25217
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
25539
25218
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
25540
|
-
)
|
|
25541
|
-
let secondaryCustomYaxisMaxValue =
|
|
25219
|
+
);
|
|
25220
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
25542
25221
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
25543
|
-
)
|
|
25222
|
+
);
|
|
25544
25223
|
let margin;
|
|
25545
25224
|
let yLabel;
|
|
25546
25225
|
let xLabel;
|
|
@@ -25858,7 +25537,6 @@
|
|
|
25858
25537
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
25859
25538
|
};
|
|
25860
25539
|
const getChartType = (lineData) => {
|
|
25861
|
-
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
25862
25540
|
lineData.forEach((lData) => {
|
|
25863
25541
|
lData.data.forEach((cData) => {
|
|
25864
25542
|
cData.hideZero = lData.properties.hideZeroValues;
|
|
@@ -25910,7 +25588,7 @@
|
|
|
25910
25588
|
(d2) => d2.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : strokeLineCap.butt
|
|
25911
25589
|
).attr(
|
|
25912
25590
|
"stroke-width",
|
|
25913
|
-
(d2) =>
|
|
25591
|
+
(d2) => d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
|
|
25914
25592
|
).attr("fill", "none");
|
|
25915
25593
|
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();
|
|
25916
25594
|
onHoverMarkerForAreaChartFamily(
|
|
@@ -25970,8 +25648,7 @@
|
|
|
25970
25648
|
isDateType,
|
|
25971
25649
|
innerWidth2,
|
|
25972
25650
|
innerHeight2,
|
|
25973
|
-
filteredDimension
|
|
25974
|
-
xScale
|
|
25651
|
+
filteredDimension
|
|
25975
25652
|
);
|
|
25976
25653
|
commonAnnotations(
|
|
25977
25654
|
seriesData,
|
|
@@ -26061,14 +25738,14 @@
|
|
|
26061
25738
|
const dimensionList = data.DimensionList;
|
|
26062
25739
|
const barChart = false;
|
|
26063
25740
|
const isSecondaryAxisDrawn = false;
|
|
26064
|
-
let customYaxisMinValue =
|
|
26065
|
-
let customYaxisMaxValue =
|
|
26066
|
-
let secondaryCustomYaxisMinValue =
|
|
25741
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
25742
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
25743
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
26067
25744
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
26068
|
-
)
|
|
26069
|
-
let secondaryCustomYaxisMaxValue =
|
|
25745
|
+
);
|
|
25746
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
26070
25747
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
26071
|
-
)
|
|
25748
|
+
);
|
|
26072
25749
|
let margin;
|
|
26073
25750
|
let yLabel;
|
|
26074
25751
|
let xLabel;
|
|
@@ -26400,7 +26077,6 @@
|
|
|
26400
26077
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
26401
26078
|
};
|
|
26402
26079
|
const getChartType = (lineData) => {
|
|
26403
|
-
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
26404
26080
|
lineData.forEach((lData) => {
|
|
26405
26081
|
lData.data.forEach((cData) => {
|
|
26406
26082
|
cData.hideZero = lData.properties.hideZeroValues;
|
|
@@ -26434,7 +26110,7 @@
|
|
|
26434
26110
|
const g = select$2(this);
|
|
26435
26111
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
|
|
26436
26112
|
"stroke",
|
|
26437
|
-
(d2) => d2.color !== commonColors.white ?
|
|
26113
|
+
(d2) => d2.color !== commonColors.white ? d2.color : "none"
|
|
26438
26114
|
).attr("stroke-dasharray", (d2) => {
|
|
26439
26115
|
const lineWidth = parseInt(
|
|
26440
26116
|
seriesData[i].properties.lineWidth.toString()
|
|
@@ -26452,7 +26128,7 @@
|
|
|
26452
26128
|
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
26453
26129
|
).attr(
|
|
26454
26130
|
"stroke-width",
|
|
26455
|
-
() =>
|
|
26131
|
+
(d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
|
|
26456
26132
|
).attr("fill", "none").style("pointer-events", "none");
|
|
26457
26133
|
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();
|
|
26458
26134
|
svg.selectAll(
|
|
@@ -26468,8 +26144,7 @@
|
|
|
26468
26144
|
lineData,
|
|
26469
26145
|
xScale,
|
|
26470
26146
|
yScaleLeft,
|
|
26471
|
-
chartType
|
|
26472
|
-
true
|
|
26147
|
+
chartType
|
|
26473
26148
|
);
|
|
26474
26149
|
lineMarkers(
|
|
26475
26150
|
areas,
|
|
@@ -26518,8 +26193,7 @@
|
|
|
26518
26193
|
isDateType,
|
|
26519
26194
|
innerWidth2,
|
|
26520
26195
|
innerHeight2,
|
|
26521
|
-
filteredDimension
|
|
26522
|
-
xScale
|
|
26196
|
+
filteredDimension
|
|
26523
26197
|
);
|
|
26524
26198
|
getChartType(filteredData);
|
|
26525
26199
|
stacklineAnnotations(
|
|
@@ -26652,14 +26326,14 @@
|
|
|
26652
26326
|
const dimensionList = data.DimensionList;
|
|
26653
26327
|
const barChart = false;
|
|
26654
26328
|
const isSecondaryAxisDrawn = false;
|
|
26655
|
-
let customYaxisMinValue =
|
|
26656
|
-
let customYaxisMaxValue =
|
|
26657
|
-
let secondaryCustomYaxisMinValue =
|
|
26329
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
26330
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
26331
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
26658
26332
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
26659
|
-
)
|
|
26660
|
-
let secondaryCustomYaxisMaxValue =
|
|
26333
|
+
);
|
|
26334
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
26661
26335
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
26662
|
-
)
|
|
26336
|
+
);
|
|
26663
26337
|
let margin;
|
|
26664
26338
|
let yLabel;
|
|
26665
26339
|
let xLabel;
|
|
@@ -26950,7 +26624,6 @@
|
|
|
26950
26624
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
26951
26625
|
};
|
|
26952
26626
|
const getChartType = (lineData) => {
|
|
26953
|
-
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
26954
26627
|
stackChartData.forEach(
|
|
26955
26628
|
(data2, i) => data2.forEach((item, position) => {
|
|
26956
26629
|
const total = item.data.total;
|
|
@@ -26992,7 +26665,7 @@
|
|
|
26992
26665
|
const g = select$2(this);
|
|
26993
26666
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
|
|
26994
26667
|
"stroke",
|
|
26995
|
-
(d2) => d2.color !== commonColors.white ?
|
|
26668
|
+
(d2) => d2.color !== commonColors.white ? d2.color : "none"
|
|
26996
26669
|
).attr("stroke-dasharray", (d2) => {
|
|
26997
26670
|
const lineWidth = parseInt(
|
|
26998
26671
|
seriesData[i].properties.lineWidth.toString()
|
|
@@ -27010,7 +26683,7 @@
|
|
|
27010
26683
|
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
27011
26684
|
).attr(
|
|
27012
26685
|
"stroke-width",
|
|
27013
|
-
() =>
|
|
26686
|
+
(d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
|
|
27014
26687
|
).attr("fill", "none").style("pointer-events", "none");
|
|
27015
26688
|
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();
|
|
27016
26689
|
svg.selectAll(
|
|
@@ -27028,8 +26701,7 @@
|
|
|
27028
26701
|
lineData,
|
|
27029
26702
|
xScale,
|
|
27030
26703
|
yScaleLeft,
|
|
27031
|
-
chartType
|
|
27032
|
-
true
|
|
26704
|
+
chartType
|
|
27033
26705
|
);
|
|
27034
26706
|
gTag.selectAll(".parentGroup").raise();
|
|
27035
26707
|
gTag.selectAll(".hoverLine").raise();
|
|
@@ -27105,8 +26777,7 @@
|
|
|
27105
26777
|
isDateType,
|
|
27106
26778
|
innerWidth2,
|
|
27107
26779
|
innerHeight2,
|
|
27108
|
-
filteredDimension
|
|
27109
|
-
xScale
|
|
26780
|
+
filteredDimension
|
|
27110
26781
|
);
|
|
27111
26782
|
getChartType(filteredData);
|
|
27112
26783
|
stacklineAnnotations(
|
|
@@ -27399,7 +27070,7 @@
|
|
|
27399
27070
|
try {
|
|
27400
27071
|
const arc2 = arc$1().innerRadius(0).outerRadius(radius);
|
|
27401
27072
|
const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
|
|
27402
|
-
chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`).selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path").attr(
|
|
27073
|
+
chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`).selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr(
|
|
27403
27074
|
"hoverId",
|
|
27404
27075
|
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27405
27076
|
).attr(
|
|
@@ -27793,7 +27464,7 @@
|
|
|
27793
27464
|
const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius);
|
|
27794
27465
|
const arcOver = arc$1().innerRadius(innerRadius).outerRadius(radius + 10);
|
|
27795
27466
|
const parentGroup = chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`);
|
|
27796
|
-
const paths = parentGroup.selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path").attr(
|
|
27467
|
+
const paths = parentGroup.selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr(
|
|
27797
27468
|
"hoverId",
|
|
27798
27469
|
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27799
27470
|
).attr(
|
|
@@ -29149,8 +28820,6 @@
|
|
|
29149
28820
|
let legendListWidth;
|
|
29150
28821
|
let radius;
|
|
29151
28822
|
let innerRadius;
|
|
29152
|
-
const arcIndex = 1;
|
|
29153
|
-
const progressIndex = 0;
|
|
29154
28823
|
require$$0$1.useEffect(() => {
|
|
29155
28824
|
drawChart();
|
|
29156
28825
|
}, [formatOptions]);
|
|
@@ -29210,22 +28879,23 @@
|
|
|
29210
28879
|
};
|
|
29211
28880
|
const initProgressChartData = () => {
|
|
29212
28881
|
try {
|
|
29213
|
-
|
|
28882
|
+
seriesData = seriesData.sort((a2, b) => b.data[0].value - a2.data[0].value);
|
|
28883
|
+
totalValue = ChartData[0].data[0].value + ChartData[1].data[0].value;
|
|
29214
28884
|
} catch (error) {
|
|
29215
28885
|
logError$2(fileName$3, "initProgressChartData", error);
|
|
29216
28886
|
}
|
|
29217
28887
|
};
|
|
29218
28888
|
const drawProgressChart = () => {
|
|
29219
28889
|
try {
|
|
29220
|
-
let maxValue = ChartData[
|
|
29221
|
-
let progressValue = ChartData[
|
|
28890
|
+
let maxValue = ChartData[0].data[0].value;
|
|
28891
|
+
let progressValue = ChartData[1].data[0].value;
|
|
29222
28892
|
let completeAngle = Math.PI * 2;
|
|
29223
28893
|
let progressAngle = progressValue / maxValue * Math.PI * 2;
|
|
29224
28894
|
let valuefontStyle = chartFormatOptions.plotArea.dataLabelValueFontStyle;
|
|
29225
28895
|
const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius).startAngle(0).cornerRadius(
|
|
29226
28896
|
convertStringToNumber(chartFormatOptions.plotArea.cornerRadius)
|
|
29227
28897
|
);
|
|
29228
|
-
chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill", ChartData[
|
|
28898
|
+
chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill", ChartData[0].properties.color).attr(
|
|
29229
28899
|
"fill-opacity",
|
|
29230
28900
|
chartFormatOptions.plotArea.opacityforProgressScale
|
|
29231
28901
|
).attr("d", arc2({ endAngle: completeAngle })).on("mousemove", (d) => {
|
|
@@ -29233,7 +28903,7 @@
|
|
|
29233
28903
|
showTooltipOnMouseMove(
|
|
29234
28904
|
[
|
|
29235
28905
|
{
|
|
29236
|
-
key: ChartData[
|
|
28906
|
+
key: ChartData[0].properties.alias,
|
|
29237
28907
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
|
|
29238
28908
|
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
29239
28909
|
chartFormatOptions.toolTip.toolTipNumberFormatProgress,
|
|
@@ -29243,7 +28913,7 @@
|
|
|
29243
28913
|
],
|
|
29244
28914
|
chartFormatOptions,
|
|
29245
28915
|
void 0,
|
|
29246
|
-
ChartData[
|
|
28916
|
+
ChartData[0].properties
|
|
29247
28917
|
);
|
|
29248
28918
|
} catch (error) {
|
|
29249
28919
|
logError$2(
|
|
@@ -29263,7 +28933,7 @@
|
|
|
29263
28933
|
);
|
|
29264
28934
|
}
|
|
29265
28935
|
}).attr("transform", getTransformString());
|
|
29266
|
-
chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill", ChartData[
|
|
28936
|
+
chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill", ChartData[1].properties.color).attr(
|
|
29267
28937
|
"fill-opacity",
|
|
29268
28938
|
chartFormatOptions.plotArea.opacityforProgressGoal
|
|
29269
28939
|
).attr("d", arc2({ endAngle: progressAngle })).on("mousemove", (d) => {
|
|
@@ -29271,7 +28941,7 @@
|
|
|
29271
28941
|
showTooltipOnMouseMove(
|
|
29272
28942
|
[
|
|
29273
28943
|
{
|
|
29274
|
-
key: ChartData[
|
|
28944
|
+
key: ChartData[1].properties.alias,
|
|
29275
28945
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? Math.round(progressValue / maxValue * 100) + "%" : getNumberWithFormatFunction(
|
|
29276
28946
|
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
29277
28947
|
chartFormatOptions.toolTip.toolTipDecimalPrecision,
|
|
@@ -29279,7 +28949,7 @@
|
|
|
29279
28949
|
)(maxValue)
|
|
29280
28950
|
},
|
|
29281
28951
|
{
|
|
29282
|
-
key: ChartData[
|
|
28952
|
+
key: ChartData[0].properties.alias,
|
|
29283
28953
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
|
|
29284
28954
|
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
29285
28955
|
chartFormatOptions.toolTip.toolTipDecimalPrecision,
|
|
@@ -29289,7 +28959,7 @@
|
|
|
29289
28959
|
],
|
|
29290
28960
|
chartFormatOptions,
|
|
29291
28961
|
void 0,
|
|
29292
|
-
ChartData[
|
|
28962
|
+
ChartData[1].properties
|
|
29293
28963
|
);
|
|
29294
28964
|
} catch (error) {
|
|
29295
28965
|
logError$2(
|
|
@@ -54089,22 +53759,27 @@
|
|
|
54089
53759
|
const WaterfallChart = ({
|
|
54090
53760
|
isDateType,
|
|
54091
53761
|
formatOptions,
|
|
54092
|
-
data
|
|
54093
|
-
isAdvancedAnalyticsWaterFall = false
|
|
53762
|
+
data
|
|
54094
53763
|
}) => {
|
|
54095
53764
|
const chartId = crypto.randomUUID?.();
|
|
54096
53765
|
let columnWidth = 0;
|
|
54097
53766
|
let colorScale;
|
|
54098
53767
|
const chartType = chartTypes.WaterfallChart;
|
|
54099
53768
|
const svgRef = require$$0$1.useRef();
|
|
54100
|
-
const isAdvancedWaterfall =
|
|
53769
|
+
const isAdvancedWaterfall = Array.isArray(data) && data.length > 0 && data[0]?.hasOwnProperty("Column1") && data[0]?.hasOwnProperty("Column6");
|
|
54101
53770
|
const seriesData = isAdvancedWaterfall ? [] : generalizedChartData(data.ChartData, data.DimensionList);
|
|
54102
53771
|
const dimensionList = data.DimensionList;
|
|
54103
53772
|
const barChart = false;
|
|
54104
53773
|
const isSecondaryAxisDrawn = false;
|
|
54105
53774
|
const isNormalizedChart = false;
|
|
54106
|
-
let customYaxisMinValue =
|
|
54107
|
-
let customYaxisMaxValue =
|
|
53775
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
53776
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
53777
|
+
parseFloat(
|
|
53778
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
53779
|
+
);
|
|
53780
|
+
parseFloat(
|
|
53781
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
53782
|
+
);
|
|
54108
53783
|
let margin;
|
|
54109
53784
|
let yLabel;
|
|
54110
53785
|
let xLabel;
|
|
@@ -54530,17 +54205,16 @@
|
|
|
54530
54205
|
"visibility",
|
|
54531
54206
|
(d) => k2 === 0 && d.data.dimension && stackTotalData ? "hidden" : "visible"
|
|
54532
54207
|
).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
54533
|
-
const key = !isAdvancedWaterfall ? waterfallKeys.dimensionTotal : waterfallKeys.base;
|
|
54534
54208
|
const markerInfo = {
|
|
54535
54209
|
markerShape: "square",
|
|
54536
|
-
markerColor: d.key ===
|
|
54210
|
+
markerColor: d.key === "dimensionTotal" ? formatOptions.plotArea.totalColor : d.key === "down" ? formatOptions.plotArea.negativeColor : formatOptions.plotArea.positiveColor
|
|
54537
54211
|
};
|
|
54538
54212
|
showTooltipOnMouseMove(
|
|
54539
54213
|
[
|
|
54540
54214
|
{
|
|
54541
54215
|
key: formatOptions.yAxisTitle.yAxisTitleText,
|
|
54542
|
-
value: (d.key ===
|
|
54543
|
-
d.key ===
|
|
54216
|
+
value: (d.key === "up" ? "+" : d.key === "down" ? "-" : "") + getNumberWithFormat(
|
|
54217
|
+
d.key === "dimensionTotal" ? d.data.dimensionTotal : d[1] - d[0],
|
|
54544
54218
|
formatOptions.toolTip.toolTipDisplayUnits,
|
|
54545
54219
|
formatOptions.toolTip.toolTipNumberFormat,
|
|
54546
54220
|
formatOptions.toolTip.toolTipDecimalPrecision
|
|
@@ -54548,7 +54222,7 @@
|
|
|
54548
54222
|
},
|
|
54549
54223
|
{
|
|
54550
54224
|
key: "Legend",
|
|
54551
|
-
value:
|
|
54225
|
+
value: d.Key ? d.Key.includes("~$~") ? d.Key.split("~$~")[1] : d.Key : d.data.legend ? d.data.legend.includes("~$~") ? d.data.legend.split("~$~")[1] : d.data.legend : "Total"
|
|
54552
54226
|
}
|
|
54553
54227
|
],
|
|
54554
54228
|
formatOptions,
|
|
@@ -54666,8 +54340,7 @@
|
|
|
54666
54340
|
isDateType,
|
|
54667
54341
|
innerWidth2,
|
|
54668
54342
|
innerHeight2,
|
|
54669
|
-
chartJSON.legendList
|
|
54670
|
-
xScale
|
|
54343
|
+
chartJSON.legendList
|
|
54671
54344
|
);
|
|
54672
54345
|
};
|
|
54673
54346
|
const generateWaterFallData = () => {
|
|
@@ -54754,14 +54427,13 @@
|
|
|
54754
54427
|
};
|
|
54755
54428
|
const toNumber = (v) => v === null || v === void 0 || v === "" ? 0 : Number(v);
|
|
54756
54429
|
const mapAdvancedWaterfallData = (rawData) => {
|
|
54757
|
-
|
|
54758
|
-
|
|
54759
|
-
|
|
54760
|
-
|
|
54761
|
-
|
|
54762
|
-
|
|
54763
|
-
|
|
54764
|
-
dimensionTotal: toNumber(d.Column2 || d.Base)
|
|
54430
|
+
return rawData.filter((d) => d.Column1 && d.Column1 !== "*").map((d) => ({
|
|
54431
|
+
xKey: d.Column1,
|
|
54432
|
+
base: toNumber(d.Column3),
|
|
54433
|
+
up: toNumber(d.Column4),
|
|
54434
|
+
down: toNumber(d.Column5),
|
|
54435
|
+
total: toNumber(d.Column6),
|
|
54436
|
+
dimensionTotal: toNumber(d.Column2)
|
|
54765
54437
|
}));
|
|
54766
54438
|
};
|
|
54767
54439
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -54785,18 +54457,23 @@
|
|
|
54785
54457
|
const chartType = chartTypes.TornadoChart;
|
|
54786
54458
|
const isAdvanceAnalyticsChart = data.IsadvanceanalyticsChart;
|
|
54787
54459
|
const svgRef = require$$0$1.useRef();
|
|
54788
|
-
|
|
54460
|
+
const seriesData = generalizedChartData(
|
|
54789
54461
|
data.ChartData,
|
|
54790
54462
|
data.DimensionList,
|
|
54791
54463
|
true
|
|
54792
54464
|
);
|
|
54793
|
-
seriesData = modifySeriesDataForTornadoChart(seriesData, data, isAdvanceAnalyticsChart);
|
|
54794
54465
|
const dimensionList = data.DimensionList;
|
|
54795
54466
|
const barChart = true;
|
|
54796
54467
|
const isSecondaryAxisDrawn = false;
|
|
54797
54468
|
const isNormalizedChart = false;
|
|
54798
|
-
let customYaxisMinValue =
|
|
54799
|
-
let customYaxisMaxValue =
|
|
54469
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
54470
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
54471
|
+
parseFloat(
|
|
54472
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
54473
|
+
);
|
|
54474
|
+
parseFloat(
|
|
54475
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
54476
|
+
);
|
|
54800
54477
|
let margin;
|
|
54801
54478
|
let yLabel;
|
|
54802
54479
|
let xLabel;
|
|
@@ -54827,8 +54504,7 @@
|
|
|
54827
54504
|
let filteredDimension;
|
|
54828
54505
|
let filteredData = [];
|
|
54829
54506
|
let scrollPosition = 0;
|
|
54830
|
-
|
|
54831
|
-
let scrollbarVisible = false;
|
|
54507
|
+
const visibleBars = 2;
|
|
54832
54508
|
let chartJSON = {
|
|
54833
54509
|
dimensionList,
|
|
54834
54510
|
chartType,
|
|
@@ -54856,7 +54532,6 @@
|
|
|
54856
54532
|
formatOptions
|
|
54857
54533
|
));
|
|
54858
54534
|
formatOptions.xAxisLabel.labelTextWrap = false;
|
|
54859
|
-
formatOptions.xAxisLabel.xAxisLabelRotation = 90;
|
|
54860
54535
|
preProcessChartData();
|
|
54861
54536
|
({ maxNumberForPrimaryAxis, maxNumberForSecondaryAxis } = customYscaleLabelFormatting$1(
|
|
54862
54537
|
// for calculating primary/secondary axis max number so that we can calculate margin accordinglt
|
|
@@ -54876,10 +54551,7 @@
|
|
|
54876
54551
|
chartTitleHeight,
|
|
54877
54552
|
secondaryAxisTitleWidth,
|
|
54878
54553
|
legendMargin,
|
|
54879
|
-
secondaryYLabel
|
|
54880
|
-
visibleBars,
|
|
54881
|
-
columnWidth,
|
|
54882
|
-
scrollbarVisible
|
|
54554
|
+
secondaryYLabel
|
|
54883
54555
|
} = marginCalculation(
|
|
54884
54556
|
// for all margin related calculations
|
|
54885
54557
|
width,
|
|
@@ -54894,8 +54566,7 @@
|
|
|
54894
54566
|
isSecondaryAxisDrawn,
|
|
54895
54567
|
isNormalizedChart,
|
|
54896
54568
|
isDateType,
|
|
54897
|
-
true
|
|
54898
|
-
chartJSON
|
|
54569
|
+
true
|
|
54899
54570
|
));
|
|
54900
54571
|
setSVGContainer(margin);
|
|
54901
54572
|
({ dataTable, dataTableHeight } = dataTablePreCalculation(
|
|
@@ -54939,8 +54610,7 @@
|
|
|
54939
54610
|
isDateType,
|
|
54940
54611
|
width,
|
|
54941
54612
|
dimensionHeightWidthArray,
|
|
54942
|
-
columnWidth
|
|
54943
|
-
yScaleLeft
|
|
54613
|
+
columnWidth
|
|
54944
54614
|
);
|
|
54945
54615
|
horizontalScrollBar2(seriesData, height, svg, margin, innerWidth2);
|
|
54946
54616
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
@@ -55105,6 +54775,7 @@
|
|
|
55105
54775
|
}
|
|
55106
54776
|
};
|
|
55107
54777
|
const initScale = () => {
|
|
54778
|
+
columnWidth = (0.51 + 0.61 * (100 - parseFloat(formatOptions.plotArea.plotAreaGapWidth)) / 100) * (innerHeight2 / filteredDimension.length);
|
|
55108
54779
|
let right2 = false;
|
|
55109
54780
|
let left2 = false;
|
|
55110
54781
|
let maxValue;
|
|
@@ -55127,7 +54798,7 @@
|
|
|
55127
54798
|
getXScale();
|
|
55128
54799
|
};
|
|
55129
54800
|
const getXScale = () => {
|
|
55130
|
-
yScaleLeft =
|
|
54801
|
+
yScaleLeft = band().domain(chartJSON.dimensionList).range([innerHeight2, 0]).padding(0.35);
|
|
55131
54802
|
};
|
|
55132
54803
|
const initAxis = () => {
|
|
55133
54804
|
getXAxis();
|
|
@@ -55190,8 +54861,8 @@
|
|
|
55190
54861
|
)
|
|
55191
54862
|
).enter().append("rect").attr("class", "rect").attr(
|
|
55192
54863
|
"y",
|
|
55193
|
-
(d) =>
|
|
55194
|
-
).attr("height",
|
|
54864
|
+
(d) => d.legendText ? yScaleLeft(d.legendText) : yScaleLeft(chartTypes.TornadoDefaultEntry)
|
|
54865
|
+
).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(
|
|
55195
54866
|
"stroke-dasharray",
|
|
55196
54867
|
(d) => d.properties.stackBorderStyle == 2 ? "5,3" : "0"
|
|
55197
54868
|
).attr("stroke-width", (d) => `${d.properties.stackBorderWidth}px`).attr(
|
|
@@ -55320,10 +54991,9 @@
|
|
|
55320
54991
|
svg,
|
|
55321
54992
|
yScaleLeft,
|
|
55322
54993
|
columnWidth,
|
|
55323
|
-
isReportEditable,
|
|
55324
54994
|
isAdvanceAnalyticsChart,
|
|
55325
|
-
|
|
55326
|
-
|
|
54995
|
+
isReportEditable,
|
|
54996
|
+
barChart
|
|
55327
54997
|
);
|
|
55328
54998
|
};
|
|
55329
54999
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|