pace-chart-lib 1.0.60 → 1.0.62
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/ChartJS/charts/CJSAreaChart.d.ts +18 -0
- package/dist/Components/Charts/ChartJS/charts/CJSBubbleChart.d.ts +16 -0
- package/dist/Components/Charts/ChartJS/charts/CJSColumnChart.d.ts +18 -0
- package/dist/Components/Charts/ChartJS/charts/CJSDonutChart.d.ts +18 -0
- package/dist/Components/Charts/ChartJS/charts/CJSHorizontalBarChart.d.ts +17 -0
- package/dist/Components/Charts/ChartJS/charts/CJSLineChart.d.ts +18 -0
- package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackAreaChart.d.ts +16 -0
- package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackColumnChart.d.ts +16 -0
- package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackHorizontalBarChart.d.ts +16 -0
- package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackLineChart.d.ts +16 -0
- package/dist/Components/Charts/ChartJS/charts/CJSPieChart.d.ts +22 -0
- package/dist/Components/Charts/ChartJS/charts/CJSPolarAreaChart.d.ts +18 -0
- package/dist/Components/Charts/ChartJS/charts/CJSRadarChart.d.ts +16 -0
- package/dist/Components/Charts/ChartJS/charts/CJSScatterChart.d.ts +16 -0
- package/dist/Components/Charts/ChartJS/charts/CJSStackAreaChart.d.ts +15 -0
- package/dist/Components/Charts/ChartJS/charts/CJSStackColumnChart.d.ts +15 -0
- package/dist/Components/Charts/ChartJS/charts/CJSStackHorizontalBarChart.d.ts +15 -0
- package/dist/Components/Charts/ChartJS/charts/CJSStackLineChart.d.ts +15 -0
- package/dist/Components/Charts/ChartJS/core/ChartJSDataTransformer.d.ts +31 -0
- package/dist/Components/Charts/ChartJS/core/ChartJSOptionsMapper.d.ts +9 -0
- package/dist/Components/Charts/ChartJS/core/ChartJSWrapper.d.ts +27 -0
- package/dist/Components/Charts/ChartJS/index.d.ts +21 -0
- package/dist/Components/Charts/ChartsWithAxis/AreaFamily/AreaChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/AreaFamily/NormalizedStackAreaChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/AreaFamily/StackAreaChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisFunctions.d.ts +638 -0
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisTypes.types.d.ts +171 -0
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnHistogramChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/CustomColumnChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/LayeredColumnChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/NormalizedStackColumnChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/StackColumnChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalBarChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalHistogramChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/LayeredHorizontalBarChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/NormalizedStackHorizontalBarChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/StackHorizontalBarChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/LineFamily/LineChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/LineFamily/NormalizedStackLineChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/LineFamily/StackLineChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/DotPlot.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/TornadoChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/WaterfallChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisFunctions.d.ts +96 -0
- package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisTypes.types.d.ts +110 -0
- package/dist/Components/Charts/ChartsWithoutAxis/Maps/Cordinates.d.ts +26 -0
- package/dist/Components/Charts/ChartsWithoutAxis/Maps/Maps.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/BubbleChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/OrganizationChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ProgressChart.d.ts +3 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/PyramidChart.d.ts +3 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/RadialBarChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/SankeyChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ScatterChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/Speedometer.d.ts +3 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/VennChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/WordCloud.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/DonutChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieChart.d.ts +4 -0
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieFamilyCommonFunctions.d.ts +10 -0
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieofPieChart.d.ts +3 -0
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/TreemapChart.d.ts +3 -0
- package/dist/Components/Charts/Core/Common.types.d.ts +409 -0
- package/dist/Components/Charts/Core/CommonFunctions.d.ts +250 -0
- package/dist/Components/Charts/Core/DefaultChartDataProperties.d.ts +66 -0
- package/dist/Components/Charts/Core/DefaultProperties.types.d.ts +630 -0
- package/dist/Services/ErrorLog.d.ts +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/pace-chart-lib.es.js +187 -110
- package/dist/pace-chart-lib.umd.js +187 -110
- package/package.json +1 -1
|
@@ -11264,7 +11264,13 @@
|
|
|
11264
11264
|
dataLabelsCoordinates: [],
|
|
11265
11265
|
hideInsignificantValue: false,
|
|
11266
11266
|
sortBy: "default",
|
|
11267
|
-
chartDirection: "top"
|
|
11267
|
+
chartDirection: "top",
|
|
11268
|
+
plotAreaRangeFilter: {
|
|
11269
|
+
enabled: false,
|
|
11270
|
+
condition: "lt",
|
|
11271
|
+
minVal: 0,
|
|
11272
|
+
maxVal: 100
|
|
11273
|
+
}
|
|
11268
11274
|
},
|
|
11269
11275
|
heatMap: {
|
|
11270
11276
|
showHeatMap: false,
|
|
@@ -13150,9 +13156,9 @@
|
|
|
13150
13156
|
const measure = getMeasure(item);
|
|
13151
13157
|
switch (condition) {
|
|
13152
13158
|
case "lt":
|
|
13153
|
-
return measure
|
|
13159
|
+
return measure <= maxVal;
|
|
13154
13160
|
case "gt":
|
|
13155
|
-
return measure
|
|
13161
|
+
return measure >= minVal;
|
|
13156
13162
|
case "in":
|
|
13157
13163
|
return measure >= minVal && measure <= maxVal;
|
|
13158
13164
|
case "not-in":
|
|
@@ -20938,6 +20944,25 @@
|
|
|
20938
20944
|
) });
|
|
20939
20945
|
};
|
|
20940
20946
|
const fileName$a = "ChartsWithoutAxisFunctions.ts";
|
|
20947
|
+
function applyPlotAreaRangeFilter(labelsList, formatOptions, getMeasure) {
|
|
20948
|
+
if (!formatOptions?.plotArea?.plotAreaRangeFilter?.enabled) return labelsList;
|
|
20949
|
+
const { condition, minVal, maxVal } = formatOptions.plotArea.plotAreaRangeFilter;
|
|
20950
|
+
return labelsList.filter((item) => {
|
|
20951
|
+
const measure = getMeasure(item);
|
|
20952
|
+
switch (condition) {
|
|
20953
|
+
case "lt":
|
|
20954
|
+
return measure <= maxVal;
|
|
20955
|
+
case "gt":
|
|
20956
|
+
return measure >= minVal;
|
|
20957
|
+
case "in":
|
|
20958
|
+
return measure >= minVal && measure <= maxVal;
|
|
20959
|
+
case "not-in":
|
|
20960
|
+
return measure < minVal || measure > maxVal;
|
|
20961
|
+
default:
|
|
20962
|
+
return true;
|
|
20963
|
+
}
|
|
20964
|
+
});
|
|
20965
|
+
}
|
|
20941
20966
|
function marginCalculationForBubbleScatter(width, height, maxMeasure, formatOptions, maxDimension, maxLegendDimensions) {
|
|
20942
20967
|
try {
|
|
20943
20968
|
formatOptions.xAxisLabel.xAxisDateFormat = formatOptions.xAxisLabel.xAxisDateFormat == "DD-MM-YYYY" ? "," : formatOptions.xAxisLabel.xAxisDateFormat;
|
|
@@ -28908,8 +28933,10 @@
|
|
|
28908
28933
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
28909
28934
|
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
28910
28935
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
28911
|
-
|
|
28912
|
-
(d) => d.data.properties.dataLabelPosition == "1"
|
|
28936
|
+
applyAnnotationRangeFilter(
|
|
28937
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
28938
|
+
chartFormatOptions,
|
|
28939
|
+
(d) => d.data.data[0].value
|
|
28913
28940
|
)
|
|
28914
28941
|
).enter().append("text").attr(
|
|
28915
28942
|
"hoverId",
|
|
@@ -28945,8 +28972,10 @@
|
|
|
28945
28972
|
return "";
|
|
28946
28973
|
});
|
|
28947
28974
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
28948
|
-
|
|
28949
|
-
(d) => d.data.properties.dataLabelPosition == "1"
|
|
28975
|
+
applyAnnotationRangeFilter(
|
|
28976
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
28977
|
+
chartFormatOptions,
|
|
28978
|
+
(d) => d.data.data[0].value
|
|
28950
28979
|
)
|
|
28951
28980
|
).enter().append("text").attr(
|
|
28952
28981
|
"hoverId",
|
|
@@ -29013,8 +29042,10 @@
|
|
|
29013
29042
|
let outerRadius = arc$1().startAngle((d) => d.x0).endAngle((d) => d.x1).innerRadius((d) => d.depth > 1 ? d.y1 - 1 + radius / 7 : 0).outerRadius((d) => d.depth > 1 ? d.y1 - 1 + radius / 7 : 0);
|
|
29014
29043
|
let innerRadius = arc$1().startAngle((d) => d.x0).endAngle((d) => d.x1).innerRadius((d) => d.depth > 2 ? d.y0 : 0).outerRadius((d) => d.y1 + radius / 1.5);
|
|
29015
29044
|
chartAreaTagG.selectAll("polyline").data(
|
|
29016
|
-
|
|
29017
|
-
(d) => d.data.properties.dataLabelPosition == "2"
|
|
29045
|
+
applyAnnotationRangeFilter(
|
|
29046
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29047
|
+
chartFormatOptions,
|
|
29048
|
+
(d) => d.data.data[0].value
|
|
29018
29049
|
)
|
|
29019
29050
|
).join("polyline").attr("transform", getPiePosition()).style(
|
|
29020
29051
|
"stroke",
|
|
@@ -29035,8 +29066,10 @@
|
|
|
29035
29066
|
return [posA, posB, [xC, yC]].map((point2) => point2.join(",")).join(" ");
|
|
29036
29067
|
});
|
|
29037
29068
|
chartAreaTagG.append("g").attr("transform", getPiePosition()).selectAll("foreignObject").data(
|
|
29038
|
-
|
|
29039
|
-
(d) => d.data.properties.dataLabelPosition == "2"
|
|
29069
|
+
applyAnnotationRangeFilter(
|
|
29070
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29071
|
+
chartFormatOptions,
|
|
29072
|
+
(d) => d.data.data[0].value
|
|
29040
29073
|
)
|
|
29041
29074
|
).join("foreignObject").attr("width", 80).attr("height", 60).attr("x", (d) => {
|
|
29042
29075
|
let midangle = d.x0 + (d.x1 - d.x0) / 2;
|
|
@@ -29343,8 +29376,10 @@
|
|
|
29343
29376
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
29344
29377
|
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
29345
29378
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29346
|
-
|
|
29347
|
-
(d) => d.data.properties.dataLabelPosition == "1"
|
|
29379
|
+
applyAnnotationRangeFilter(
|
|
29380
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
29381
|
+
chartFormatOptions,
|
|
29382
|
+
(d) => d.data.data[0].value
|
|
29348
29383
|
)
|
|
29349
29384
|
).enter().append("text").attr(
|
|
29350
29385
|
"hoverId",
|
|
@@ -29380,8 +29415,10 @@
|
|
|
29380
29415
|
return "";
|
|
29381
29416
|
});
|
|
29382
29417
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29383
|
-
|
|
29384
|
-
(d) => d.data.properties.dataLabelPosition == "1"
|
|
29418
|
+
applyAnnotationRangeFilter(
|
|
29419
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
29420
|
+
chartFormatOptions,
|
|
29421
|
+
(d) => d.data.data[0].value
|
|
29385
29422
|
)
|
|
29386
29423
|
).enter().append("text").attr(
|
|
29387
29424
|
"hoverId",
|
|
@@ -29454,8 +29491,10 @@
|
|
|
29454
29491
|
let outerRadius = arc$1().startAngle((d) => d.x0).endAngle((d) => d.x1).innerRadius((d) => d.depth > 1 ? d.y1 - 1 + radius / 7 : 0).outerRadius((d) => d.depth > 1 ? d.y1 - 1 + radius / 7 : 0);
|
|
29455
29492
|
let innerRadius2 = arc$1().startAngle((d) => d.x0).endAngle((d) => d.x1).innerRadius((d) => d.depth > 2 ? d.y0 : 0).outerRadius((d) => d.y1 + radius / 1.5);
|
|
29456
29493
|
chartAreaTagG.selectAll("polyline").data(
|
|
29457
|
-
|
|
29458
|
-
(d) => d.data.properties.dataLabelPosition == "2"
|
|
29494
|
+
applyAnnotationRangeFilter(
|
|
29495
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29496
|
+
chartFormatOptions,
|
|
29497
|
+
(d) => d.data.data[0].value
|
|
29459
29498
|
)
|
|
29460
29499
|
).join("polyline").attr("transform", getPiePosition()).style(
|
|
29461
29500
|
"stroke",
|
|
@@ -29476,8 +29515,10 @@
|
|
|
29476
29515
|
return [posA, posB, [xC, yC]].map((point2) => point2.join(",")).join(" ");
|
|
29477
29516
|
});
|
|
29478
29517
|
chartAreaTagG.append("g").attr("transform", getPiePosition()).selectAll("foreignObject").data(
|
|
29479
|
-
|
|
29480
|
-
(d) => d.data.properties.dataLabelPosition == "2"
|
|
29518
|
+
applyAnnotationRangeFilter(
|
|
29519
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29520
|
+
chartFormatOptions,
|
|
29521
|
+
(d) => d.data.data[0].value
|
|
29481
29522
|
)
|
|
29482
29523
|
).join("foreignObject").attr("width", 80).attr("height", 60).attr("x", (d) => {
|
|
29483
29524
|
let midangle = d.x0 + (d.x1 - d.x0) / 2;
|
|
@@ -29776,7 +29817,23 @@
|
|
|
29776
29817
|
}
|
|
29777
29818
|
leaf.append("clipPath").attr("id", (d, i) => `clip-${i}-${chartId}`).append("rect").attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0);
|
|
29778
29819
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
29779
|
-
|
|
29820
|
+
const rf = chartFormatOptions.annotation.annotationRangeFilter;
|
|
29821
|
+
leaf.filter((d) => {
|
|
29822
|
+
if (!rf?.enabled) return true;
|
|
29823
|
+
const val = d.data.data[0].value;
|
|
29824
|
+
switch (rf.condition) {
|
|
29825
|
+
case "lt":
|
|
29826
|
+
return val < rf.maxVal;
|
|
29827
|
+
case "gt":
|
|
29828
|
+
return val > rf.minVal;
|
|
29829
|
+
case "in":
|
|
29830
|
+
return val >= rf.minVal && val <= rf.maxVal;
|
|
29831
|
+
case "not-in":
|
|
29832
|
+
return val < rf.minVal || val > rf.maxVal;
|
|
29833
|
+
default:
|
|
29834
|
+
return true;
|
|
29835
|
+
}
|
|
29836
|
+
}).append("text").style("fill", (d) => d.data.properties.labelFontColor).style("font-family", (d) => d.data.properties.fontFamily).style("font-size", (d) => d.data.properties.fontSize).style(
|
|
29780
29837
|
"font-style",
|
|
29781
29838
|
(d) => d.data.properties.fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
29782
29839
|
).style(
|
|
@@ -30085,7 +30142,7 @@
|
|
|
30085
30142
|
const drawParentPieDataLabels = () => {
|
|
30086
30143
|
try {
|
|
30087
30144
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
30088
|
-
chartAreaTagG.append("g").attr("class", "parentLabels parentGroup").attr("transform", `${getParentPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(pieOfPieData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
30145
|
+
chartAreaTagG.append("g").attr("class", "parentLabels parentGroup").attr("transform", `${getParentPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(applyAnnotationRangeFilter(pieOfPieData, chartFormatOptions, (d) => d.data.data[0].value)).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
30089
30146
|
"fill",
|
|
30090
30147
|
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
30091
30148
|
).attr(
|
|
@@ -30109,7 +30166,7 @@
|
|
|
30109
30166
|
}
|
|
30110
30167
|
return "";
|
|
30111
30168
|
});
|
|
30112
|
-
chartAreaTagG.append("g").attr("class", "parentLabels parentGroup").attr("transform", `${getParentPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(pieOfPieData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
30169
|
+
chartAreaTagG.append("g").attr("class", "parentLabels parentGroup").attr("transform", `${getParentPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(applyAnnotationRangeFilter(pieOfPieData, chartFormatOptions, (d) => d.data.data[0].value)).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
30113
30170
|
"fill",
|
|
30114
30171
|
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
30115
30172
|
).attr(
|
|
@@ -30155,7 +30212,7 @@
|
|
|
30155
30212
|
const drawChildPieDataLabels = (childData) => {
|
|
30156
30213
|
try {
|
|
30157
30214
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
30158
|
-
chartAreaTagG.append("g").attr("class", "childLabels parentGroup").attr("transform", `${getChildPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(childData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
30215
|
+
chartAreaTagG.append("g").attr("class", "childLabels parentGroup").attr("transform", `${getChildPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(applyAnnotationRangeFilter(childData, chartFormatOptions, (d) => d.data.data[0].value)).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
30159
30216
|
"fill",
|
|
30160
30217
|
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
30161
30218
|
).attr(
|
|
@@ -30179,7 +30236,7 @@
|
|
|
30179
30236
|
}
|
|
30180
30237
|
return "";
|
|
30181
30238
|
});
|
|
30182
|
-
chartAreaTagG.append("g").attr("class", "childLabels parentGroup").attr("transform", `${getChildPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(childData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
30239
|
+
chartAreaTagG.append("g").attr("class", "childLabels parentGroup").attr("transform", `${getChildPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(applyAnnotationRangeFilter(childData, chartFormatOptions, (d) => d.data.data[0].value)).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
30183
30240
|
"fill",
|
|
30184
30241
|
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
30185
30242
|
).attr(
|
|
@@ -30428,7 +30485,11 @@
|
|
|
30428
30485
|
if (chartFormatOptions.annotation.annotationVisibility) {
|
|
30429
30486
|
let makeAnnotations = annotation();
|
|
30430
30487
|
let ConnectorType = chartFormatOptions.annotation.connectorType ? chartFormatOptions.annotation.connectorType.toLowerCase() : "None";
|
|
30431
|
-
let finalAnnotationList =
|
|
30488
|
+
let finalAnnotationList = applyAnnotationRangeFilter(
|
|
30489
|
+
annotationsList,
|
|
30490
|
+
chartFormatOptions,
|
|
30491
|
+
(item) => item.data.measure
|
|
30492
|
+
);
|
|
30432
30493
|
const connectorStyleKey = chartFormatOptions.annotation.connectorStyle?.toLowerCase();
|
|
30433
30494
|
makeAnnotations.editMode(chartFormatOptions.annotation.annotationDraggable).accessors({
|
|
30434
30495
|
x: function() {
|
|
@@ -30850,7 +30911,15 @@
|
|
|
30850
30911
|
});
|
|
30851
30912
|
chartAreaTagG.append("text").attr("transform", getTransformString()).attr("dy", "0.35em").attr("text-anchor", "middle").attr(
|
|
30852
30913
|
"visibility",
|
|
30853
|
-
|
|
30914
|
+
() => {
|
|
30915
|
+
if (!chartFormatOptions.plotArea.dataLabels) return "hidden";
|
|
30916
|
+
const passed = applyPlotAreaRangeFilter(
|
|
30917
|
+
[{ value: progressValue }],
|
|
30918
|
+
chartFormatOptions,
|
|
30919
|
+
(d) => d?.value ?? 0
|
|
30920
|
+
);
|
|
30921
|
+
return passed.length > 0 ? "visible" : "hidden";
|
|
30922
|
+
}
|
|
30854
30923
|
).attr(
|
|
30855
30924
|
"fill",
|
|
30856
30925
|
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : chartFormatOptions.toolTip.toolTipDisplayUnits
|
|
@@ -31654,7 +31723,11 @@
|
|
|
31654
31723
|
arcs.attr("d", (d, i) => animArc({ ...d, endAngle: scale2(Math.abs(d.data[0].value)) }, i));
|
|
31655
31724
|
}
|
|
31656
31725
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
31657
|
-
const labelsData =
|
|
31726
|
+
const labelsData = applyPlotAreaRangeFilter(
|
|
31727
|
+
getModifiedDataForLabels(ChartData),
|
|
31728
|
+
chartFormatOptions,
|
|
31729
|
+
(d) => d?.data?.[0]?.value ?? 0
|
|
31730
|
+
);
|
|
31658
31731
|
svg2.selectAll(".arc-label-" + chartId).data(labelsData).enter().append("text").attr("class", "arc-label-" + chartId).attr("class", "parentGroup").attr("text-anchor", "start").attr("dy", (d, i) => (getOuterRadius(d.index ?? i) - getInnerRadius(d.index ?? i)) / 1.75).append("textPath").attr("xlink:href", (d, i) => `#arc-path-${d.index ?? i}-` + chartId).style("startOffset", "50%").attr("hoverId", (d) => d.legend.replaceAll(" ", "-")).text(
|
|
31659
31732
|
(d) => ` ${d.properties.alias}
|
|
31660
31733
|
${chartFormatOptions.plotArea.dataLabelValue ? getNumberWithFormatFunction(
|
|
@@ -54109,9 +54182,10 @@
|
|
|
54109
54182
|
const OrganizationChart = ({
|
|
54110
54183
|
data,
|
|
54111
54184
|
formatOptions,
|
|
54112
|
-
legendEntries,
|
|
54185
|
+
// legendEntries,
|
|
54113
54186
|
legendSequence
|
|
54114
54187
|
}) => {
|
|
54188
|
+
let legendEntries = data.LegendList ?? [];
|
|
54115
54189
|
const chartId = crypto.randomUUID();
|
|
54116
54190
|
const svgRef = require$$0$1.useRef();
|
|
54117
54191
|
const floatingSvgRef = require$$0$1.useRef();
|
|
@@ -54151,20 +54225,11 @@
|
|
|
54151
54225
|
chartDirection = chartFormatOptions.plotArea.chartDirection || orgChartDirection.left;
|
|
54152
54226
|
var sum2 = 0;
|
|
54153
54227
|
var absoluteSum = 0;
|
|
54154
|
-
|
|
54155
|
-
|
|
54156
|
-
|
|
54157
|
-
});
|
|
54158
|
-
var newObj = {
|
|
54159
|
-
id: 0,
|
|
54160
|
-
children: data,
|
|
54161
|
-
value: sum2,
|
|
54162
|
-
// Total value of all children
|
|
54163
|
-
absoluteValue: absoluteSum,
|
|
54164
|
-
nodeLabel: "",
|
|
54165
|
-
UID: ""
|
|
54228
|
+
const rootNode = {
|
|
54229
|
+
...data.ChartData,
|
|
54230
|
+
UID: void 0
|
|
54166
54231
|
};
|
|
54167
|
-
let tempData = getFlattenedData(
|
|
54232
|
+
let tempData = getFlattenedData(rootNode).filter(
|
|
54168
54233
|
(data2) => data2.value !== null
|
|
54169
54234
|
);
|
|
54170
54235
|
createIdIndexMap(tempData);
|
|
@@ -54213,8 +54278,7 @@
|
|
|
54213
54278
|
data2.forEach((nodeObject, i) => {
|
|
54214
54279
|
if (nodeObject.id != 0) {
|
|
54215
54280
|
let parentUID = data2[idIndexMap.get(nodeObject.parentId)].UID;
|
|
54216
|
-
parentUID ===
|
|
54217
|
-
indexMapForStyleObject.set(nodeObject.UID, i);
|
|
54281
|
+
parentUID === void 0 ? nodeObject.UID = nodeObject.nodeLabel : nodeObject.UID = parentUID + "-" + nodeObject.nodeLabel;
|
|
54218
54282
|
}
|
|
54219
54283
|
});
|
|
54220
54284
|
} catch (error) {
|
|
@@ -54223,12 +54287,15 @@
|
|
|
54223
54287
|
};
|
|
54224
54288
|
const addStyleObjectToChartData = (data2) => {
|
|
54225
54289
|
try {
|
|
54226
|
-
data2[0] = { ...data2[0], styleObject: legendEntries[0] };
|
|
54227
54290
|
legendEntries.forEach((styleObject) => {
|
|
54228
|
-
|
|
54229
|
-
|
|
54230
|
-
|
|
54231
|
-
data2[
|
|
54291
|
+
indexMapForStyleObject.set(styleObject.name, styleObject);
|
|
54292
|
+
});
|
|
54293
|
+
Object.keys(data2).forEach((key) => {
|
|
54294
|
+
const legendObject = indexMapForStyleObject.get(data2[key].UID ?? data2[key].nodeLabel);
|
|
54295
|
+
data2[key] = {
|
|
54296
|
+
...data2[key],
|
|
54297
|
+
styleObject: legendObject || legendEntries[0]
|
|
54298
|
+
};
|
|
54232
54299
|
});
|
|
54233
54300
|
return data2;
|
|
54234
54301
|
} catch (error) {
|
|
@@ -54442,7 +54509,7 @@
|
|
|
54442
54509
|
justify-content: center;
|
|
54443
54510
|
align-items: center;
|
|
54444
54511
|
text-align: center;
|
|
54445
|
-
background-color: ${d.data.styleObject.
|
|
54512
|
+
background-color: ${d.data.styleObject.color ? d.data.styleObject.color : d.data.styleObject.backgroundColor};
|
|
54446
54513
|
z-index: 99;
|
|
54447
54514
|
transform: ${transform};
|
|
54448
54515
|
transition: unset;">
|
|
@@ -55077,10 +55144,11 @@
|
|
|
55077
55144
|
const ScatterChart = ({
|
|
55078
55145
|
data,
|
|
55079
55146
|
formatOptions,
|
|
55080
|
-
chartId
|
|
55081
|
-
shapesList,
|
|
55082
|
-
colorsList
|
|
55147
|
+
chartId
|
|
55083
55148
|
}) => {
|
|
55149
|
+
const colorsList = data.ColorElements ?? [];
|
|
55150
|
+
const shapesList = data.ShapeElements ?? [];
|
|
55151
|
+
let modifiedData = [];
|
|
55084
55152
|
const svgRef = require$$0$1.useRef();
|
|
55085
55153
|
let chartFormatOptions;
|
|
55086
55154
|
let maxLegendDimensions = [0, 0];
|
|
@@ -55092,12 +55160,12 @@
|
|
|
55092
55160
|
let innerWidth2;
|
|
55093
55161
|
let chartAreaTagG;
|
|
55094
55162
|
let svg;
|
|
55095
|
-
let
|
|
55096
|
-
let
|
|
55097
|
-
let
|
|
55098
|
-
let
|
|
55099
|
-
let
|
|
55100
|
-
let
|
|
55163
|
+
let minDimension = Number.POSITIVE_INFINITY;
|
|
55164
|
+
let maxDimension = Number.NEGATIVE_INFINITY;
|
|
55165
|
+
let minMeasure = Number.POSITIVE_INFINITY;
|
|
55166
|
+
let maxMeasure = Number.NEGATIVE_INFINITY;
|
|
55167
|
+
let sizeValueMin = Number.POSITIVE_INFINITY;
|
|
55168
|
+
let sizeValueMax = Number.NEGATIVE_INFINITY;
|
|
55101
55169
|
let yLabel;
|
|
55102
55170
|
let xLabel;
|
|
55103
55171
|
let yTitle;
|
|
@@ -55113,6 +55181,7 @@
|
|
|
55113
55181
|
let customYaxisMinValue;
|
|
55114
55182
|
let xScale;
|
|
55115
55183
|
let yScale;
|
|
55184
|
+
let sizeScale;
|
|
55116
55185
|
let colorsMap = /* @__PURE__ */ new Map();
|
|
55117
55186
|
let shapesMap = /* @__PURE__ */ new Map();
|
|
55118
55187
|
require$$0$1.useEffect(() => {
|
|
@@ -55214,7 +55283,7 @@
|
|
|
55214
55283
|
innerHeight2,
|
|
55215
55284
|
xTitle,
|
|
55216
55285
|
xLabel,
|
|
55217
|
-
|
|
55286
|
+
modifiedData.length
|
|
55218
55287
|
);
|
|
55219
55288
|
};
|
|
55220
55289
|
const initCircles = () => {
|
|
@@ -55224,17 +55293,11 @@
|
|
|
55224
55293
|
};
|
|
55225
55294
|
const circles = chartAreaTagG.append("g").attr("class", "circles").attr("class", "parentGroup");
|
|
55226
55295
|
const shouldAnimate = chartFormatOptions.animation.animationEnabled;
|
|
55227
|
-
const scatterPaths = circles.append("g").selectAll(".bubbleScatter").data(
|
|
55228
|
-
"colorId",
|
|
55229
|
-
(d) => d.legendName.includes("-") ? d.legendName.split("-")[0].replace(/ /g, "-") : d.legendName.replace(/ /g, "-")
|
|
55230
|
-
).attr(
|
|
55231
|
-
"shapeId",
|
|
55232
|
-
(d) => d.legendName.includes("-") ? d.legendName.split("-")[1].replace(/ /g, "-") : d.legendName.replace(/ /g, "-")
|
|
55233
|
-
).append("path").attr("class", "path").attr("id", function(d, i) {
|
|
55296
|
+
const scatterPaths = circles.append("g").selectAll(".bubbleScatter").data(modifiedData).enter().append("g").attr("fill", (d) => d.color).attr("colorId", (d) => d.colorName.replace(/ /g, "-")).attr("shapeId", (d) => d.shapeName?.replace(/ /g, "-")).append("path").attr("class", "path").attr("id", function(d, i) {
|
|
55234
55297
|
select$2(this).attr(
|
|
55235
55298
|
"d",
|
|
55236
|
-
Symbol$1().type(getMarkershapes(d.
|
|
55237
|
-
(d.sizeValue ? d.sizeValue : 10) * 2 * convertStringToNumber(
|
|
55299
|
+
Symbol$1().type(getMarkershapes(d.shape)).size(
|
|
55300
|
+
(d.sizeValue ? sizeScale(d.sizeValue) : 10) * 2 * convertStringToNumber(
|
|
55238
55301
|
chartFormatOptions.plotArea.scatterSizeIndex
|
|
55239
55302
|
)
|
|
55240
55303
|
)
|
|
@@ -55247,24 +55310,26 @@
|
|
|
55247
55310
|
).on("mousemove", (event2, d) => {
|
|
55248
55311
|
showTooltipOnMouseMove(
|
|
55249
55312
|
[
|
|
55250
|
-
|
|
55251
|
-
|
|
55252
|
-
|
|
55253
|
-
|
|
55254
|
-
|
|
55255
|
-
|
|
55256
|
-
|
|
55257
|
-
|
|
55258
|
-
|
|
55259
|
-
|
|
55260
|
-
|
|
55261
|
-
|
|
55262
|
-
|
|
55263
|
-
|
|
55264
|
-
|
|
55265
|
-
|
|
55266
|
-
|
|
55267
|
-
|
|
55313
|
+
...[
|
|
55314
|
+
{
|
|
55315
|
+
key: chartFormatOptions.xAxisTitle.xAxisTitleText,
|
|
55316
|
+
value: getNumberWithFormatFunction(
|
|
55317
|
+
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
55318
|
+
chartFormatOptions.toolTip.toolTipNumberFormat,
|
|
55319
|
+
chartFormatOptions.toolTip.toolTipDecimalPrecision
|
|
55320
|
+
)(d.dimension)
|
|
55321
|
+
},
|
|
55322
|
+
{
|
|
55323
|
+
key: chartFormatOptions.yAxisTitle.yAxisTitleText,
|
|
55324
|
+
value: getNumberWithFormatFunction(
|
|
55325
|
+
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
55326
|
+
chartFormatOptions.toolTip.toolTipNumberFormat,
|
|
55327
|
+
chartFormatOptions.toolTip.toolTipDecimalPrecision
|
|
55328
|
+
)(d.measure)
|
|
55329
|
+
},
|
|
55330
|
+
{ key: "Color", value: d.colorName }
|
|
55331
|
+
],
|
|
55332
|
+
...d.shapeName ? [{ key: "Shape", value: d.shapeName }] : []
|
|
55268
55333
|
],
|
|
55269
55334
|
chartFormatOptions
|
|
55270
55335
|
);
|
|
@@ -55280,33 +55345,41 @@
|
|
|
55280
55345
|
};
|
|
55281
55346
|
const iterateOverChartData = () => {
|
|
55282
55347
|
try {
|
|
55348
|
+
let addDataToModifiedData = function(dataPoint, legend, shape) {
|
|
55349
|
+
minMeasure = Math.min(minMeasure, dataPoint.value);
|
|
55350
|
+
maxMeasure = Math.max(maxMeasure, dataPoint.value);
|
|
55351
|
+
minDimension = Math.min(minDimension, dataPoint.dimension);
|
|
55352
|
+
maxDimension = Math.max(maxDimension, dataPoint.dimension);
|
|
55353
|
+
sizeValueMin = Math.min(sizeValueMin, dataPoint.value2 ?? 10);
|
|
55354
|
+
sizeValueMax = Math.max(sizeValueMax, dataPoint.value2 ?? 10);
|
|
55355
|
+
modifiedData.push({
|
|
55356
|
+
dimension: dataPoint.dimension,
|
|
55357
|
+
measure: dataPoint.value,
|
|
55358
|
+
sizeValue: dataPoint.value2,
|
|
55359
|
+
colorName: legend,
|
|
55360
|
+
shapeName: shape,
|
|
55361
|
+
shape: shapesMap.get(shape) || "Circle",
|
|
55362
|
+
color: colorsMap.get(legend) || "#6ba2b8ff"
|
|
55363
|
+
});
|
|
55364
|
+
};
|
|
55283
55365
|
colorsList.forEach((colorObject) => {
|
|
55284
55366
|
colorsMap.set(colorObject.name, colorObject.color);
|
|
55285
55367
|
});
|
|
55286
55368
|
shapesList.forEach((shapeObject) => {
|
|
55287
55369
|
shapesMap.set(shapeObject.name, shapeObject.markerShape);
|
|
55288
55370
|
});
|
|
55289
|
-
data.forEach((d) => {
|
|
55290
|
-
|
|
55291
|
-
|
|
55292
|
-
|
|
55293
|
-
|
|
55294
|
-
|
|
55295
|
-
|
|
55296
|
-
minMeasure = d.measure;
|
|
55297
|
-
}
|
|
55298
|
-
if (d.measure > maxMeasure || maxMeasure === void 0) {
|
|
55299
|
-
maxMeasure = d.measure;
|
|
55300
|
-
}
|
|
55371
|
+
data.ChartData.forEach((d) => {
|
|
55372
|
+
if (d.children && d.children.length > 0) {
|
|
55373
|
+
d.children.forEach((child) => {
|
|
55374
|
+
child.data.forEach((dataPoint) => {
|
|
55375
|
+
addDataToModifiedData(dataPoint, d.legend, child.legend);
|
|
55376
|
+
});
|
|
55377
|
+
});
|
|
55301
55378
|
}
|
|
55302
|
-
if (d.
|
|
55303
|
-
|
|
55304
|
-
|
|
55305
|
-
|
|
55306
|
-
}
|
|
55307
|
-
if (d.dimension > maxDimension || maxDimension === void 0) {
|
|
55308
|
-
maxDimension = d.dimension;
|
|
55309
|
-
}
|
|
55379
|
+
if (d.data && d.data.length > 0) {
|
|
55380
|
+
d.data.forEach((dataPoint) => {
|
|
55381
|
+
addDataToModifiedData(dataPoint, d.legend);
|
|
55382
|
+
});
|
|
55310
55383
|
}
|
|
55311
55384
|
});
|
|
55312
55385
|
} catch (e) {
|
|
@@ -55321,6 +55394,7 @@
|
|
|
55321
55394
|
let yEndValue = chartFormatOptions.yAxisLabel.yAxisIntervalsVisibility && chartFormatOptions.yAxisLabel.yAxisMaxText !== "" ? parseFloat(chartFormatOptions.yAxisLabel.yAxisMaxText) : maxMeasure * 1.1;
|
|
55322
55395
|
xScale = linear$1().domain([xStartValue, xEndValue]).range([0, innerWidth2]);
|
|
55323
55396
|
yScale = linear$1().domain([yStartValue, yEndValue]).range([innerHeight2, 0]);
|
|
55397
|
+
sizeScale = linear$1().domain([sizeValueMin, sizeValueMax]).range([1, 10]);
|
|
55324
55398
|
} catch (e) {
|
|
55325
55399
|
logError$2(fileName, "initScale", e);
|
|
55326
55400
|
}
|
|
@@ -55398,10 +55472,10 @@
|
|
|
55398
55472
|
let xCordinate;
|
|
55399
55473
|
switch (chartFormatOptions.plotArea.xCoordinate) {
|
|
55400
55474
|
case referenceLineTypes.Mean:
|
|
55401
|
-
xCordinate = mean(
|
|
55475
|
+
xCordinate = mean(modifiedData, (d) => d.dimension);
|
|
55402
55476
|
break;
|
|
55403
55477
|
case referenceLineTypes.Median:
|
|
55404
|
-
xCordinate = median(
|
|
55478
|
+
xCordinate = median(modifiedData, (d) => d.dimension);
|
|
55405
55479
|
break;
|
|
55406
55480
|
case referenceLineTypes.Custom:
|
|
55407
55481
|
xCordinate = convertStringToNumber(
|
|
@@ -55418,10 +55492,13 @@
|
|
|
55418
55492
|
let yCordinate;
|
|
55419
55493
|
switch (chartFormatOptions.plotArea.yCoordinate) {
|
|
55420
55494
|
case referenceLineTypes.Mean:
|
|
55421
|
-
yCordinate = mean(
|
|
55495
|
+
yCordinate = mean(modifiedData, (d) => d.value);
|
|
55422
55496
|
break;
|
|
55423
55497
|
case referenceLineTypes.Median:
|
|
55424
|
-
yCordinate = median(
|
|
55498
|
+
yCordinate = median(
|
|
55499
|
+
modifiedData,
|
|
55500
|
+
(d) => d.value
|
|
55501
|
+
);
|
|
55425
55502
|
break;
|
|
55426
55503
|
case referenceLineTypes.Custom:
|
|
55427
55504
|
yCordinate = convertStringToNumber(
|