pace-chart-lib 1.0.31 → 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 +28 -2
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisTypes.types.d.ts +0 -1
- package/dist/Components/Charts/Core/Common.types.d.ts +1 -8
- package/dist/Components/Charts/Core/CommonFunctions.d.ts +1 -1
- package/dist/Components/Charts/Core/DefaultProperties.types.d.ts +0 -1
- package/dist/pace-chart-lib.es.js +265 -505
- package/dist/pace-chart-lib.umd.js +265 -505
- 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,
|
|
@@ -11446,8 +11438,7 @@
|
|
|
11446
11438
|
dataTableNumberFormat: ",",
|
|
11447
11439
|
dataTableDecimalPrecision: "2",
|
|
11448
11440
|
dataTableDisplayUnits: "None",
|
|
11449
|
-
dataTableLabelColor: commonColors.black
|
|
11450
|
-
dataTableAxisLabel: true
|
|
11441
|
+
dataTableLabelColor: commonColors.black
|
|
11451
11442
|
},
|
|
11452
11443
|
dataTableOuterBorder: {
|
|
11453
11444
|
borderButtonVisibility: true,
|
|
@@ -11788,7 +11779,7 @@
|
|
|
11788
11779
|
bottom2 = xAxisRelatedMargin + 5 + scrollHeightConstant;
|
|
11789
11780
|
break;
|
|
11790
11781
|
case staticLegendPosition.bottom:
|
|
11791
|
-
bottom2 =
|
|
11782
|
+
bottom2 = 40 + xAxisRelatedMargin + scrollHeightConstant;
|
|
11792
11783
|
top2 = metrics.chartTitleHeight + 5 + (isNormalizedChart ? 12 : 0);
|
|
11793
11784
|
break;
|
|
11794
11785
|
case staticLegendPosition.left:
|
|
@@ -12106,45 +12097,21 @@
|
|
|
12106
12097
|
return format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12107
12098
|
case staticNumberUnits.currency_USD:
|
|
12108
12099
|
formatter = `,.${decimalValues}f`;
|
|
12109
|
-
if (measureValue < 0) {
|
|
12110
|
-
const number2 = Math.abs(measureValue);
|
|
12111
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12112
|
-
}
|
|
12113
12100
|
return "$" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12114
12101
|
case staticNumberUnits.currency_CAD:
|
|
12115
12102
|
formatter = `,.${decimalValues}f`;
|
|
12116
|
-
if (measureValue < 0) {
|
|
12117
|
-
const number2 = Math.abs(measureValue);
|
|
12118
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12119
|
-
}
|
|
12120
12103
|
return "C$" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12121
12104
|
case staticNumberUnits.currency_EUR:
|
|
12122
12105
|
formatter = `,.${decimalValues}f`;
|
|
12123
|
-
if (measureValue < 0) {
|
|
12124
|
-
const number2 = Math.abs(measureValue);
|
|
12125
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12126
|
-
}
|
|
12127
12106
|
return "€" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12128
12107
|
case staticNumberUnits.currency_CHF:
|
|
12129
12108
|
formatter = `,.${decimalValues}f`;
|
|
12130
|
-
if (measureValue < 0) {
|
|
12131
|
-
const number2 = Math.abs(measureValue);
|
|
12132
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12133
|
-
}
|
|
12134
12109
|
return "CHF" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12135
12110
|
case staticNumberUnits.currency_UK:
|
|
12136
12111
|
formatter = `,.${decimalValues}f`;
|
|
12137
|
-
if (measureValue < 0) {
|
|
12138
|
-
const number2 = Math.abs(measureValue);
|
|
12139
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12140
|
-
}
|
|
12141
12112
|
return "£" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12142
12113
|
case staticNumberUnits.currency_INR:
|
|
12143
12114
|
formatter = `,.${decimalValues}f`;
|
|
12144
|
-
if (measureValue < 0) {
|
|
12145
|
-
const number2 = Math.abs(measureValue);
|
|
12146
|
-
return "-$" + format(formatter)(number2) + displayUnitsPostFix;
|
|
12147
|
-
}
|
|
12148
12115
|
return "₹" + format(formatter)(measureValue) + displayUnitsPostFix;
|
|
12149
12116
|
case staticNumberUnits.commaSeparated:
|
|
12150
12117
|
formatter = `,.${decimalValues}f`;
|
|
@@ -12323,9 +12290,10 @@
|
|
|
12323
12290
|
}
|
|
12324
12291
|
function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJSON, customYaxisMinValue, customYaxisMaxValue, barChart, innerWidth2) {
|
|
12325
12292
|
try {
|
|
12326
|
-
let yAxisIntervalsVisibility = formatOptions.yAxisLabel.yAxisIntervalsVisibility;
|
|
12327
12293
|
let autoLabelFlag = false;
|
|
12328
|
-
let customYaxisIntervalValue =
|
|
12294
|
+
let customYaxisIntervalValue = parseFloat(
|
|
12295
|
+
formatOptions.yAxisLabel.yAxisIntervalText
|
|
12296
|
+
);
|
|
12329
12297
|
let yAxisLabelArray = [];
|
|
12330
12298
|
let customTickValue;
|
|
12331
12299
|
const isTornadoChart = chartJSON.chartType === chartTypes.TornadoChart;
|
|
@@ -12841,15 +12809,8 @@
|
|
|
12841
12809
|
"visibility",
|
|
12842
12810
|
formatOptions.chartTitle.chartTitleVisibility ? "visible" : "hidden"
|
|
12843
12811
|
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", width).attr("height", chartTitleHeight + "px");
|
|
12844
|
-
const parseHTMLText = (html) => {
|
|
12845
|
-
const temp = document.createElement("div");
|
|
12846
|
-
temp.innerHTML = html;
|
|
12847
|
-
return temp.textContent || temp.innerText || "";
|
|
12848
|
-
};
|
|
12849
|
-
const hasHTML = !!formatOptions.chartTitle.chartTitleHTML;
|
|
12850
|
-
const titleText = hasHTML ? parseHTMLText(formatOptions.chartTitle.chartTitleHTML) : formatOptions.chartTitle.chartTitleText;
|
|
12851
12812
|
if (formatOptions.chartTitle.dynamicTitleText.length !== 0) {
|
|
12852
|
-
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(
|
|
12853
12814
|
formatOptions.chartTitle.chartTitleHTML ? formatOptions.chartTitle.chartTitleHTML : formatOptions.chartTitle.chartTitleText
|
|
12854
12815
|
);
|
|
12855
12816
|
} else {
|
|
@@ -12876,13 +12837,11 @@
|
|
|
12876
12837
|
if (index2 == -1) return legend;
|
|
12877
12838
|
return legend.slice(index2 + 3);
|
|
12878
12839
|
}
|
|
12879
|
-
|
|
12880
|
-
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) {
|
|
12881
12841
|
try {
|
|
12882
12842
|
const isTornadoChart = chartType === chartTypes.TornadoChart;
|
|
12883
12843
|
let annotationType = formatOptions.annotation.annotationType ?? "1";
|
|
12884
12844
|
let annotationPosition = formatOptions.annotation.annotationPosition.toString() != "4" ? formatOptions.annotation.annotationPosition : null;
|
|
12885
|
-
let dataLabelColor = formatOptions?.annotation?.annotationSetLabelColor == "2" ? "color" : "labelColor";
|
|
12886
12845
|
if (formatOptions.annotation.annotationVisibility) {
|
|
12887
12846
|
let Disable = [annotationType == "1" ? "connector" : ""];
|
|
12888
12847
|
let labelData = [];
|
|
@@ -12916,8 +12875,7 @@
|
|
|
12916
12875
|
Measure: d.data[0].value,
|
|
12917
12876
|
Legend: d.data[0].legend,
|
|
12918
12877
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12919
|
-
Labelcolor: d.properties
|
|
12920
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12878
|
+
Labelcolor: d.properties.labelColor,
|
|
12921
12879
|
Axis: d.properties.axis
|
|
12922
12880
|
});
|
|
12923
12881
|
}
|
|
@@ -12932,8 +12890,7 @@
|
|
|
12932
12890
|
Measure: d.data[d.data.length - 1].value,
|
|
12933
12891
|
Legend: d.data[d.data.length - 1].legend,
|
|
12934
12892
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12935
|
-
Labelcolor: d.properties
|
|
12936
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12893
|
+
Labelcolor: d.properties.labelColor,
|
|
12937
12894
|
Axis: d.properties.axis
|
|
12938
12895
|
});
|
|
12939
12896
|
}
|
|
@@ -12949,8 +12906,7 @@
|
|
|
12949
12906
|
Measure: d.data[0].value,
|
|
12950
12907
|
Legend: d.data[0].legend,
|
|
12951
12908
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12952
|
-
Labelcolor: d.properties
|
|
12953
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12909
|
+
Labelcolor: d.properties.labelColor,
|
|
12954
12910
|
Axis: d.properties.axis
|
|
12955
12911
|
});
|
|
12956
12912
|
}
|
|
@@ -12963,8 +12919,7 @@
|
|
|
12963
12919
|
Measure: d.data[d.data.length - 1].value,
|
|
12964
12920
|
Legend: d.data[d.data.length - 1].legend,
|
|
12965
12921
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12966
|
-
Labelcolor: d.properties
|
|
12967
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12922
|
+
Labelcolor: d.properties.labelColor,
|
|
12968
12923
|
Axis: d.properties.axis
|
|
12969
12924
|
});
|
|
12970
12925
|
}
|
|
@@ -12980,8 +12935,7 @@
|
|
|
12980
12935
|
Measure: d.data[i].value,
|
|
12981
12936
|
Legend: d.data[i].legend,
|
|
12982
12937
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12983
|
-
Labelcolor: d.properties
|
|
12984
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12938
|
+
Labelcolor: d.properties.labelColor,
|
|
12985
12939
|
Axis: d.properties.axis
|
|
12986
12940
|
});
|
|
12987
12941
|
}
|
|
@@ -13003,8 +12957,7 @@
|
|
|
13003
12957
|
Measure: d.data[i].value,
|
|
13004
12958
|
Legend: d.data[i].legend,
|
|
13005
12959
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13006
|
-
Labelcolor: d.properties
|
|
13007
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12960
|
+
Labelcolor: d.properties.labelColor,
|
|
13008
12961
|
Axis: d.properties.axis
|
|
13009
12962
|
});
|
|
13010
12963
|
}
|
|
@@ -13019,8 +12972,7 @@
|
|
|
13019
12972
|
Measure: d.data[0].value,
|
|
13020
12973
|
Legend: d.data[0].legend,
|
|
13021
12974
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13022
|
-
Labelcolor: d.properties
|
|
13023
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12975
|
+
Labelcolor: d.properties.labelColor,
|
|
13024
12976
|
Axis: d.properties.axis
|
|
13025
12977
|
});
|
|
13026
12978
|
break;
|
|
@@ -13031,8 +12983,7 @@
|
|
|
13031
12983
|
Measure: d.data[d.data.length - 1].value,
|
|
13032
12984
|
Legend: d.data[d.data.length - 1].legend,
|
|
13033
12985
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13034
|
-
Labelcolor: d.properties
|
|
13035
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12986
|
+
Labelcolor: d.properties.labelColor,
|
|
13036
12987
|
Axis: d.properties.axis
|
|
13037
12988
|
});
|
|
13038
12989
|
break;
|
|
@@ -13043,8 +12994,7 @@
|
|
|
13043
12994
|
Measure: d.data[0].value,
|
|
13044
12995
|
Legend: d.data[0].legend,
|
|
13045
12996
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13046
|
-
Labelcolor: d.properties
|
|
13047
|
-
hoverText: getHoverText(d, isAATornado),
|
|
12997
|
+
Labelcolor: d.properties.labelColor,
|
|
13048
12998
|
Axis: d.properties.axis
|
|
13049
12999
|
});
|
|
13050
13000
|
if (d.data[d.data.length - 1])
|
|
@@ -13053,8 +13003,7 @@
|
|
|
13053
13003
|
Measure: d.data[d.data.length - 1].value,
|
|
13054
13004
|
Legend: d.data[d.data.length - 1].legend,
|
|
13055
13005
|
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13056
|
-
Labelcolor: d.properties
|
|
13057
|
-
hoverText: getHoverText(d, isAATornado),
|
|
13006
|
+
Labelcolor: d.properties.labelColor,
|
|
13058
13007
|
Axis: d.properties.axis
|
|
13059
13008
|
});
|
|
13060
13009
|
break;
|
|
@@ -13086,8 +13035,7 @@
|
|
|
13086
13035
|
position: parseInt(d.LabelPosition),
|
|
13087
13036
|
currentLegend: d.Legend,
|
|
13088
13037
|
//d.Legend.replaceAll(" ", "-"), need to check for this case by space replaced with -
|
|
13089
|
-
isVisible: true
|
|
13090
|
-
hoverId: d.hoverText.replace(/\s+/g, "-")
|
|
13038
|
+
isVisible: true
|
|
13091
13039
|
} : {
|
|
13092
13040
|
x: d.Dimension,
|
|
13093
13041
|
y: { measure: d.Measure, axis: d.Axis },
|
|
@@ -13113,7 +13061,7 @@
|
|
|
13113
13061
|
};
|
|
13114
13062
|
if (barChart) {
|
|
13115
13063
|
let requiredXScale = d.Axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
13116
|
-
(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;
|
|
13117
13065
|
} else {
|
|
13118
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;
|
|
13119
13067
|
}
|
|
@@ -13261,7 +13209,7 @@
|
|
|
13261
13209
|
}
|
|
13262
13210
|
for (let i = 0; i < chartData.length; i++) {
|
|
13263
13211
|
chartData.forEach((d) => {
|
|
13264
|
-
if (d.properties.type && d.properties.type !=
|
|
13212
|
+
if (d.properties.type && d.properties.type != "Column" && !getChartType.includes(d.properties.type))
|
|
13265
13213
|
getChartType.push(d.properties.type);
|
|
13266
13214
|
});
|
|
13267
13215
|
}
|
|
@@ -13369,168 +13317,6 @@
|
|
|
13369
13317
|
labelData;
|
|
13370
13318
|
break;
|
|
13371
13319
|
case "6":
|
|
13372
|
-
chartData.forEach((d, k2) => {
|
|
13373
|
-
let annotationVisibility = d.properties.annotation.toString();
|
|
13374
|
-
switch (d.properties.type) {
|
|
13375
|
-
case chartTypes.ColumnChart:
|
|
13376
|
-
switch (annotationVisibility) {
|
|
13377
|
-
case "1":
|
|
13378
|
-
for (let i = 0; i < chartData[k2].data.length; i++) {
|
|
13379
|
-
labelData.push(d.data[i]);
|
|
13380
|
-
}
|
|
13381
|
-
break;
|
|
13382
|
-
case "2":
|
|
13383
|
-
labelData;
|
|
13384
|
-
break;
|
|
13385
|
-
case "3":
|
|
13386
|
-
labelData.push(d.data[0]);
|
|
13387
|
-
break;
|
|
13388
|
-
case "4":
|
|
13389
|
-
labelData.push(d.data[d.data.length - 1]);
|
|
13390
|
-
break;
|
|
13391
|
-
case "5":
|
|
13392
|
-
labelData.push(d.data[0]);
|
|
13393
|
-
labelData.push(d.data[d.data.length - 1]);
|
|
13394
|
-
break;
|
|
13395
|
-
}
|
|
13396
|
-
break;
|
|
13397
|
-
case chartTypes.AreaChart:
|
|
13398
|
-
case chartTypes.LineChart:
|
|
13399
|
-
switch (annotationVisibility) {
|
|
13400
|
-
case "1":
|
|
13401
|
-
for (let i = 0; i < chartData[k2].data.length; i++) {
|
|
13402
|
-
labelData.push(
|
|
13403
|
-
{
|
|
13404
|
-
dimension: d.data[i].dimension,
|
|
13405
|
-
value: d.data[i].value,
|
|
13406
|
-
legend: d.data[i].legend,
|
|
13407
|
-
labelPosition: d.data[i].labelPosition,
|
|
13408
|
-
labelColor: d.data[i].labelColor,
|
|
13409
|
-
axis: d.data[i].axis,
|
|
13410
|
-
type: chartTypes.LineChart
|
|
13411
|
-
}
|
|
13412
|
-
);
|
|
13413
|
-
}
|
|
13414
|
-
break;
|
|
13415
|
-
case "2":
|
|
13416
|
-
labelData;
|
|
13417
|
-
break;
|
|
13418
|
-
case "3":
|
|
13419
|
-
labelData.push(
|
|
13420
|
-
{
|
|
13421
|
-
dimension: d.data[0].dimension,
|
|
13422
|
-
value: d.data[0].value,
|
|
13423
|
-
legend: d.data[0].legend,
|
|
13424
|
-
labelPosition: d.data[0].labelPosition,
|
|
13425
|
-
labelcolor: d.data[0].labelColor,
|
|
13426
|
-
axis: d.data[0].axis,
|
|
13427
|
-
type: chartTypes.LineChart
|
|
13428
|
-
}
|
|
13429
|
-
);
|
|
13430
|
-
break;
|
|
13431
|
-
case "4":
|
|
13432
|
-
labelData.push(
|
|
13433
|
-
{
|
|
13434
|
-
dimension: d.data[d.data.length - 1].dimension,
|
|
13435
|
-
value: d.data[d.data.length - 1].value,
|
|
13436
|
-
legend: d.data[d.data.length - 1].legend,
|
|
13437
|
-
labelPosition: d.data[d.data.length - 1].labelPosition,
|
|
13438
|
-
labelcolor: d.data[d.data.length - 1].labelColor,
|
|
13439
|
-
axis: d.data[d.data.length - 1].axis,
|
|
13440
|
-
type: chartTypes.LineChart
|
|
13441
|
-
}
|
|
13442
|
-
);
|
|
13443
|
-
break;
|
|
13444
|
-
case "5":
|
|
13445
|
-
labelData.push(
|
|
13446
|
-
{
|
|
13447
|
-
dimension: d.data[0].dimension,
|
|
13448
|
-
value: d.data[0].value,
|
|
13449
|
-
legend: d.data[0].legend,
|
|
13450
|
-
labelPosition: d.data[0].labelPosition,
|
|
13451
|
-
labelcolor: d.data[0].labelColor,
|
|
13452
|
-
axis: d.data[0].axis,
|
|
13453
|
-
type: chartTypes.LineChart
|
|
13454
|
-
}
|
|
13455
|
-
);
|
|
13456
|
-
labelData.push(
|
|
13457
|
-
{
|
|
13458
|
-
dimension: d.data[d.data.length - 1].dimension,
|
|
13459
|
-
value: d.data[d.data.length - 1].value,
|
|
13460
|
-
legend: d.data[d.data.length - 1].legend,
|
|
13461
|
-
labelPosition: d.data[d.data.length - 1].labelPosition,
|
|
13462
|
-
labelcolor: d.data[d.data.length - 1].labelColor,
|
|
13463
|
-
axis: d.data[d.data.length - 1].axis,
|
|
13464
|
-
type: chartTypes.LineChart
|
|
13465
|
-
}
|
|
13466
|
-
);
|
|
13467
|
-
break;
|
|
13468
|
-
}
|
|
13469
|
-
break;
|
|
13470
|
-
case chartTypes.StackColumnChart:
|
|
13471
|
-
const stackColumnIndex = stackColumnData.findIndex((id2) => id2.key === d.properties.legend);
|
|
13472
|
-
stackColumnIndex !== -1 && stackColumnData[stackColumnIndex].forEach((dta, j) => {
|
|
13473
|
-
switch (String(stackColumnData[stackColumnIndex].individualAnnotationVisibility)) {
|
|
13474
|
-
case "1":
|
|
13475
|
-
labelData.push(stackColumnData[stackColumnIndex][j]);
|
|
13476
|
-
break;
|
|
13477
|
-
case "2":
|
|
13478
|
-
labelData;
|
|
13479
|
-
break;
|
|
13480
|
-
case "3":
|
|
13481
|
-
let label3 = stackColumnData[stackColumnIndex][0];
|
|
13482
|
-
if (!labelData.find((data) => data.key == label3.key))
|
|
13483
|
-
labelData.push(label3);
|
|
13484
|
-
break;
|
|
13485
|
-
case "4":
|
|
13486
|
-
let label4 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
|
|
13487
|
-
if (!labelData.find((data) => data.key == label4.key))
|
|
13488
|
-
labelData.push(label4);
|
|
13489
|
-
break;
|
|
13490
|
-
case "5":
|
|
13491
|
-
let label5 = stackColumnData[stackColumnIndex][0];
|
|
13492
|
-
let label6 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
|
|
13493
|
-
if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
|
|
13494
|
-
labelData.push(stackColumnData[stackColumnIndex][0]);
|
|
13495
|
-
labelData.push(stackColumnData[stackColumnIndex][stackColumnData[0].length - 1]);
|
|
13496
|
-
break;
|
|
13497
|
-
}
|
|
13498
|
-
}
|
|
13499
|
-
});
|
|
13500
|
-
break;
|
|
13501
|
-
case chartTypes.StackAreaChart:
|
|
13502
|
-
const stackIndex = stackAreaData.findIndex((id2) => id2.key === d.properties.legend);
|
|
13503
|
-
stackIndex != -1 && stackAreaData[stackIndex].forEach((dta, j) => {
|
|
13504
|
-
switch (String(stackAreaData[stackIndex].individualAnnotationVisibility)) {
|
|
13505
|
-
case "1":
|
|
13506
|
-
labelData.push(stackAreaData[stackIndex][j]);
|
|
13507
|
-
break;
|
|
13508
|
-
case "2":
|
|
13509
|
-
labelData;
|
|
13510
|
-
break;
|
|
13511
|
-
case "3":
|
|
13512
|
-
let label3 = stackAreaData[stackIndex][0];
|
|
13513
|
-
if (!labelData.find((data) => data.key == label3.key))
|
|
13514
|
-
labelData.push(label3);
|
|
13515
|
-
break;
|
|
13516
|
-
case "4":
|
|
13517
|
-
let label4 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
|
|
13518
|
-
if (!labelData.find((data) => data.key == label4.key))
|
|
13519
|
-
labelData.push(label4);
|
|
13520
|
-
break;
|
|
13521
|
-
case "5":
|
|
13522
|
-
let label5 = stackAreaData[stackIndex][0];
|
|
13523
|
-
let label6 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
|
|
13524
|
-
if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
|
|
13525
|
-
labelData.push(label5);
|
|
13526
|
-
labelData.push(label6);
|
|
13527
|
-
break;
|
|
13528
|
-
}
|
|
13529
|
-
}
|
|
13530
|
-
});
|
|
13531
|
-
break;
|
|
13532
|
-
}
|
|
13533
|
-
});
|
|
13534
13320
|
break;
|
|
13535
13321
|
}
|
|
13536
13322
|
let maxValue = 0;
|
|
@@ -13563,7 +13349,7 @@
|
|
|
13563
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],
|
|
13564
13350
|
prevValue: d[0] >= 0 ? d[0] : d[1],
|
|
13565
13351
|
position: parseInt(d.labelPosition) ? parseInt(d.labelPosition) : parseInt(d.data.labelPosition),
|
|
13566
|
-
type: d.type,
|
|
13352
|
+
type: d.dimension && d.legend ? d.type : d.data.type,
|
|
13567
13353
|
currentLegend: d.legend?.includes("~$~") ? d.legend.split("~$~")[1] : d.key?.includes("~$~") ? d.key.split("~$~")[1] : d.legend ?? d.key,
|
|
13568
13354
|
isVisible: true
|
|
13569
13355
|
},
|
|
@@ -13586,7 +13372,7 @@
|
|
|
13586
13372
|
d["legend"] && d.dimension ? (
|
|
13587
13373
|
// ? finalLegendseries.includes(d.Legend.includes("~$~") ? d.Legend.split("~$~")[1] : d.Legend) &&
|
|
13588
13374
|
// filteredDimensionList.includes(d.Dimension) &&
|
|
13589
|
-
!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
|
|
13590
13376
|
) : (
|
|
13591
13377
|
// finalLegendseries.includes(d["key"].includes("~$~") ? d["key"].split("~$~")[1] : d["key"]) &&
|
|
13592
13378
|
// this.filteredDimensionList.includes(d.data["Dimension"]) &&
|
|
@@ -13614,15 +13400,17 @@
|
|
|
13614
13400
|
});
|
|
13615
13401
|
makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
|
|
13616
13402
|
x: function(d) {
|
|
13617
|
-
|
|
13618
|
-
|
|
13403
|
+
if (getChartType.includes(d.x.type) || getChartType.includes(d.type)) {
|
|
13404
|
+
let chartType = d.x.type || d.type;
|
|
13619
13405
|
switch (chartType) {
|
|
13620
|
-
case
|
|
13406
|
+
case "StackColumn":
|
|
13621
13407
|
return xScale(d.x.dimension) + xScaleForLegends(d.x.stacklegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2;
|
|
13622
|
-
|
|
13623
|
-
case
|
|
13624
|
-
case
|
|
13408
|
+
break;
|
|
13409
|
+
case "StackArea":
|
|
13410
|
+
case "Line":
|
|
13411
|
+
case "Area":
|
|
13625
13412
|
return xScale(d.x.dimension);
|
|
13413
|
+
break;
|
|
13626
13414
|
}
|
|
13627
13415
|
} else {
|
|
13628
13416
|
if (d.x.legend) {
|
|
@@ -13632,11 +13420,10 @@
|
|
|
13632
13420
|
}
|
|
13633
13421
|
},
|
|
13634
13422
|
y: function(d) {
|
|
13635
|
-
const chartType = d.type ?? d.x.type;
|
|
13636
13423
|
if (d.x.axis == axisTypes.primary) {
|
|
13637
|
-
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);
|
|
13638
13425
|
} else {
|
|
13639
|
-
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);
|
|
13640
13427
|
}
|
|
13641
13428
|
}
|
|
13642
13429
|
}).on("dragend", function(annotation2) {
|
|
@@ -13767,7 +13554,7 @@
|
|
|
13767
13554
|
let dataTableHeight = 20;
|
|
13768
13555
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
13769
13556
|
formatOptions.xAxisLabel.xAxisLabelVisibility = false;
|
|
13770
|
-
let exactAvailableWidth = yLabel + yTitle;
|
|
13557
|
+
let exactAvailableWidth = yLabel + yTitle - 36;
|
|
13771
13558
|
seriesData.forEach((data, i) => {
|
|
13772
13559
|
let tempObj = {
|
|
13773
13560
|
"data": data.data.filter((data2) => dimensionList.includes(data2.dimension)),
|
|
@@ -13859,14 +13646,14 @@
|
|
|
13859
13646
|
selectAll("#dataTableG" + chartId).remove();
|
|
13860
13647
|
let tag = currentTag.append("g").attr("id", "dataTableG" + chartId);
|
|
13861
13648
|
dataTable.forEach((data, i) => {
|
|
13862
|
-
yCordinate = yCordinate +
|
|
13649
|
+
yCordinate = yCordinate + cellHeight;
|
|
13863
13650
|
cellHeight = data.properties.height;
|
|
13864
13651
|
getLegendsAppended(tag, i, data, cellHeight);
|
|
13865
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(
|
|
13866
13653
|
"transform",
|
|
13867
13654
|
(d, index2) => `translate(${index2 === 0 ? 0 : xAxis(d.dimension) - cellWidth / 2},0)`
|
|
13868
13655
|
);
|
|
13869
|
-
if (i == 0
|
|
13656
|
+
if (i == 0) {
|
|
13870
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(
|
|
13871
13658
|
"text-decoration",
|
|
13872
13659
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -14641,7 +14428,6 @@
|
|
|
14641
14428
|
let makeAnnotations = d3Annotation2.annotation();
|
|
14642
14429
|
let connector = formatOptions.annotation.connectorType;
|
|
14643
14430
|
let labelType = formatOptions.annotation.annotationVisibility;
|
|
14644
|
-
let dataLabelColor = formatOptions?.annotation?.annotationSetLabelColor == "2" ? "color" : "labelColor";
|
|
14645
14431
|
let fontStyle = formatOptions.annotation.annotationFontStyle;
|
|
14646
14432
|
let connectorType = formatOptions.annotation.connectorType ? formatOptions.annotation.connectorType.toLowerCase() : "None";
|
|
14647
14433
|
oldAnnotationList = conditionallyResetOldAnnotations(oldAnnotationList, formatOptions, chartType);
|
|
@@ -14749,7 +14535,7 @@
|
|
|
14749
14535
|
height: 15,
|
|
14750
14536
|
width: 15
|
|
14751
14537
|
},
|
|
14752
|
-
color: d.properties
|
|
14538
|
+
color: d.properties.labelColor,
|
|
14753
14539
|
type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
|
|
14754
14540
|
height,
|
|
14755
14541
|
width
|
|
@@ -14887,7 +14673,7 @@
|
|
|
14887
14673
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
|
|
14888
14674
|
).style("shape-rendering", "crispEdges").style(
|
|
14889
14675
|
"stroke",
|
|
14890
|
-
formatOptions.yAxisLabel.
|
|
14676
|
+
formatOptions.yAxisLabel.yAxisColorInverted
|
|
14891
14677
|
).attr("stroke-width", formatOptions.yAxisLabel.yAxisWidth ? formatOptions.yAxisLabel.yAxisWidth : formatOptions.plotArea.plotAreaBorderThickness);
|
|
14892
14678
|
} catch (error) {
|
|
14893
14679
|
throw error;
|
|
@@ -14960,12 +14746,9 @@
|
|
|
14960
14746
|
"visibility",
|
|
14961
14747
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : formatOptions.plotArea.gridLinesVertical ? "visible" : "hidden"
|
|
14962
14748
|
);
|
|
14963
|
-
YaxisG.select(".domain").style("shape-rendering", "crispEdges").
|
|
14964
|
-
"stroke-width",
|
|
14965
|
-
formatOptions.xAxisLabel.xAxisWidth ?? formatOptions.plotArea.plotAreaBorderThickness
|
|
14966
|
-
).style(
|
|
14749
|
+
YaxisG.select(".domain").style("shape-rendering", "crispEdges").style(
|
|
14967
14750
|
"stroke",
|
|
14968
|
-
formatOptions.xAxisLabel.
|
|
14751
|
+
formatOptions.xAxisLabel.xAxisColorInverted
|
|
14969
14752
|
);
|
|
14970
14753
|
} catch (e) {
|
|
14971
14754
|
throw e;
|
|
@@ -15461,7 +15244,7 @@
|
|
|
15461
15244
|
svg,
|
|
15462
15245
|
seriesData,
|
|
15463
15246
|
7,
|
|
15464
|
-
height -
|
|
15247
|
+
height - 25,
|
|
15465
15248
|
width - 10,
|
|
15466
15249
|
30,
|
|
15467
15250
|
position,
|
|
@@ -15522,7 +15305,7 @@
|
|
|
15522
15305
|
return Symbol$1().type(Markershapes(d.markerShape)).size(d.markerSize * 50)();
|
|
15523
15306
|
}).attr("visibility", (d) => {
|
|
15524
15307
|
const hideByX = !xScale(d.dimension) && xScale(d.dimension) !== 0;
|
|
15525
|
-
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;
|
|
15526
15309
|
return hideByX ? visibilityCondition.hidden : visible;
|
|
15527
15310
|
}).attr("transform", (d) => {
|
|
15528
15311
|
let requiredYScale = d.axis == axisTypes.primary ? yScale : yScaleRight;
|
|
@@ -15591,10 +15374,10 @@
|
|
|
15591
15374
|
logError$2(fileName$b, "lineMarkers", error);
|
|
15592
15375
|
}
|
|
15593
15376
|
}
|
|
15594
|
-
const checkVisibleConditions = (chartData, d, type, hideZeroValues,
|
|
15377
|
+
const checkVisibleConditions = (chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) => {
|
|
15595
15378
|
try {
|
|
15596
15379
|
if (chartData[0].properties.axis && chartData[0].properties.axis === "Secondary") {
|
|
15597
|
-
return hideZeroValues && d.value == 0 || d.value >
|
|
15380
|
+
return hideZeroValues && d.value == 0 || d.value > secondaryCustomYaxisMaxValue || d.value < secondaryCustomYaxisMinValue;
|
|
15598
15381
|
} else if (type.includes("Stack")) {
|
|
15599
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;
|
|
15600
15383
|
} else return hideZeroValues && d.value == 0 || d.value < customYaxisMinValue || d.value > customYaxisMaxValue;
|
|
@@ -15602,7 +15385,7 @@
|
|
|
15602
15385
|
logError$2(fileName$b, "checkVisibleConditions", error);
|
|
15603
15386
|
}
|
|
15604
15387
|
};
|
|
15605
|
-
function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType
|
|
15388
|
+
function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType) {
|
|
15606
15389
|
try {
|
|
15607
15390
|
let mousemove = function(event2) {
|
|
15608
15391
|
try {
|
|
@@ -15616,14 +15399,13 @@
|
|
|
15616
15399
|
}
|
|
15617
15400
|
let mindiff = 1e99;
|
|
15618
15401
|
for (let k2 = 0; k2 < lineData.length; k2++) {
|
|
15619
|
-
|
|
15620
|
-
let diff1 = Math.abs(m[1] - yScaleLeft(requiredValue));
|
|
15402
|
+
let diff1 = Math.abs(m[1] - yScaleLeft(lineData[k2].data[dimensionIndex].value));
|
|
15621
15403
|
if (diff1 < mindiff) {
|
|
15622
15404
|
mindiff = diff1;
|
|
15623
15405
|
legendIndex = k2;
|
|
15624
15406
|
}
|
|
15625
15407
|
}
|
|
15626
|
-
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([
|
|
15627
15409
|
{ key: formatOptions.xAxisTitle.xAxisTitleText, value: lineData[legendIndex].data[dimensionIndex].dimension },
|
|
15628
15410
|
{
|
|
15629
15411
|
key: lineData[legendIndex].properties.currentMeasure ? lineData[legendIndex].properties.currentMeasure : this.basestyle.YAxisTitle.YAxisTitleText,
|
|
@@ -15631,7 +15413,7 @@
|
|
|
15631
15413
|
},
|
|
15632
15414
|
{ key: "Legend", value: lineData[legendIndex].data[dimensionIndex].legend.includes("~$~") ? lineData[legendIndex].data[dimensionIndex].legend.split("~$~")[1] : lineData[legendIndex].data[dimensionIndex].legend }
|
|
15633
15415
|
// { key: "Calculated Tooltip", value: lineData[legendIndex].data[dimensionIndex]. },
|
|
15634
|
-
], formatOptions
|
|
15416
|
+
], formatOptions));
|
|
15635
15417
|
} catch (error) {
|
|
15636
15418
|
logError$2(fileName$b, "onHoverMarkerForAreaChartFamily.mousemove", error);
|
|
15637
15419
|
}
|
|
@@ -15649,10 +15431,9 @@
|
|
|
15649
15431
|
logError$2(fileName$b, "onHoverMarkerForAreaChartFamily", error);
|
|
15650
15432
|
}
|
|
15651
15433
|
}
|
|
15652
|
-
const getCoordinates = (chartData, pos, xScale, yScaleLeft
|
|
15434
|
+
const getCoordinates = (chartData, pos, xScale, yScaleLeft) => {
|
|
15653
15435
|
try {
|
|
15654
|
-
|
|
15655
|
-
return `translate(${xScale(chartData.data[pos].dimension)},${yScaleLeft(requiredValue)})`;
|
|
15436
|
+
return `translate(${xScale(chartData.data[pos].dimension)},${yScaleLeft(chartData.data[pos].value)})`;
|
|
15656
15437
|
} catch (error) {
|
|
15657
15438
|
logError$2(fileName$b, "getCoordinates", error);
|
|
15658
15439
|
}
|
|
@@ -16017,10 +15798,7 @@
|
|
|
16017
15798
|
}
|
|
16018
15799
|
let vennSaparator = isVennChart && (legendPosition == staticLegendPosition.bottom || legendPosition == staticLegendPosition.top) ? i != seriesData.length - 1 ? " |" : "" : "";
|
|
16019
15800
|
let legendColor = isVennChart ? chartFormatOptions.legends.legendSelectedUnicolor : chartFormatOptions.legends.legendColorMode == legendColorMode.multiColor ? d.properties.color ? d.properties.color : commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
|
|
16020
|
-
innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).style(
|
|
16021
|
-
"background",
|
|
16022
|
-
d.properties.axis == axisTypes.secondary && chartFormatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor
|
|
16023
|
-
).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(
|
|
16024
15802
|
"font-style",
|
|
16025
15803
|
() => {
|
|
16026
15804
|
let style = !isVennChart ? d.properties.fontStyle : chartFormatOptions.legends.legendFontStyle;
|
|
@@ -16536,14 +16314,14 @@
|
|
|
16536
16314
|
const barChart = false;
|
|
16537
16315
|
let isSecondaryAxisDrawn = false;
|
|
16538
16316
|
const isNormalizedChart = false;
|
|
16539
|
-
let customYaxisMinValue =
|
|
16540
|
-
let customYaxisMaxValue =
|
|
16541
|
-
let secondaryCustomYaxisMinValue =
|
|
16317
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
16318
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
16319
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
16542
16320
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
16543
|
-
)
|
|
16544
|
-
let secondaryCustomYaxisMaxValue =
|
|
16321
|
+
);
|
|
16322
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
16545
16323
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
16546
|
-
)
|
|
16324
|
+
);
|
|
16547
16325
|
let margin;
|
|
16548
16326
|
let yLabel;
|
|
16549
16327
|
let xLabel;
|
|
@@ -16938,10 +16716,10 @@
|
|
|
16938
16716
|
return yScale(0);
|
|
16939
16717
|
}).attr("height", 0).attr("fill", data2.properties.color).attr(
|
|
16940
16718
|
"stroke-dasharray",
|
|
16941
|
-
(d) =>
|
|
16942
|
-
).attr("stroke-width", (d) => `${
|
|
16719
|
+
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
16720
|
+
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
16943
16721
|
"stroke",
|
|
16944
|
-
(d) => data2.properties.stackBorderStyle
|
|
16722
|
+
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
16945
16723
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
16946
16724
|
"visibility",
|
|
16947
16725
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -17108,14 +16886,14 @@
|
|
|
17108
16886
|
const barChart = false;
|
|
17109
16887
|
let isSecondaryAxisDrawn = false;
|
|
17110
16888
|
const isNormalizedChart = false;
|
|
17111
|
-
let customYaxisMinValue =
|
|
17112
|
-
let customYaxisMaxValue =
|
|
17113
|
-
let secondaryCustomYaxisMinValue =
|
|
16889
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
16890
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
16891
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
17114
16892
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
17115
|
-
)
|
|
17116
|
-
let secondaryCustomYaxisMaxValue =
|
|
16893
|
+
);
|
|
16894
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
17117
16895
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
17118
|
-
)
|
|
16896
|
+
);
|
|
17119
16897
|
let margin;
|
|
17120
16898
|
let yLabel;
|
|
17121
16899
|
let xLabel;
|
|
@@ -17152,7 +16930,6 @@
|
|
|
17152
16930
|
let yAxisLeft;
|
|
17153
16931
|
let xAxis;
|
|
17154
16932
|
let yAxisRight;
|
|
17155
|
-
let totalValueMap = /* @__PURE__ */ new Map();
|
|
17156
16933
|
let filteredDimension;
|
|
17157
16934
|
let filteredData = [];
|
|
17158
16935
|
let requiredData = [];
|
|
@@ -17345,13 +17122,9 @@
|
|
|
17345
17122
|
seriesData.forEach((series, i) => {
|
|
17346
17123
|
if (![chartTypes.StackColumnChart, chartTypes.StackAreaChart].includes(series.properties.type)) {
|
|
17347
17124
|
tempChartData.push(series);
|
|
17348
|
-
series.properties.type !== chartTypes.LineChart &&
|
|
17349
|
-
} else {
|
|
17350
|
-
|
|
17351
|
-
if (!legendList.includes(chartTypes.StackColumnChart)) {
|
|
17352
|
-
legendList.push(chartTypes.StackColumnChart);
|
|
17353
|
-
}
|
|
17354
|
-
}
|
|
17125
|
+
series.properties.type !== chartTypes.LineChart && legendList.push(series.legend);
|
|
17126
|
+
} else if (!legendList.includes("stackLegend")) {
|
|
17127
|
+
legendList.push(`stackLegend`);
|
|
17355
17128
|
}
|
|
17356
17129
|
if (series.properties.axis === "Secondary") {
|
|
17357
17130
|
secondaryStackAxisData.push(series);
|
|
@@ -17371,15 +17144,15 @@
|
|
|
17371
17144
|
primaryStackAreaAxisData.push(series);
|
|
17372
17145
|
}
|
|
17373
17146
|
}
|
|
17374
|
-
series.data
|
|
17147
|
+
series.data.forEach((point2) => {
|
|
17375
17148
|
const newPoint = {
|
|
17376
17149
|
...point2,
|
|
17377
17150
|
type: series.properties.type,
|
|
17378
17151
|
axis: series.properties.axis,
|
|
17379
|
-
labelPosition:
|
|
17152
|
+
labelPosition: series.properties.dataLabelPosition,
|
|
17380
17153
|
labelColor: series.properties.labelColor
|
|
17381
17154
|
};
|
|
17382
|
-
if (
|
|
17155
|
+
if (series.properties.axis === "Secondary") {
|
|
17383
17156
|
isSecondaryAxisDrawn = true;
|
|
17384
17157
|
yMaxRight = Math.max(yMaxRight, newPoint.value);
|
|
17385
17158
|
yMinRight = Math.min(yMinRight, newPoint.value);
|
|
@@ -17387,7 +17160,6 @@
|
|
|
17387
17160
|
yMaxLeft = Math.max(yMaxLeft, newPoint.value);
|
|
17388
17161
|
yMinLeft = Math.min(yMinLeft, newPoint.value);
|
|
17389
17162
|
}
|
|
17390
|
-
return newPoint;
|
|
17391
17163
|
});
|
|
17392
17164
|
});
|
|
17393
17165
|
filteredData = JSON.parse(JSON.stringify(seriesData));
|
|
@@ -17451,8 +17223,7 @@
|
|
|
17451
17223
|
properties: {
|
|
17452
17224
|
axis: d.properties.axis,
|
|
17453
17225
|
type: d.properties.type,
|
|
17454
|
-
legend: d.properties.legend
|
|
17455
|
-
annotation: d.properties.annotation
|
|
17226
|
+
legend: d.properties.legend
|
|
17456
17227
|
},
|
|
17457
17228
|
stackData: tempStackAreaChartDataForPrimaryAxis,
|
|
17458
17229
|
data: primaryStackAreaAxisData2
|
|
@@ -17463,8 +17234,7 @@
|
|
|
17463
17234
|
properties: {
|
|
17464
17235
|
axis: d.properties.axis,
|
|
17465
17236
|
type: d.properties.type,
|
|
17466
|
-
legend: d.properties.legend
|
|
17467
|
-
annotation: d.properties.annotation
|
|
17237
|
+
legend: d.properties.legend
|
|
17468
17238
|
},
|
|
17469
17239
|
stackData: tempStackAreaChartDataForSecondaryAxis,
|
|
17470
17240
|
data: secondaryStackAreaAxisData2
|
|
@@ -17475,8 +17245,7 @@
|
|
|
17475
17245
|
properties: {
|
|
17476
17246
|
axis: d.properties.axis,
|
|
17477
17247
|
type: d.properties.type,
|
|
17478
|
-
legend: d.properties.legend
|
|
17479
|
-
annotation: d.properties.annotation
|
|
17248
|
+
legend: d.properties.legend
|
|
17480
17249
|
},
|
|
17481
17250
|
stackData: tempStackColumnChartDataForPrimaryAxis,
|
|
17482
17251
|
data: primaryStackColumnAxisData2
|
|
@@ -17487,8 +17256,7 @@
|
|
|
17487
17256
|
properties: {
|
|
17488
17257
|
axis: d.properties.axis,
|
|
17489
17258
|
type: d.properties.type,
|
|
17490
|
-
legend: d.properties.legend
|
|
17491
|
-
annotation: d.properties.annotation
|
|
17259
|
+
legend: d.properties.legend
|
|
17492
17260
|
},
|
|
17493
17261
|
stackData: tempStackColumnChartDataForSecondaryAxis,
|
|
17494
17262
|
data: secondaryStackColumnAxisData2
|
|
@@ -17510,6 +17278,17 @@
|
|
|
17510
17278
|
}
|
|
17511
17279
|
};
|
|
17512
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];
|
|
17513
17292
|
{
|
|
17514
17293
|
yScaleLeft = linear$1().domain([
|
|
17515
17294
|
chartJSON.yMinLeft >= 0 ? customYaxisMinValue !== void 0 && !Number.isNaN(customYaxisMinValue) ? customYaxisMinValue : 0 : chartJSON.yMinLeft < 0 ? chartJSON.yMinLeft * 1.1 : chartJSON.yMinLeft * 0.9,
|
|
@@ -17539,7 +17318,7 @@
|
|
|
17539
17318
|
calculatedRange = [0, innerWidth2];
|
|
17540
17319
|
};
|
|
17541
17320
|
const getXScale = () => {
|
|
17542
|
-
xScaleForLegends = band().domain(chartJSON.legendList).range([0, columnWidth]).paddingInner(
|
|
17321
|
+
xScaleForLegends = band().domain(chartJSON.legendList.reverse()).range([0, columnWidth]).paddingInner(
|
|
17543
17322
|
chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
|
|
17544
17323
|
);
|
|
17545
17324
|
xScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
|
|
@@ -17637,7 +17416,7 @@
|
|
|
17637
17416
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
17638
17417
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
17639
17418
|
"hoverId",
|
|
17640
|
-
(d) =>
|
|
17419
|
+
(d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
|
|
17641
17420
|
).attr("transform", (d) => `translate(${xScale(d.dimension)}, 0)`);
|
|
17642
17421
|
columnGroupsEnter.merge(columnGroups).attr(
|
|
17643
17422
|
"transform",
|
|
@@ -17649,9 +17428,9 @@
|
|
|
17649
17428
|
}).attr("height", (d) => {
|
|
17650
17429
|
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
17651
17430
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
17652
|
-
}).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(
|
|
17653
17432
|
"stroke",
|
|
17654
|
-
(d) => data2.properties.stackBorderStyle
|
|
17433
|
+
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
17655
17434
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
17656
17435
|
"visibility",
|
|
17657
17436
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -17897,7 +17676,7 @@
|
|
|
17897
17676
|
).merge(rects).attr(
|
|
17898
17677
|
"hoverId",
|
|
17899
17678
|
(d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
|
|
17900
|
-
).attr("x", (d) => xScaleForLegends(
|
|
17679
|
+
).attr("x", (d) => xScaleForLegends("stackLegend")).attr(
|
|
17901
17680
|
"y",
|
|
17902
17681
|
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
17903
17682
|
).attr(
|
|
@@ -17913,12 +17692,12 @@
|
|
|
17913
17692
|
(sdata) => sdata.legend === d.key
|
|
17914
17693
|
);
|
|
17915
17694
|
const props = seriesData[seriesIndex]?.properties;
|
|
17916
|
-
return props?.stackBorderStyle
|
|
17695
|
+
return props?.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? props.stackBorderColor : "none";
|
|
17917
17696
|
}).attr("stroke-dasharray", (d, i, nodes) => {
|
|
17918
17697
|
const seriesIndex = Array.from(seriesData).findIndex(
|
|
17919
17698
|
(sdata) => sdata.legend === d.key
|
|
17920
17699
|
);
|
|
17921
|
-
return seriesData[seriesIndex]?.properties.stackBorderStyle
|
|
17700
|
+
return seriesData[seriesIndex]?.properties.stackBorderStyle === 2 ? "5,3" : "0";
|
|
17922
17701
|
}).attr("stroke-width", (d, i, nodes) => {
|
|
17923
17702
|
const seriesIndex = Array.from(seriesData).findIndex(
|
|
17924
17703
|
(sdata) => sdata.legend === d.key
|
|
@@ -17960,7 +17739,6 @@
|
|
|
17960
17739
|
filteredData = fData;
|
|
17961
17740
|
filteredDimension = fDimension;
|
|
17962
17741
|
visibleBars = fVisibleBars;
|
|
17963
|
-
createTotalMeasureValueMapForCustomColumChart(data, totalValueMap, filteredDimension);
|
|
17964
17742
|
checkAndupdateInputData(
|
|
17965
17743
|
primaryStackAreaAxisData,
|
|
17966
17744
|
primaryStackColumnAxisData,
|
|
@@ -17984,28 +17762,6 @@
|
|
|
17984
17762
|
});
|
|
17985
17763
|
drawCustomChart();
|
|
17986
17764
|
};
|
|
17987
|
-
function createTotalMeasureValueMapForCustomColumChart(data2, totalValueMap2, filteredDimension2) {
|
|
17988
|
-
totalValueMap2.clear();
|
|
17989
|
-
if (filteredDimension2 && filteredDimension2.length > 0) {
|
|
17990
|
-
filteredDimension2.forEach((dimension) => {
|
|
17991
|
-
let totalMeasureValue = 0;
|
|
17992
|
-
totalValueMap2.set(dimension, totalMeasureValue);
|
|
17993
|
-
});
|
|
17994
|
-
}
|
|
17995
|
-
if (data2.ChartData && data2.ChartData.length > 0) {
|
|
17996
|
-
data2.ChartData.forEach((series) => {
|
|
17997
|
-
if (series.properties.type.includes("Stack")) {
|
|
17998
|
-
series.data.forEach((dataPoint, index2) => {
|
|
17999
|
-
if (totalValueMap2.has(dataPoint.dimension)) {
|
|
18000
|
-
let existingTotal = totalValueMap2.get(dataPoint.dimension) || 0;
|
|
18001
|
-
existingTotal += dataPoint.value || 0;
|
|
18002
|
-
totalValueMap2.set(dataPoint.dimension, existingTotal);
|
|
18003
|
-
}
|
|
18004
|
-
});
|
|
18005
|
-
}
|
|
18006
|
-
});
|
|
18007
|
-
}
|
|
18008
|
-
}
|
|
18009
17765
|
const drawCustomChart = () => {
|
|
18010
17766
|
getXScale();
|
|
18011
17767
|
getXAxis();
|
|
@@ -18054,24 +17810,10 @@
|
|
|
18054
17810
|
xScaleForLegends,
|
|
18055
17811
|
isReportEditable
|
|
18056
17812
|
);
|
|
18057
|
-
addTotalValue(
|
|
18058
|
-
totalValueMap,
|
|
18059
|
-
xScale,
|
|
18060
|
-
yScaleLeft,
|
|
18061
|
-
margin,
|
|
18062
|
-
d3Annotation,
|
|
18063
|
-
[],
|
|
18064
|
-
formatOptions,
|
|
18065
|
-
chartType,
|
|
18066
|
-
height,
|
|
18067
|
-
width,
|
|
18068
|
-
svg,
|
|
18069
|
-
isReportEditable
|
|
18070
|
-
);
|
|
18071
17813
|
};
|
|
18072
17814
|
const createStackData = (requiredStackChatData) => {
|
|
18073
17815
|
let legendList = requiredStackChatData.data.map((d) => d.legend);
|
|
18074
|
-
stackChartData = stack().keys(legendList).offset(
|
|
17816
|
+
stackChartData = stack().keys(legendList).offset(diverging)(requiredStackChatData.stackData);
|
|
18075
17817
|
requiredStackChatData.data.forEach(
|
|
18076
17818
|
(data2, index2) => data2.data.forEach((axisData, position) => {
|
|
18077
17819
|
axisData["0"] = stackChartData[index2][position][0];
|
|
@@ -18085,10 +17827,7 @@
|
|
|
18085
17827
|
stackData["color"] = JSON.parse(
|
|
18086
17828
|
JSON.stringify(requiredStackChatData.data[j].properties.color)
|
|
18087
17829
|
);
|
|
18088
|
-
|
|
18089
|
-
JSON.stringify(requiredStackChatData.data[j].properties.annotation)
|
|
18090
|
-
);
|
|
18091
|
-
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;
|
|
18092
17831
|
d.data["labelColor"] = seriesColor == "2" ? JSON.parse(
|
|
18093
17832
|
JSON.stringify(requiredStackChatData.data[j].properties.color)
|
|
18094
17833
|
) : JSON.parse(
|
|
@@ -18107,7 +17846,7 @@
|
|
|
18107
17846
|
d.data["color"] = JSON.parse(
|
|
18108
17847
|
JSON.stringify(requiredStackChatData.data[j].properties.color)
|
|
18109
17848
|
);
|
|
18110
|
-
d.data["legend"] =
|
|
17849
|
+
d.data["legend"] = `stackLegend`;
|
|
18111
17850
|
d.data["type"] = JSON.parse(
|
|
18112
17851
|
JSON.stringify(requiredStackChatData.data[j].properties.type)
|
|
18113
17852
|
);
|
|
@@ -18123,15 +17862,7 @@
|
|
|
18123
17862
|
chartJSON.yMinLeft = Math.min(chartJSON.yMinLeft, ...totals);
|
|
18124
17863
|
}
|
|
18125
17864
|
if (secondaryStackAxisData.length > 0) {
|
|
18126
|
-
const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(
|
|
18127
|
-
filteredDimension,
|
|
18128
|
-
secondaryStackColumnAxisData,
|
|
18129
|
-
false
|
|
18130
|
-
) : getStackedData(
|
|
18131
|
-
filteredDimension,
|
|
18132
|
-
secondaryStackAreaAxisData,
|
|
18133
|
-
false
|
|
18134
|
-
);
|
|
17865
|
+
const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(filteredDimension, secondaryStackColumnAxisData, false) : getStackedData(filteredDimension, secondaryStackAreaAxisData, false);
|
|
18135
17866
|
const totals = stackData.map((d) => d.total);
|
|
18136
17867
|
chartJSON.yMaxRight = Math.max(chartJSON.yMaxRight, ...totals);
|
|
18137
17868
|
chartJSON.yMinRight = Math.min(chartJSON.yMinRight, ...totals);
|
|
@@ -18165,14 +17896,14 @@
|
|
|
18165
17896
|
const barChart = false;
|
|
18166
17897
|
const isSecondaryAxisDrawn = false;
|
|
18167
17898
|
const isNormalizedChart = false;
|
|
18168
|
-
let customYaxisMinValue =
|
|
18169
|
-
let customYaxisMaxValue =
|
|
18170
|
-
|
|
17899
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
17900
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
17901
|
+
parseFloat(
|
|
18171
17902
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
18172
|
-
)
|
|
18173
|
-
|
|
17903
|
+
);
|
|
17904
|
+
parseFloat(
|
|
18174
17905
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
18175
|
-
)
|
|
17906
|
+
);
|
|
18176
17907
|
let margin;
|
|
18177
17908
|
let yLabel;
|
|
18178
17909
|
let xLabel;
|
|
@@ -18522,10 +18253,10 @@
|
|
|
18522
18253
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
18523
18254
|
}).attr("fill", data2.properties.color).attr(
|
|
18524
18255
|
"stroke-dasharray",
|
|
18525
|
-
(d) =>
|
|
18526
|
-
).attr("stroke-width", () => `${
|
|
18256
|
+
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
18257
|
+
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
18527
18258
|
"stroke",
|
|
18528
|
-
() => data2.properties.stackBorderStyle
|
|
18259
|
+
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
18529
18260
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr("opacity", 0.7).attr(
|
|
18530
18261
|
"visibility",
|
|
18531
18262
|
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -18683,14 +18414,14 @@
|
|
|
18683
18414
|
const seriesData = (generalizedChartData(data.ChartData, data.DimensionList) || []).reverse();
|
|
18684
18415
|
const barChart = false;
|
|
18685
18416
|
const isSecondaryAxisDrawn = false;
|
|
18686
|
-
let customYaxisMinValue =
|
|
18687
|
-
let customYaxisMaxValue =
|
|
18688
|
-
|
|
18417
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
18418
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
18419
|
+
parseFloat(
|
|
18689
18420
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
18690
|
-
)
|
|
18691
|
-
|
|
18421
|
+
);
|
|
18422
|
+
parseFloat(
|
|
18692
18423
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
18693
|
-
)
|
|
18424
|
+
);
|
|
18694
18425
|
let margin;
|
|
18695
18426
|
let yLabel;
|
|
18696
18427
|
let xLabel;
|
|
@@ -19005,16 +18736,16 @@
|
|
|
19005
18736
|
return props?.color || "gray";
|
|
19006
18737
|
}).attr("stroke", (d, i, nodes) => {
|
|
19007
18738
|
const { props } = getPropsForRect(nodes, i);
|
|
19008
|
-
return props?.stackBorderStyle
|
|
18739
|
+
return props?.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? props.stackBorderColor : "none";
|
|
19009
18740
|
}).attr("stroke-dasharray", (d, i, nodes) => {
|
|
19010
18741
|
const { props } = getPropsForRect(nodes, i);
|
|
19011
|
-
return props?.stackBorderStyle
|
|
18742
|
+
return props?.stackBorderStyle === 2 ? "5,3" : "0";
|
|
19012
18743
|
}).attr("stroke-width", (d, i, nodes) => {
|
|
19013
18744
|
const { props } = getPropsForRect(nodes, i);
|
|
19014
18745
|
return (props?.stackBorderWidth || 0) + "px";
|
|
19015
18746
|
}).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr("visibility", (d, i, nodes) => {
|
|
19016
18747
|
const { props } = getPropsForRect(nodes, i);
|
|
19017
|
-
return d.data[d.key]
|
|
18748
|
+
return d.data[d.key] === 0 && props?.hideZeroValues ? "hidden" : "visible";
|
|
19018
18749
|
}).on("mousemove", (event2, d) => {
|
|
19019
18750
|
showTooltipOnMouseMove(
|
|
19020
18751
|
[
|
|
@@ -19401,8 +19132,14 @@
|
|
|
19401
19132
|
const dimensionList = data.DimensionList;
|
|
19402
19133
|
const barChart = false;
|
|
19403
19134
|
const isSecondaryAxisDrawn = false;
|
|
19404
|
-
let customYaxisMinValue =
|
|
19405
|
-
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
|
+
);
|
|
19406
19143
|
let margin;
|
|
19407
19144
|
let yLabel;
|
|
19408
19145
|
let xLabel;
|
|
@@ -20422,10 +20159,16 @@
|
|
|
20422
20159
|
const barChart = false;
|
|
20423
20160
|
const isSecondaryAxisDrawn = false;
|
|
20424
20161
|
const isNormalizedChart = false;
|
|
20425
|
-
let customYaxisMinValue =
|
|
20426
|
-
let customYaxisMaxValue =
|
|
20427
|
-
let customXaxisMinValue =
|
|
20428
|
-
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
|
+
);
|
|
20429
20172
|
let margin;
|
|
20430
20173
|
let yLabel;
|
|
20431
20174
|
let xLabel;
|
|
@@ -20933,14 +20676,14 @@
|
|
|
20933
20676
|
const barChart = false;
|
|
20934
20677
|
let isSecondaryAxisDrawn = false;
|
|
20935
20678
|
const isNormalizedChart = false;
|
|
20936
|
-
let customYaxisMinValue =
|
|
20937
|
-
let customYaxisMaxValue =
|
|
20938
|
-
let secondaryCustomYaxisMinValue =
|
|
20679
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
20680
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
20681
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
20939
20682
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
20940
|
-
)
|
|
20941
|
-
let secondaryCustomYaxisMaxValue =
|
|
20683
|
+
);
|
|
20684
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
20942
20685
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
20943
|
-
)
|
|
20686
|
+
);
|
|
20944
20687
|
let margin;
|
|
20945
20688
|
let yLabel;
|
|
20946
20689
|
let xLabel;
|
|
@@ -21384,7 +21127,7 @@
|
|
|
21384
21127
|
xAxis,
|
|
21385
21128
|
dimensionHeightWidthArray,
|
|
21386
21129
|
height,
|
|
21387
|
-
|
|
21130
|
+
barWidth,
|
|
21388
21131
|
isDateType,
|
|
21389
21132
|
innerWidth2,
|
|
21390
21133
|
innerHeight2,
|
|
@@ -21479,14 +21222,14 @@
|
|
|
21479
21222
|
const barChart = false;
|
|
21480
21223
|
const totalValueMap = /* @__PURE__ */ new Map();
|
|
21481
21224
|
const isSecondaryAxisDrawn = false;
|
|
21482
|
-
let customYaxisMinValue =
|
|
21483
|
-
let customYaxisMaxValue =
|
|
21484
|
-
let secondaryCustomYaxisMinValue =
|
|
21225
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
21226
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
21227
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
21485
21228
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
21486
|
-
)
|
|
21487
|
-
let secondaryCustomYaxisMaxValue =
|
|
21229
|
+
);
|
|
21230
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
21488
21231
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
21489
|
-
)
|
|
21232
|
+
);
|
|
21490
21233
|
let margin;
|
|
21491
21234
|
let yLabel;
|
|
21492
21235
|
let xLabel;
|
|
@@ -22052,14 +21795,14 @@
|
|
|
22052
21795
|
const dimensionList = data.DimensionList;
|
|
22053
21796
|
const barChart = false;
|
|
22054
21797
|
const isSecondaryAxisDrawn = false;
|
|
22055
|
-
let customYaxisMinValue =
|
|
22056
|
-
let customYaxisMaxValue =
|
|
22057
|
-
let secondaryCustomYaxisMinValue =
|
|
21798
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
21799
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
21800
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
22058
21801
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
22059
|
-
)
|
|
22060
|
-
let secondaryCustomYaxisMaxValue =
|
|
21802
|
+
);
|
|
21803
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
22061
21804
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
22062
|
-
)
|
|
21805
|
+
);
|
|
22063
21806
|
let margin;
|
|
22064
21807
|
let yLabel;
|
|
22065
21808
|
let xLabel;
|
|
@@ -22569,14 +22312,14 @@
|
|
|
22569
22312
|
const barChart = true;
|
|
22570
22313
|
let isSecondaryAxisDrawn = false;
|
|
22571
22314
|
const isNormalizedChart = false;
|
|
22572
|
-
let customYaxisMinValue =
|
|
22573
|
-
let customYaxisMaxValue =
|
|
22574
|
-
let secondaryCustomYaxisMinValue =
|
|
22315
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
22316
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
22317
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
22575
22318
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
22576
|
-
)
|
|
22577
|
-
let secondaryCustomYaxisMaxValue =
|
|
22319
|
+
);
|
|
22320
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
22578
22321
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
22579
|
-
)
|
|
22322
|
+
);
|
|
22580
22323
|
let margin;
|
|
22581
22324
|
let yLabel;
|
|
22582
22325
|
let xLabel;
|
|
@@ -22819,9 +22562,7 @@
|
|
|
22819
22562
|
formatOptions,
|
|
22820
22563
|
chartJSON,
|
|
22821
22564
|
customYaxisMinValue,
|
|
22822
|
-
customYaxisMaxValue
|
|
22823
|
-
barChart,
|
|
22824
|
-
innerWidth2
|
|
22565
|
+
customYaxisMaxValue
|
|
22825
22566
|
).yAxisLabelArray;
|
|
22826
22567
|
chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
|
|
22827
22568
|
chartJSON.yMinLeft = yAxisLabelArray[0];
|
|
@@ -22916,10 +22657,7 @@
|
|
|
22916
22657
|
lineData.forEach((data2) => {
|
|
22917
22658
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
22918
22659
|
column = column.enter().append("g").attr("class", "column parentGroup").merge(column);
|
|
22919
|
-
let columnGroups = column.selectAll(".column-group").data(
|
|
22920
|
-
data2.data.map((d) => ({ ...d, properties: data2.properties })),
|
|
22921
|
-
(d) => d.legend + d.dimension
|
|
22922
|
-
);
|
|
22660
|
+
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
22923
22661
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
22924
22662
|
"hoverId",
|
|
22925
22663
|
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
@@ -22989,7 +22727,7 @@
|
|
|
22989
22727
|
},
|
|
22990
22728
|
{
|
|
22991
22729
|
key: "Legend",
|
|
22992
|
-
value: d.
|
|
22730
|
+
value: d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend
|
|
22993
22731
|
}
|
|
22994
22732
|
],
|
|
22995
22733
|
formatOptions,
|
|
@@ -23013,9 +22751,6 @@
|
|
|
23013
22751
|
filteredDimension = fDimension;
|
|
23014
22752
|
visibleBars = fVisibleBars;
|
|
23015
22753
|
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
23016
|
-
if (formatOptions.xAxisLabel.hideZeroValues) {
|
|
23017
|
-
filteredDimension = filteredDimension.filter((d) => totalValueMap.get(d) !== 0);
|
|
23018
|
-
}
|
|
23019
22754
|
drawColumnChart();
|
|
23020
22755
|
};
|
|
23021
22756
|
const drawColumnChart = () => {
|
|
@@ -23096,8 +22831,14 @@
|
|
|
23096
22831
|
const dimensionList = data.DimensionList;
|
|
23097
22832
|
const barChart = true;
|
|
23098
22833
|
const isSecondaryAxisDrawn = false;
|
|
23099
|
-
let customYaxisMinValue =
|
|
23100
|
-
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
|
+
);
|
|
23101
22842
|
let margin;
|
|
23102
22843
|
let yLabel;
|
|
23103
22844
|
let xLabel;
|
|
@@ -23799,8 +23540,14 @@
|
|
|
23799
23540
|
const dimensionList = data.DimensionList;
|
|
23800
23541
|
const barChart = true;
|
|
23801
23542
|
const isSecondaryAxisDrawn = false;
|
|
23802
|
-
let customYaxisMinValue =
|
|
23803
|
-
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
|
+
);
|
|
23804
23551
|
let margin;
|
|
23805
23552
|
let yLabel;
|
|
23806
23553
|
let xLabel;
|
|
@@ -24262,8 +24009,14 @@
|
|
|
24262
24009
|
const dimensionList = data.DimensionList;
|
|
24263
24010
|
const barChart = true;
|
|
24264
24011
|
const isSecondaryAxisDrawn = false;
|
|
24265
|
-
let customYaxisMinValue =
|
|
24266
|
-
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
|
+
);
|
|
24267
24020
|
let margin;
|
|
24268
24021
|
let yLabel;
|
|
24269
24022
|
let xLabel;
|
|
@@ -24940,10 +24693,16 @@
|
|
|
24940
24693
|
const barChart = false;
|
|
24941
24694
|
const isSecondaryAxisDrawn = false;
|
|
24942
24695
|
const isNormalizedChart = false;
|
|
24943
|
-
let customYaxisMinValue =
|
|
24944
|
-
let customYaxisMaxValue =
|
|
24945
|
-
let customXaxisMinValue =
|
|
24946
|
-
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
|
+
);
|
|
24947
24706
|
let margin;
|
|
24948
24707
|
let yLabel;
|
|
24949
24708
|
let xLabel;
|
|
@@ -25453,14 +25212,14 @@
|
|
|
25453
25212
|
const barChart = false;
|
|
25454
25213
|
const isSecondaryAxisDrawn = false;
|
|
25455
25214
|
const isNormalizedChart = false;
|
|
25456
|
-
let customYaxisMinValue =
|
|
25457
|
-
let customYaxisMaxValue =
|
|
25458
|
-
let secondaryCustomYaxisMinValue =
|
|
25215
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
25216
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
25217
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
25459
25218
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
25460
|
-
)
|
|
25461
|
-
let secondaryCustomYaxisMaxValue =
|
|
25219
|
+
);
|
|
25220
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
25462
25221
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
25463
|
-
)
|
|
25222
|
+
);
|
|
25464
25223
|
let margin;
|
|
25465
25224
|
let yLabel;
|
|
25466
25225
|
let xLabel;
|
|
@@ -25778,7 +25537,6 @@
|
|
|
25778
25537
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
25779
25538
|
};
|
|
25780
25539
|
const getChartType = (lineData) => {
|
|
25781
|
-
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
25782
25540
|
lineData.forEach((lData) => {
|
|
25783
25541
|
lData.data.forEach((cData) => {
|
|
25784
25542
|
cData.hideZero = lData.properties.hideZeroValues;
|
|
@@ -25830,7 +25588,7 @@
|
|
|
25830
25588
|
(d2) => d2.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : strokeLineCap.butt
|
|
25831
25589
|
).attr(
|
|
25832
25590
|
"stroke-width",
|
|
25833
|
-
(d2) =>
|
|
25591
|
+
(d2) => d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
|
|
25834
25592
|
).attr("fill", "none");
|
|
25835
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();
|
|
25836
25594
|
onHoverMarkerForAreaChartFamily(
|
|
@@ -25980,14 +25738,14 @@
|
|
|
25980
25738
|
const dimensionList = data.DimensionList;
|
|
25981
25739
|
const barChart = false;
|
|
25982
25740
|
const isSecondaryAxisDrawn = false;
|
|
25983
|
-
let customYaxisMinValue =
|
|
25984
|
-
let customYaxisMaxValue =
|
|
25985
|
-
let secondaryCustomYaxisMinValue =
|
|
25741
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
25742
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
25743
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
25986
25744
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
25987
|
-
)
|
|
25988
|
-
let secondaryCustomYaxisMaxValue =
|
|
25745
|
+
);
|
|
25746
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
25989
25747
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
25990
|
-
)
|
|
25748
|
+
);
|
|
25991
25749
|
let margin;
|
|
25992
25750
|
let yLabel;
|
|
25993
25751
|
let xLabel;
|
|
@@ -26319,7 +26077,6 @@
|
|
|
26319
26077
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
26320
26078
|
};
|
|
26321
26079
|
const getChartType = (lineData) => {
|
|
26322
|
-
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
26323
26080
|
lineData.forEach((lData) => {
|
|
26324
26081
|
lData.data.forEach((cData) => {
|
|
26325
26082
|
cData.hideZero = lData.properties.hideZeroValues;
|
|
@@ -26353,7 +26110,7 @@
|
|
|
26353
26110
|
const g = select$2(this);
|
|
26354
26111
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
|
|
26355
26112
|
"stroke",
|
|
26356
|
-
(d2) => d2.color !== commonColors.white ?
|
|
26113
|
+
(d2) => d2.color !== commonColors.white ? d2.color : "none"
|
|
26357
26114
|
).attr("stroke-dasharray", (d2) => {
|
|
26358
26115
|
const lineWidth = parseInt(
|
|
26359
26116
|
seriesData[i].properties.lineWidth.toString()
|
|
@@ -26371,7 +26128,7 @@
|
|
|
26371
26128
|
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
26372
26129
|
).attr(
|
|
26373
26130
|
"stroke-width",
|
|
26374
|
-
() =>
|
|
26131
|
+
(d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
|
|
26375
26132
|
).attr("fill", "none").style("pointer-events", "none");
|
|
26376
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();
|
|
26377
26134
|
svg.selectAll(
|
|
@@ -26387,8 +26144,7 @@
|
|
|
26387
26144
|
lineData,
|
|
26388
26145
|
xScale,
|
|
26389
26146
|
yScaleLeft,
|
|
26390
|
-
chartType
|
|
26391
|
-
true
|
|
26147
|
+
chartType
|
|
26392
26148
|
);
|
|
26393
26149
|
lineMarkers(
|
|
26394
26150
|
areas,
|
|
@@ -26570,14 +26326,14 @@
|
|
|
26570
26326
|
const dimensionList = data.DimensionList;
|
|
26571
26327
|
const barChart = false;
|
|
26572
26328
|
const isSecondaryAxisDrawn = false;
|
|
26573
|
-
let customYaxisMinValue =
|
|
26574
|
-
let customYaxisMaxValue =
|
|
26575
|
-
let secondaryCustomYaxisMinValue =
|
|
26329
|
+
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
26330
|
+
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
26331
|
+
let secondaryCustomYaxisMinValue = parseFloat(
|
|
26576
26332
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
26577
|
-
)
|
|
26578
|
-
let secondaryCustomYaxisMaxValue =
|
|
26333
|
+
);
|
|
26334
|
+
let secondaryCustomYaxisMaxValue = parseFloat(
|
|
26579
26335
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
26580
|
-
)
|
|
26336
|
+
);
|
|
26581
26337
|
let margin;
|
|
26582
26338
|
let yLabel;
|
|
26583
26339
|
let xLabel;
|
|
@@ -26868,7 +26624,6 @@
|
|
|
26868
26624
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
26869
26625
|
};
|
|
26870
26626
|
const getChartType = (lineData) => {
|
|
26871
|
-
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
26872
26627
|
stackChartData.forEach(
|
|
26873
26628
|
(data2, i) => data2.forEach((item, position) => {
|
|
26874
26629
|
const total = item.data.total;
|
|
@@ -26910,7 +26665,7 @@
|
|
|
26910
26665
|
const g = select$2(this);
|
|
26911
26666
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
|
|
26912
26667
|
"stroke",
|
|
26913
|
-
(d2) => d2.color !== commonColors.white ?
|
|
26668
|
+
(d2) => d2.color !== commonColors.white ? d2.color : "none"
|
|
26914
26669
|
).attr("stroke-dasharray", (d2) => {
|
|
26915
26670
|
const lineWidth = parseInt(
|
|
26916
26671
|
seriesData[i].properties.lineWidth.toString()
|
|
@@ -26928,7 +26683,7 @@
|
|
|
26928
26683
|
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
26929
26684
|
).attr(
|
|
26930
26685
|
"stroke-width",
|
|
26931
|
-
() =>
|
|
26686
|
+
(d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
|
|
26932
26687
|
).attr("fill", "none").style("pointer-events", "none");
|
|
26933
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();
|
|
26934
26689
|
svg.selectAll(
|
|
@@ -26946,8 +26701,7 @@
|
|
|
26946
26701
|
lineData,
|
|
26947
26702
|
xScale,
|
|
26948
26703
|
yScaleLeft,
|
|
26949
|
-
chartType
|
|
26950
|
-
true
|
|
26704
|
+
chartType
|
|
26951
26705
|
);
|
|
26952
26706
|
gTag.selectAll(".parentGroup").raise();
|
|
26953
26707
|
gTag.selectAll(".hoverLine").raise();
|
|
@@ -27316,7 +27070,7 @@
|
|
|
27316
27070
|
try {
|
|
27317
27071
|
const arc2 = arc$1().innerRadius(0).outerRadius(radius);
|
|
27318
27072
|
const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
|
|
27319
|
-
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(
|
|
27320
27074
|
"hoverId",
|
|
27321
27075
|
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27322
27076
|
).attr(
|
|
@@ -27710,7 +27464,7 @@
|
|
|
27710
27464
|
const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius);
|
|
27711
27465
|
const arcOver = arc$1().innerRadius(innerRadius).outerRadius(radius + 10);
|
|
27712
27466
|
const parentGroup = chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`);
|
|
27713
|
-
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(
|
|
27714
27468
|
"hoverId",
|
|
27715
27469
|
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27716
27470
|
).attr(
|
|
@@ -29066,8 +28820,6 @@
|
|
|
29066
28820
|
let legendListWidth;
|
|
29067
28821
|
let radius;
|
|
29068
28822
|
let innerRadius;
|
|
29069
|
-
const arcIndex = 1;
|
|
29070
|
-
const progressIndex = 0;
|
|
29071
28823
|
require$$0$1.useEffect(() => {
|
|
29072
28824
|
drawChart();
|
|
29073
28825
|
}, [formatOptions]);
|
|
@@ -29127,22 +28879,23 @@
|
|
|
29127
28879
|
};
|
|
29128
28880
|
const initProgressChartData = () => {
|
|
29129
28881
|
try {
|
|
29130
|
-
|
|
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;
|
|
29131
28884
|
} catch (error) {
|
|
29132
28885
|
logError$2(fileName$3, "initProgressChartData", error);
|
|
29133
28886
|
}
|
|
29134
28887
|
};
|
|
29135
28888
|
const drawProgressChart = () => {
|
|
29136
28889
|
try {
|
|
29137
|
-
let maxValue = ChartData[
|
|
29138
|
-
let progressValue = ChartData[
|
|
28890
|
+
let maxValue = ChartData[0].data[0].value;
|
|
28891
|
+
let progressValue = ChartData[1].data[0].value;
|
|
29139
28892
|
let completeAngle = Math.PI * 2;
|
|
29140
28893
|
let progressAngle = progressValue / maxValue * Math.PI * 2;
|
|
29141
28894
|
let valuefontStyle = chartFormatOptions.plotArea.dataLabelValueFontStyle;
|
|
29142
28895
|
const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius).startAngle(0).cornerRadius(
|
|
29143
28896
|
convertStringToNumber(chartFormatOptions.plotArea.cornerRadius)
|
|
29144
28897
|
);
|
|
29145
|
-
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(
|
|
29146
28899
|
"fill-opacity",
|
|
29147
28900
|
chartFormatOptions.plotArea.opacityforProgressScale
|
|
29148
28901
|
).attr("d", arc2({ endAngle: completeAngle })).on("mousemove", (d) => {
|
|
@@ -29150,7 +28903,7 @@
|
|
|
29150
28903
|
showTooltipOnMouseMove(
|
|
29151
28904
|
[
|
|
29152
28905
|
{
|
|
29153
|
-
key: ChartData[
|
|
28906
|
+
key: ChartData[0].properties.alias,
|
|
29154
28907
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
|
|
29155
28908
|
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
29156
28909
|
chartFormatOptions.toolTip.toolTipNumberFormatProgress,
|
|
@@ -29160,7 +28913,7 @@
|
|
|
29160
28913
|
],
|
|
29161
28914
|
chartFormatOptions,
|
|
29162
28915
|
void 0,
|
|
29163
|
-
ChartData[
|
|
28916
|
+
ChartData[0].properties
|
|
29164
28917
|
);
|
|
29165
28918
|
} catch (error) {
|
|
29166
28919
|
logError$2(
|
|
@@ -29180,7 +28933,7 @@
|
|
|
29180
28933
|
);
|
|
29181
28934
|
}
|
|
29182
28935
|
}).attr("transform", getTransformString());
|
|
29183
|
-
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(
|
|
29184
28937
|
"fill-opacity",
|
|
29185
28938
|
chartFormatOptions.plotArea.opacityforProgressGoal
|
|
29186
28939
|
).attr("d", arc2({ endAngle: progressAngle })).on("mousemove", (d) => {
|
|
@@ -29188,7 +28941,7 @@
|
|
|
29188
28941
|
showTooltipOnMouseMove(
|
|
29189
28942
|
[
|
|
29190
28943
|
{
|
|
29191
|
-
key: ChartData[
|
|
28944
|
+
key: ChartData[1].properties.alias,
|
|
29192
28945
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? Math.round(progressValue / maxValue * 100) + "%" : getNumberWithFormatFunction(
|
|
29193
28946
|
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
29194
28947
|
chartFormatOptions.toolTip.toolTipDecimalPrecision,
|
|
@@ -29196,7 +28949,7 @@
|
|
|
29196
28949
|
)(maxValue)
|
|
29197
28950
|
},
|
|
29198
28951
|
{
|
|
29199
|
-
key: ChartData[
|
|
28952
|
+
key: ChartData[0].properties.alias,
|
|
29200
28953
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
|
|
29201
28954
|
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
29202
28955
|
chartFormatOptions.toolTip.toolTipDecimalPrecision,
|
|
@@ -29206,7 +28959,7 @@
|
|
|
29206
28959
|
],
|
|
29207
28960
|
chartFormatOptions,
|
|
29208
28961
|
void 0,
|
|
29209
|
-
ChartData[
|
|
28962
|
+
ChartData[1].properties
|
|
29210
28963
|
);
|
|
29211
28964
|
} catch (error) {
|
|
29212
28965
|
logError$2(
|
|
@@ -54006,22 +53759,27 @@
|
|
|
54006
53759
|
const WaterfallChart = ({
|
|
54007
53760
|
isDateType,
|
|
54008
53761
|
formatOptions,
|
|
54009
|
-
data
|
|
54010
|
-
isAdvancedAnalyticsWaterFall = false
|
|
53762
|
+
data
|
|
54011
53763
|
}) => {
|
|
54012
53764
|
const chartId = crypto.randomUUID?.();
|
|
54013
53765
|
let columnWidth = 0;
|
|
54014
53766
|
let colorScale;
|
|
54015
53767
|
const chartType = chartTypes.WaterfallChart;
|
|
54016
53768
|
const svgRef = require$$0$1.useRef();
|
|
54017
|
-
const isAdvancedWaterfall =
|
|
53769
|
+
const isAdvancedWaterfall = Array.isArray(data) && data.length > 0 && data[0]?.hasOwnProperty("Column1") && data[0]?.hasOwnProperty("Column6");
|
|
54018
53770
|
const seriesData = isAdvancedWaterfall ? [] : generalizedChartData(data.ChartData, data.DimensionList);
|
|
54019
53771
|
const dimensionList = data.DimensionList;
|
|
54020
53772
|
const barChart = false;
|
|
54021
53773
|
const isSecondaryAxisDrawn = false;
|
|
54022
53774
|
const isNormalizedChart = false;
|
|
54023
|
-
let customYaxisMinValue =
|
|
54024
|
-
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
|
+
);
|
|
54025
53783
|
let margin;
|
|
54026
53784
|
let yLabel;
|
|
54027
53785
|
let xLabel;
|
|
@@ -54447,17 +54205,16 @@
|
|
|
54447
54205
|
"visibility",
|
|
54448
54206
|
(d) => k2 === 0 && d.data.dimension && stackTotalData ? "hidden" : "visible"
|
|
54449
54207
|
).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
54450
|
-
const key = !isAdvancedWaterfall ? waterfallKeys.dimensionTotal : waterfallKeys.base;
|
|
54451
54208
|
const markerInfo = {
|
|
54452
54209
|
markerShape: "square",
|
|
54453
|
-
markerColor: d.key ===
|
|
54210
|
+
markerColor: d.key === "dimensionTotal" ? formatOptions.plotArea.totalColor : d.key === "down" ? formatOptions.plotArea.negativeColor : formatOptions.plotArea.positiveColor
|
|
54454
54211
|
};
|
|
54455
54212
|
showTooltipOnMouseMove(
|
|
54456
54213
|
[
|
|
54457
54214
|
{
|
|
54458
54215
|
key: formatOptions.yAxisTitle.yAxisTitleText,
|
|
54459
|
-
value: (d.key ===
|
|
54460
|
-
d.key ===
|
|
54216
|
+
value: (d.key === "up" ? "+" : d.key === "down" ? "-" : "") + getNumberWithFormat(
|
|
54217
|
+
d.key === "dimensionTotal" ? d.data.dimensionTotal : d[1] - d[0],
|
|
54461
54218
|
formatOptions.toolTip.toolTipDisplayUnits,
|
|
54462
54219
|
formatOptions.toolTip.toolTipNumberFormat,
|
|
54463
54220
|
formatOptions.toolTip.toolTipDecimalPrecision
|
|
@@ -54465,7 +54222,7 @@
|
|
|
54465
54222
|
},
|
|
54466
54223
|
{
|
|
54467
54224
|
key: "Legend",
|
|
54468
|
-
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"
|
|
54469
54226
|
}
|
|
54470
54227
|
],
|
|
54471
54228
|
formatOptions,
|
|
@@ -54670,14 +54427,13 @@
|
|
|
54670
54427
|
};
|
|
54671
54428
|
const toNumber = (v) => v === null || v === void 0 || v === "" ? 0 : Number(v);
|
|
54672
54429
|
const mapAdvancedWaterfallData = (rawData) => {
|
|
54673
|
-
|
|
54674
|
-
|
|
54675
|
-
|
|
54676
|
-
|
|
54677
|
-
|
|
54678
|
-
|
|
54679
|
-
|
|
54680
|
-
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)
|
|
54681
54437
|
}));
|
|
54682
54438
|
};
|
|
54683
54439
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -54710,8 +54466,14 @@
|
|
|
54710
54466
|
const barChart = true;
|
|
54711
54467
|
const isSecondaryAxisDrawn = false;
|
|
54712
54468
|
const isNormalizedChart = false;
|
|
54713
|
-
let customYaxisMinValue =
|
|
54714
|
-
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
|
+
);
|
|
54715
54477
|
let margin;
|
|
54716
54478
|
let yLabel;
|
|
54717
54479
|
let xLabel;
|
|
@@ -54770,7 +54532,6 @@
|
|
|
54770
54532
|
formatOptions
|
|
54771
54533
|
));
|
|
54772
54534
|
formatOptions.xAxisLabel.labelTextWrap = false;
|
|
54773
|
-
formatOptions.xAxisLabel.xAxisLabelRotation = 90;
|
|
54774
54535
|
preProcessChartData();
|
|
54775
54536
|
({ maxNumberForPrimaryAxis, maxNumberForSecondaryAxis } = customYscaleLabelFormatting$1(
|
|
54776
54537
|
// for calculating primary/secondary axis max number so that we can calculate margin accordinglt
|
|
@@ -55230,10 +54991,9 @@
|
|
|
55230
54991
|
svg,
|
|
55231
54992
|
yScaleLeft,
|
|
55232
54993
|
columnWidth,
|
|
55233
|
-
isReportEditable,
|
|
55234
54994
|
isAdvanceAnalyticsChart,
|
|
55235
|
-
|
|
55236
|
-
|
|
54995
|
+
isReportEditable,
|
|
54996
|
+
barChart
|
|
55237
54997
|
);
|
|
55238
54998
|
};
|
|
55239
54999
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|