pace-chart-lib 1.0.60 → 1.0.61
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 +113 -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 +100 -27
- package/dist/pace-chart-lib.umd.js +100 -27
- package/package.json +1 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "./Components/Charts/Core/ChartStyles.scss";
|
|
2
|
+
export { default as ColumnChart } from "./Components/Charts/ChartsWithAxis/ColumnFamily/ColumnChart";
|
|
3
|
+
export { default as CustomColumnChart } from "./Components/Charts/ChartsWithAxis/ColumnFamily/CustomColumnChart";
|
|
4
|
+
export { default as LayeredColumnChart } from "./Components/Charts/ChartsWithAxis/ColumnFamily/LayeredColumnChart";
|
|
5
|
+
export { default as StackColumnChart } from "./Components/Charts/ChartsWithAxis/ColumnFamily/StackColumnChart";
|
|
6
|
+
export { default as NormalizedStackColumnChart } from "./Components/Charts/ChartsWithAxis/ColumnFamily/NormalizedStackColumnChart";
|
|
7
|
+
export { default as ColumnHistogramChart } from "./Components/Charts/ChartsWithAxis/ColumnFamily/ColumnHistogramChart";
|
|
8
|
+
export { default as LineChart } from "./Components/Charts/ChartsWithAxis/LineFamily/LineChart";
|
|
9
|
+
export { default as StackLineChart } from "./Components/Charts/ChartsWithAxis/LineFamily/StackLineChart";
|
|
10
|
+
export { default as NormalizedStackLineChart } from "./Components/Charts/ChartsWithAxis/LineFamily/NormalizedStackLineChart";
|
|
11
|
+
export { default as HorizontalBarChart } from "./Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalBarChart";
|
|
12
|
+
export { default as StackHorizontalBarChart } from "./Components/Charts/ChartsWithAxis/HorizontalBarFamily/StackHorizontalBarChart";
|
|
13
|
+
export { default as NormalizedStackHorizontalBarChart } from "./Components/Charts/ChartsWithAxis/HorizontalBarFamily/NormalizedStackHorizontalBarChart";
|
|
14
|
+
export { default as LayeredHorizontalBarChart } from "./Components/Charts/ChartsWithAxis/HorizontalBarFamily/LayeredHorizontalBarChart";
|
|
15
|
+
export { default as HorizontalHistogramChart } from "./Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalHistogramChart";
|
|
16
|
+
export { default as AreaChart } from "./Components/Charts/ChartsWithAxis/AreaFamily/AreaChart";
|
|
17
|
+
export { default as StackAreaChart } from "./Components/Charts/ChartsWithAxis/AreaFamily/StackAreaChart";
|
|
18
|
+
export { default as NormalizedStackAreaChart } from "./Components/Charts/ChartsWithAxis/AreaFamily/NormalizedStackAreaChart";
|
|
19
|
+
export { default as PieChart } from "./Components/Charts/ChartsWithoutAxis/PieFamily/PieChart";
|
|
20
|
+
export { default as DonutChart } from "./Components/Charts/ChartsWithoutAxis/PieFamily/DonutChart";
|
|
21
|
+
export { default as Treemap } from "./Components/Charts/ChartsWithoutAxis/PieFamily/TreemapChart";
|
|
22
|
+
export { default as PieofPie } from "./Components/Charts/ChartsWithoutAxis/PieFamily/PieofPieChart";
|
|
23
|
+
export { default as PyramidChart } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/PyramidChart";
|
|
24
|
+
export { default as ProgressChart } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/ProgressChart";
|
|
25
|
+
export { default as Speedometer } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/Speedometer";
|
|
26
|
+
export { default as RadialBarChart } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/RadialBarChart";
|
|
27
|
+
export { default as WordCloud } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/WordCloud";
|
|
28
|
+
export { default as VennChart } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/VennChart";
|
|
29
|
+
export { default as SankeyChart } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/SankeyChart";
|
|
30
|
+
export { default as Maps } from "./Components/Charts/ChartsWithoutAxis/Maps/Maps";
|
|
31
|
+
export { default as OrganizationChart } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/OrganizationChart";
|
|
32
|
+
export { default as BubbleChart } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/BubbleChart";
|
|
33
|
+
export { default as ScatterChart } from "./Components/Charts/ChartsWithoutAxis/OtherCharts/ScatterChart";
|
|
34
|
+
export { default as WaterfallChart } from "./Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/WaterfallChart";
|
|
35
|
+
export { default as TornadoChart } from "./Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/TornadoChart";
|
|
36
|
+
export { default as DotPlot } from "./Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/DotPlot";
|
|
37
|
+
export { CJSColumnChart, CJSStackColumnChart, CJSHorizontalBarChart, CJSStackHorizontalBarChart, CJSLineChart, CJSStackLineChart, CJSAreaChart, CJSStackAreaChart, CJSPieChart, CJSDonutChart, CJSScatterChart, CJSBubbleChart, CJSRadarChart, CJSPolarAreaChart, CJSNormalizedStackColumnChart, CJSNormalizedStackHorizontalBarChart, CJSNormalizedStackLineChart, CJSNormalizedStackAreaChart, ChartJSWrapper, transformToChartJSData, transformToNormalizedChartJSData, mapFormatOptionsToChartJS, hexToRgba, CJS_DEFAULT_COLORS, } from "./Components/Charts/ChartJS/index";
|
|
@@ -11261,7 +11261,13 @@ const defaultChartFormatOptions = {
|
|
|
11261
11261
|
dataLabelsCoordinates: [],
|
|
11262
11262
|
hideInsignificantValue: false,
|
|
11263
11263
|
sortBy: "default",
|
|
11264
|
-
chartDirection: "top"
|
|
11264
|
+
chartDirection: "top",
|
|
11265
|
+
plotAreaRangeFilter: {
|
|
11266
|
+
enabled: false,
|
|
11267
|
+
condition: "lt",
|
|
11268
|
+
minVal: 0,
|
|
11269
|
+
maxVal: 100
|
|
11270
|
+
}
|
|
11265
11271
|
},
|
|
11266
11272
|
heatMap: {
|
|
11267
11273
|
showHeatMap: false,
|
|
@@ -13147,9 +13153,9 @@ function applyAnnotationRangeFilter(annotationsList, formatOptions, getMeasure)
|
|
|
13147
13153
|
const measure = getMeasure(item);
|
|
13148
13154
|
switch (condition) {
|
|
13149
13155
|
case "lt":
|
|
13150
|
-
return measure
|
|
13156
|
+
return measure <= maxVal;
|
|
13151
13157
|
case "gt":
|
|
13152
|
-
return measure
|
|
13158
|
+
return measure >= minVal;
|
|
13153
13159
|
case "in":
|
|
13154
13160
|
return measure >= minVal && measure <= maxVal;
|
|
13155
13161
|
case "not-in":
|
|
@@ -20935,6 +20941,25 @@ const NormalizedStackColumnChart = ({
|
|
|
20935
20941
|
) });
|
|
20936
20942
|
};
|
|
20937
20943
|
const fileName$a = "ChartsWithoutAxisFunctions.ts";
|
|
20944
|
+
function applyPlotAreaRangeFilter(labelsList, formatOptions, getMeasure) {
|
|
20945
|
+
if (!formatOptions?.plotArea?.plotAreaRangeFilter?.enabled) return labelsList;
|
|
20946
|
+
const { condition, minVal, maxVal } = formatOptions.plotArea.plotAreaRangeFilter;
|
|
20947
|
+
return labelsList.filter((item) => {
|
|
20948
|
+
const measure = getMeasure(item);
|
|
20949
|
+
switch (condition) {
|
|
20950
|
+
case "lt":
|
|
20951
|
+
return measure <= maxVal;
|
|
20952
|
+
case "gt":
|
|
20953
|
+
return measure >= minVal;
|
|
20954
|
+
case "in":
|
|
20955
|
+
return measure >= minVal && measure <= maxVal;
|
|
20956
|
+
case "not-in":
|
|
20957
|
+
return measure < minVal || measure > maxVal;
|
|
20958
|
+
default:
|
|
20959
|
+
return true;
|
|
20960
|
+
}
|
|
20961
|
+
});
|
|
20962
|
+
}
|
|
20938
20963
|
function marginCalculationForBubbleScatter(width, height, maxMeasure, formatOptions, maxDimension, maxLegendDimensions) {
|
|
20939
20964
|
try {
|
|
20940
20965
|
formatOptions.xAxisLabel.xAxisDateFormat = formatOptions.xAxisLabel.xAxisDateFormat == "DD-MM-YYYY" ? "," : formatOptions.xAxisLabel.xAxisDateFormat;
|
|
@@ -28905,8 +28930,10 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
28905
28930
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
28906
28931
|
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
28907
28932
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
28908
|
-
|
|
28909
|
-
(d) => d.data.properties.dataLabelPosition == "1"
|
|
28933
|
+
applyAnnotationRangeFilter(
|
|
28934
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
28935
|
+
chartFormatOptions,
|
|
28936
|
+
(d) => d.data.data[0].value
|
|
28910
28937
|
)
|
|
28911
28938
|
).enter().append("text").attr(
|
|
28912
28939
|
"hoverId",
|
|
@@ -28942,8 +28969,10 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
28942
28969
|
return "";
|
|
28943
28970
|
});
|
|
28944
28971
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
28945
|
-
|
|
28946
|
-
(d) => d.data.properties.dataLabelPosition == "1"
|
|
28972
|
+
applyAnnotationRangeFilter(
|
|
28973
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
28974
|
+
chartFormatOptions,
|
|
28975
|
+
(d) => d.data.data[0].value
|
|
28947
28976
|
)
|
|
28948
28977
|
).enter().append("text").attr(
|
|
28949
28978
|
"hoverId",
|
|
@@ -29010,8 +29039,10 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
29010
29039
|
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);
|
|
29011
29040
|
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);
|
|
29012
29041
|
chartAreaTagG.selectAll("polyline").data(
|
|
29013
|
-
|
|
29014
|
-
(d) => d.data.properties.dataLabelPosition == "2"
|
|
29042
|
+
applyAnnotationRangeFilter(
|
|
29043
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29044
|
+
chartFormatOptions,
|
|
29045
|
+
(d) => d.data.data[0].value
|
|
29015
29046
|
)
|
|
29016
29047
|
).join("polyline").attr("transform", getPiePosition()).style(
|
|
29017
29048
|
"stroke",
|
|
@@ -29032,8 +29063,10 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
29032
29063
|
return [posA, posB, [xC, yC]].map((point2) => point2.join(",")).join(" ");
|
|
29033
29064
|
});
|
|
29034
29065
|
chartAreaTagG.append("g").attr("transform", getPiePosition()).selectAll("foreignObject").data(
|
|
29035
|
-
|
|
29036
|
-
(d) => d.data.properties.dataLabelPosition == "2"
|
|
29066
|
+
applyAnnotationRangeFilter(
|
|
29067
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29068
|
+
chartFormatOptions,
|
|
29069
|
+
(d) => d.data.data[0].value
|
|
29037
29070
|
)
|
|
29038
29071
|
).join("foreignObject").attr("width", 80).attr("height", 60).attr("x", (d) => {
|
|
29039
29072
|
let midangle = d.x0 + (d.x1 - d.x0) / 2;
|
|
@@ -29340,8 +29373,10 @@ const DonutChart = ({
|
|
|
29340
29373
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
29341
29374
|
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
29342
29375
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29343
|
-
|
|
29344
|
-
(d) => d.data.properties.dataLabelPosition == "1"
|
|
29376
|
+
applyAnnotationRangeFilter(
|
|
29377
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
29378
|
+
chartFormatOptions,
|
|
29379
|
+
(d) => d.data.data[0].value
|
|
29345
29380
|
)
|
|
29346
29381
|
).enter().append("text").attr(
|
|
29347
29382
|
"hoverId",
|
|
@@ -29377,8 +29412,10 @@ const DonutChart = ({
|
|
|
29377
29412
|
return "";
|
|
29378
29413
|
});
|
|
29379
29414
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29380
|
-
|
|
29381
|
-
(d) => d.data.properties.dataLabelPosition == "1"
|
|
29415
|
+
applyAnnotationRangeFilter(
|
|
29416
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
29417
|
+
chartFormatOptions,
|
|
29418
|
+
(d) => d.data.data[0].value
|
|
29382
29419
|
)
|
|
29383
29420
|
).enter().append("text").attr(
|
|
29384
29421
|
"hoverId",
|
|
@@ -29451,8 +29488,10 @@ const DonutChart = ({
|
|
|
29451
29488
|
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);
|
|
29452
29489
|
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);
|
|
29453
29490
|
chartAreaTagG.selectAll("polyline").data(
|
|
29454
|
-
|
|
29455
|
-
(d) => d.data.properties.dataLabelPosition == "2"
|
|
29491
|
+
applyAnnotationRangeFilter(
|
|
29492
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29493
|
+
chartFormatOptions,
|
|
29494
|
+
(d) => d.data.data[0].value
|
|
29456
29495
|
)
|
|
29457
29496
|
).join("polyline").attr("transform", getPiePosition()).style(
|
|
29458
29497
|
"stroke",
|
|
@@ -29473,8 +29512,10 @@ const DonutChart = ({
|
|
|
29473
29512
|
return [posA, posB, [xC, yC]].map((point2) => point2.join(",")).join(" ");
|
|
29474
29513
|
});
|
|
29475
29514
|
chartAreaTagG.append("g").attr("transform", getPiePosition()).selectAll("foreignObject").data(
|
|
29476
|
-
|
|
29477
|
-
(d) => d.data.properties.dataLabelPosition == "2"
|
|
29515
|
+
applyAnnotationRangeFilter(
|
|
29516
|
+
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29517
|
+
chartFormatOptions,
|
|
29518
|
+
(d) => d.data.data[0].value
|
|
29478
29519
|
)
|
|
29479
29520
|
).join("foreignObject").attr("width", 80).attr("height", 60).attr("x", (d) => {
|
|
29480
29521
|
let midangle = d.x0 + (d.x1 - d.x0) / 2;
|
|
@@ -29773,7 +29814,23 @@ const Treemap = ({ data, formatOptions, chartId }) => {
|
|
|
29773
29814
|
}
|
|
29774
29815
|
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);
|
|
29775
29816
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
29776
|
-
|
|
29817
|
+
const rf = chartFormatOptions.annotation.annotationRangeFilter;
|
|
29818
|
+
leaf.filter((d) => {
|
|
29819
|
+
if (!rf?.enabled) return true;
|
|
29820
|
+
const val = d.data.data[0].value;
|
|
29821
|
+
switch (rf.condition) {
|
|
29822
|
+
case "lt":
|
|
29823
|
+
return val < rf.maxVal;
|
|
29824
|
+
case "gt":
|
|
29825
|
+
return val > rf.minVal;
|
|
29826
|
+
case "in":
|
|
29827
|
+
return val >= rf.minVal && val <= rf.maxVal;
|
|
29828
|
+
case "not-in":
|
|
29829
|
+
return val < rf.minVal || val > rf.maxVal;
|
|
29830
|
+
default:
|
|
29831
|
+
return true;
|
|
29832
|
+
}
|
|
29833
|
+
}).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(
|
|
29777
29834
|
"font-style",
|
|
29778
29835
|
(d) => d.data.properties.fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
29779
29836
|
).style(
|
|
@@ -30082,7 +30139,7 @@ const PieofPie = ({
|
|
|
30082
30139
|
const drawParentPieDataLabels = () => {
|
|
30083
30140
|
try {
|
|
30084
30141
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
30085
|
-
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(
|
|
30142
|
+
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(
|
|
30086
30143
|
"fill",
|
|
30087
30144
|
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
30088
30145
|
).attr(
|
|
@@ -30106,7 +30163,7 @@ const PieofPie = ({
|
|
|
30106
30163
|
}
|
|
30107
30164
|
return "";
|
|
30108
30165
|
});
|
|
30109
|
-
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(
|
|
30166
|
+
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(
|
|
30110
30167
|
"fill",
|
|
30111
30168
|
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
30112
30169
|
).attr(
|
|
@@ -30152,7 +30209,7 @@ const PieofPie = ({
|
|
|
30152
30209
|
const drawChildPieDataLabels = (childData) => {
|
|
30153
30210
|
try {
|
|
30154
30211
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
30155
|
-
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(
|
|
30212
|
+
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(
|
|
30156
30213
|
"fill",
|
|
30157
30214
|
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
30158
30215
|
).attr(
|
|
@@ -30176,7 +30233,7 @@ const PieofPie = ({
|
|
|
30176
30233
|
}
|
|
30177
30234
|
return "";
|
|
30178
30235
|
});
|
|
30179
|
-
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(
|
|
30236
|
+
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(
|
|
30180
30237
|
"fill",
|
|
30181
30238
|
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
30182
30239
|
).attr(
|
|
@@ -30425,7 +30482,11 @@ const PyramidChart = ({
|
|
|
30425
30482
|
if (chartFormatOptions.annotation.annotationVisibility) {
|
|
30426
30483
|
let makeAnnotations = annotation();
|
|
30427
30484
|
let ConnectorType = chartFormatOptions.annotation.connectorType ? chartFormatOptions.annotation.connectorType.toLowerCase() : "None";
|
|
30428
|
-
let finalAnnotationList =
|
|
30485
|
+
let finalAnnotationList = applyAnnotationRangeFilter(
|
|
30486
|
+
annotationsList,
|
|
30487
|
+
chartFormatOptions,
|
|
30488
|
+
(item) => item.data.measure
|
|
30489
|
+
);
|
|
30429
30490
|
const connectorStyleKey = chartFormatOptions.annotation.connectorStyle?.toLowerCase();
|
|
30430
30491
|
makeAnnotations.editMode(chartFormatOptions.annotation.annotationDraggable).accessors({
|
|
30431
30492
|
x: function() {
|
|
@@ -30847,7 +30908,15 @@ const ProgressChart = ({
|
|
|
30847
30908
|
});
|
|
30848
30909
|
chartAreaTagG.append("text").attr("transform", getTransformString()).attr("dy", "0.35em").attr("text-anchor", "middle").attr(
|
|
30849
30910
|
"visibility",
|
|
30850
|
-
|
|
30911
|
+
() => {
|
|
30912
|
+
if (!chartFormatOptions.plotArea.dataLabels) return "hidden";
|
|
30913
|
+
const passed = applyPlotAreaRangeFilter(
|
|
30914
|
+
[{ value: progressValue }],
|
|
30915
|
+
chartFormatOptions,
|
|
30916
|
+
(d) => d?.value ?? 0
|
|
30917
|
+
);
|
|
30918
|
+
return passed.length > 0 ? "visible" : "hidden";
|
|
30919
|
+
}
|
|
30851
30920
|
).attr(
|
|
30852
30921
|
"fill",
|
|
30853
30922
|
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : chartFormatOptions.toolTip.toolTipDisplayUnits
|
|
@@ -31651,7 +31720,11 @@ const RadialBarChart = ({
|
|
|
31651
31720
|
arcs.attr("d", (d, i) => animArc({ ...d, endAngle: scale2(Math.abs(d.data[0].value)) }, i));
|
|
31652
31721
|
}
|
|
31653
31722
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
31654
|
-
const labelsData =
|
|
31723
|
+
const labelsData = applyPlotAreaRangeFilter(
|
|
31724
|
+
getModifiedDataForLabels(ChartData),
|
|
31725
|
+
chartFormatOptions,
|
|
31726
|
+
(d) => d?.data?.[0]?.value ?? 0
|
|
31727
|
+
);
|
|
31655
31728
|
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(
|
|
31656
31729
|
(d) => ` ${d.properties.alias}
|
|
31657
31730
|
${chartFormatOptions.plotArea.dataLabelValue ? getNumberWithFormatFunction(
|
|
@@ -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(
|