pace-chart-lib 1.0.66 → 1.0.68
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/pace-chart-lib.es.js +164 -66
- package/dist/pace-chart-lib.umd.js +164 -66
- package/package.json +1 -1
- package/dist/Components/Charts/ChartJS/charts/CJSAreaChart.d.ts +0 -19
- package/dist/Components/Charts/ChartJS/charts/CJSBubbleChart.d.ts +0 -17
- package/dist/Components/Charts/ChartJS/charts/CJSColumnChart.d.ts +0 -19
- package/dist/Components/Charts/ChartJS/charts/CJSDonutChart.d.ts +0 -19
- package/dist/Components/Charts/ChartJS/charts/CJSHorizontalBarChart.d.ts +0 -18
- package/dist/Components/Charts/ChartJS/charts/CJSLineChart.d.ts +0 -19
- package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackAreaChart.d.ts +0 -17
- package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackColumnChart.d.ts +0 -17
- package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackHorizontalBarChart.d.ts +0 -17
- package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackLineChart.d.ts +0 -17
- package/dist/Components/Charts/ChartJS/charts/CJSPieChart.d.ts +0 -23
- package/dist/Components/Charts/ChartJS/charts/CJSPolarAreaChart.d.ts +0 -19
- package/dist/Components/Charts/ChartJS/charts/CJSRadarChart.d.ts +0 -16
- package/dist/Components/Charts/ChartJS/charts/CJSScatterChart.d.ts +0 -16
- package/dist/Components/Charts/ChartJS/charts/CJSStackAreaChart.d.ts +0 -15
- package/dist/Components/Charts/ChartJS/charts/CJSStackColumnChart.d.ts +0 -15
- package/dist/Components/Charts/ChartJS/charts/CJSStackHorizontalBarChart.d.ts +0 -15
- package/dist/Components/Charts/ChartJS/charts/CJSStackLineChart.d.ts +0 -15
- package/dist/Components/Charts/ChartJS/core/ChartJSDataTransformer.d.ts +0 -31
- package/dist/Components/Charts/ChartJS/core/ChartJSOptionsMapper.d.ts +0 -9
- package/dist/Components/Charts/ChartJS/core/ChartJSWrapper.d.ts +0 -27
- package/dist/Components/Charts/ChartJS/index.d.ts +0 -21
- package/dist/Components/Charts/ChartsWithAxis/AreaFamily/AreaChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/AreaFamily/NormalizedStackAreaChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/AreaFamily/StackAreaChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisFunctions.d.ts +0 -638
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisTypes.types.d.ts +0 -172
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnHistogramChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/CustomColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/LayeredColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/NormalizedStackColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/StackColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalHistogramChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/LayeredHorizontalBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/NormalizedStackHorizontalBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/StackHorizontalBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/LineFamily/LineChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/LineFamily/NormalizedStackLineChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/LineFamily/StackLineChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/DotPlot.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/TornadoChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/WaterfallChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisFunctions.d.ts +0 -96
- package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisTypes.types.d.ts +0 -111
- package/dist/Components/Charts/ChartsWithoutAxis/Maps/Cordinates.d.ts +0 -26
- package/dist/Components/Charts/ChartsWithoutAxis/Maps/Maps.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/BubbleChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/OrganizationChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ProgressChart.d.ts +0 -3
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/PyramidChart.d.ts +0 -3
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/RadialBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/SankeyChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ScatterChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/Speedometer.d.ts +0 -3
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/VennChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/WordCloud.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/DonutChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieFamilyCommonFunctions.d.ts +0 -10
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieofPieChart.d.ts +0 -3
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/TreemapChart.d.ts +0 -3
- package/dist/Components/Charts/Core/Common.types.d.ts +0 -410
- package/dist/Components/Charts/Core/CommonFunctions.d.ts +0 -250
- package/dist/Components/Charts/Core/DefaultChartDataProperties.d.ts +0 -66
- package/dist/Components/Charts/Core/DefaultProperties.types.d.ts +0 -630
- package/dist/Services/ErrorLog.d.ts +0 -1
- package/dist/index.d.ts +0 -37
|
@@ -13593,16 +13593,42 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13593
13593
|
const duration = formatOptions.animation.animationDuration;
|
|
13594
13594
|
const ease = effectsMap[formatOptions.animation.animationEffect];
|
|
13595
13595
|
const accessors = makeAnnotations.accessors();
|
|
13596
|
-
|
|
13597
|
-
|
|
13598
|
-
const
|
|
13599
|
-
const
|
|
13600
|
-
|
|
13601
|
-
|
|
13602
|
-
|
|
13603
|
-
|
|
13604
|
-
|
|
13605
|
-
|
|
13596
|
+
const isLineChartType = chartType === chartTypes.LineChart;
|
|
13597
|
+
if (isLineChartType) {
|
|
13598
|
+
const xRange = xScale.range ? xScale.range() : [0, 1];
|
|
13599
|
+
const xRangeMin = Math.min(xRange[0], xRange[1]);
|
|
13600
|
+
const xRangeSpan = Math.max(xRange[0], xRange[1]) - xRangeMin;
|
|
13601
|
+
const invertEase = (progress, steps = 100) => {
|
|
13602
|
+
for (let i = 0; i <= steps; i++) {
|
|
13603
|
+
const t = i / steps;
|
|
13604
|
+
if ((ease ?? linear$2)(t) >= progress) return t;
|
|
13605
|
+
}
|
|
13606
|
+
return 1;
|
|
13607
|
+
};
|
|
13608
|
+
annotations.selectAll(".annotation").attr("opacity", 0).each(function(d) {
|
|
13609
|
+
const x2 = accessors.x(d.data) ?? xRangeMin;
|
|
13610
|
+
const fraction = xRangeSpan > 0 ? Math.max(0, Math.min(1, (x2 - xRangeMin) / xRangeSpan)) : 0;
|
|
13611
|
+
const delay = invertEase(fraction) * duration;
|
|
13612
|
+
select$2(this).transition().delay(delay).duration(0).attr("opacity", 1);
|
|
13613
|
+
});
|
|
13614
|
+
} else {
|
|
13615
|
+
annotations.selectAll(".annotation").attr("transform", function(d) {
|
|
13616
|
+
if (barChart) {
|
|
13617
|
+
const startX = yScaleLeft ? yScaleLeft(0) : 0;
|
|
13618
|
+
const y2 = accessors.y(d.data);
|
|
13619
|
+
return `translate(${startX}, ${y2})`;
|
|
13620
|
+
} else {
|
|
13621
|
+
const x2 = accessors.x(d.data);
|
|
13622
|
+
const scale2 = d.data?.y?.axis === axisTypes.primary ? yScaleLeft : yScaleRight ?? yScaleLeft;
|
|
13623
|
+
const startY = scale2 ? scale2(0) : 0;
|
|
13624
|
+
return `translate(${x2}, ${startY})`;
|
|
13625
|
+
}
|
|
13626
|
+
}).transition().duration(duration).ease(ease).attr("transform", function(d) {
|
|
13627
|
+
const x2 = accessors.x(d.data);
|
|
13628
|
+
const y2 = accessors.y(d.data);
|
|
13629
|
+
return `translate(${x2}, ${y2})`;
|
|
13630
|
+
});
|
|
13631
|
+
}
|
|
13606
13632
|
}
|
|
13607
13633
|
}
|
|
13608
13634
|
} catch (error) {
|
|
@@ -15560,16 +15586,41 @@ function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin
|
|
|
15560
15586
|
const duration = formatOptions.animation.animationDuration;
|
|
15561
15587
|
const ease = effectsMap[formatOptions.animation.animationEffect];
|
|
15562
15588
|
const accessors = makeAnnotations.accessors();
|
|
15563
|
-
|
|
15564
|
-
|
|
15565
|
-
const
|
|
15566
|
-
const
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15570
|
-
|
|
15571
|
-
|
|
15572
|
-
|
|
15589
|
+
const isStackLineType = chartType === chartTypes.StackLineChart || chartType === chartTypes.NormalizedStackLineChart;
|
|
15590
|
+
if (isStackLineType) {
|
|
15591
|
+
const xRange = xScale.range ? xScale.range() : [0, 1];
|
|
15592
|
+
const xRangeMin = Math.min(xRange[0], xRange[1]);
|
|
15593
|
+
const xRangeSpan = Math.max(xRange[0], xRange[1]) - xRangeMin;
|
|
15594
|
+
const invertEase = (progress, steps = 100) => {
|
|
15595
|
+
for (let i = 0; i <= steps; i++) {
|
|
15596
|
+
const t = i / steps;
|
|
15597
|
+
if ((ease ?? linear$2)(t) >= progress) return t;
|
|
15598
|
+
}
|
|
15599
|
+
return 1;
|
|
15600
|
+
};
|
|
15601
|
+
annotations.selectAll(".annotation").attr("opacity", 0).each(function(d) {
|
|
15602
|
+
const x2 = accessors.x(d.data) ?? xRangeMin;
|
|
15603
|
+
const fraction = xRangeSpan > 0 ? Math.max(0, Math.min(1, (x2 - xRangeMin) / xRangeSpan)) : 0;
|
|
15604
|
+
const delay = invertEase(fraction) * duration;
|
|
15605
|
+
select$2(this).transition().delay(delay).duration(0).attr("opacity", 1);
|
|
15606
|
+
});
|
|
15607
|
+
} else {
|
|
15608
|
+
annotations.selectAll(".annotation").attr("transform", function(d) {
|
|
15609
|
+
if (barChart) {
|
|
15610
|
+
const startX = yScaleLeft ? yScaleLeft(0) : 0;
|
|
15611
|
+
const y2 = accessors.y(d.data);
|
|
15612
|
+
return `translate(${startX}, ${y2})`;
|
|
15613
|
+
} else {
|
|
15614
|
+
const x2 = accessors.x(d.data);
|
|
15615
|
+
const startY = yScaleLeft ? yScaleLeft(0) : 0;
|
|
15616
|
+
return `translate(${x2}, ${startY})`;
|
|
15617
|
+
}
|
|
15618
|
+
}).transition().duration(duration).ease(ease).attr("transform", function(d) {
|
|
15619
|
+
const x2 = accessors.x(d.data);
|
|
15620
|
+
const y2 = accessors.y(d.data);
|
|
15621
|
+
return `translate(${x2}, ${y2})`;
|
|
15622
|
+
});
|
|
15623
|
+
}
|
|
15573
15624
|
}
|
|
15574
15625
|
}
|
|
15575
15626
|
} catch (error) {
|
|
@@ -16393,22 +16444,44 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
|
|
|
16393
16444
|
if (formatOptions.animation.animationEnabled) {
|
|
16394
16445
|
const duration = formatOptions.animation.animationDuration;
|
|
16395
16446
|
const ease = effectsMap[formatOptions.animation.animationEffect] ?? linear$2;
|
|
16396
|
-
const
|
|
16397
|
-
|
|
16398
|
-
|
|
16399
|
-
|
|
16400
|
-
|
|
16401
|
-
|
|
16402
|
-
|
|
16403
|
-
|
|
16404
|
-
|
|
16405
|
-
|
|
16406
|
-
|
|
16407
|
-
|
|
16408
|
-
|
|
16409
|
-
|
|
16410
|
-
|
|
16411
|
-
|
|
16447
|
+
const isAreaType = [
|
|
16448
|
+
chartTypes.AreaChart,
|
|
16449
|
+
chartTypes.StackAreaChart,
|
|
16450
|
+
chartTypes.NormalizedStackAreaChart,
|
|
16451
|
+
chartTypes.CombinationArea,
|
|
16452
|
+
chartTypes.CombinationStackArea
|
|
16453
|
+
].includes(type);
|
|
16454
|
+
if (isAreaType) {
|
|
16455
|
+
const stackedTypes = [
|
|
16456
|
+
chartTypes.StackAreaChart,
|
|
16457
|
+
chartTypes.NormalizedStackAreaChart,
|
|
16458
|
+
chartTypes.CombinationStackArea
|
|
16459
|
+
];
|
|
16460
|
+
mergedMarkers.each(function(d) {
|
|
16461
|
+
const requiredYScale = d.axis === axisTypes.primary ? yScale : yScaleRight;
|
|
16462
|
+
const x2 = xScale(d.dimension);
|
|
16463
|
+
const finalY = stackedTypes.includes(type) ? d[1] > 0 ? requiredYScale(d[1]) : requiredYScale(d[0]) : requiredYScale(d.value);
|
|
16464
|
+
const baseY = yScale(0);
|
|
16465
|
+
select$2(this).attr("transform", `translate(${x2},${baseY})`).transition().duration(duration).ease(ease).attr("transform", `translate(${x2},${finalY})`);
|
|
16466
|
+
});
|
|
16467
|
+
} else {
|
|
16468
|
+
const xRange = xScale.range();
|
|
16469
|
+
const xRangeMin = Math.min(xRange[0], xRange[1]);
|
|
16470
|
+
const xRangeSpan = Math.max(xRange[0], xRange[1]) - xRangeMin;
|
|
16471
|
+
const invertEase = (progress, steps = 100) => {
|
|
16472
|
+
for (let i = 0; i <= steps; i++) {
|
|
16473
|
+
const t = i / steps;
|
|
16474
|
+
if (ease(t) >= progress) return t;
|
|
16475
|
+
}
|
|
16476
|
+
return 1;
|
|
16477
|
+
};
|
|
16478
|
+
mergedMarkers.attr("opacity", 0).each(function(d) {
|
|
16479
|
+
const x2 = xScale(d.dimension) ?? xRangeMin;
|
|
16480
|
+
const fraction = xRangeSpan > 0 ? Math.max(0, Math.min(1, (x2 - xRangeMin) / xRangeSpan)) : 0;
|
|
16481
|
+
const delay = invertEase(fraction) * duration;
|
|
16482
|
+
select$2(this).transition().delay(delay).duration(0).attr("opacity", 1);
|
|
16483
|
+
});
|
|
16484
|
+
}
|
|
16412
16485
|
}
|
|
16413
16486
|
});
|
|
16414
16487
|
} catch (error) {
|
|
@@ -18042,7 +18115,6 @@ const CustomColumnChart = ({
|
|
|
18042
18115
|
let requiredData = [];
|
|
18043
18116
|
let scrollPosition = 0;
|
|
18044
18117
|
let visibleBars;
|
|
18045
|
-
let annotationTimeoutId;
|
|
18046
18118
|
let chartJSON = {
|
|
18047
18119
|
dimensionList,
|
|
18048
18120
|
chartType,
|
|
@@ -18980,7 +19052,6 @@ const CustomColumnChart = ({
|
|
|
18980
19052
|
filteredDimension,
|
|
18981
19053
|
xScale
|
|
18982
19054
|
);
|
|
18983
|
-
clearTimeout(annotationTimeoutId);
|
|
18984
19055
|
const renderAnnotationsAndTotals = () => {
|
|
18985
19056
|
commonAnnotationsForCustomChart(
|
|
18986
19057
|
filteredData,
|
|
@@ -19025,15 +19096,8 @@ const CustomColumnChart = ({
|
|
|
19025
19096
|
isReportEditable
|
|
19026
19097
|
);
|
|
19027
19098
|
};
|
|
19028
|
-
|
|
19029
|
-
|
|
19030
|
-
annotationTimeoutId = setTimeout(
|
|
19031
|
-
renderAnnotationsAndTotals,
|
|
19032
|
-
formatOptions.animation.animationDuration
|
|
19033
|
-
);
|
|
19034
|
-
} else {
|
|
19035
|
-
renderAnnotationsAndTotals();
|
|
19036
|
-
}
|
|
19099
|
+
svg.selectAll(".annotation-group").remove();
|
|
19100
|
+
renderAnnotationsAndTotals();
|
|
19037
19101
|
};
|
|
19038
19102
|
const createStackData = (requiredStackChatData) => {
|
|
19039
19103
|
let legendList = requiredStackChatData.data.map((d) => d.legend);
|
|
@@ -27358,7 +27422,7 @@ const AreaChart = ({
|
|
|
27358
27422
|
});
|
|
27359
27423
|
areaGroupsEnter.merge(areaGroups).each(function(d) {
|
|
27360
27424
|
const g = select$2(this);
|
|
27361
|
-
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2.data)).attr(
|
|
27425
|
+
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => enableTransition ? areaGeneratorStart(d2.data) : areaGenerator(d2.data)).attr(
|
|
27362
27426
|
"stroke",
|
|
27363
27427
|
(d2) => d2.properties.areaBorderColor !== commonColors.white ? d2.properties.areaBorderColor : "none"
|
|
27364
27428
|
).attr("stroke-dasharray", (d2) => {
|
|
@@ -27377,7 +27441,11 @@ const AreaChart = ({
|
|
|
27377
27441
|
).attr(
|
|
27378
27442
|
"stroke-width",
|
|
27379
27443
|
(d2) => !isLinesAndMarkersVisible ? 0 : d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
|
|
27380
|
-
).attr("fill", "none")
|
|
27444
|
+
).attr("fill", "none").each(function(d2) {
|
|
27445
|
+
if (enableTransition) {
|
|
27446
|
+
select$2(this).transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("d", areaGenerator(d2.data));
|
|
27447
|
+
}
|
|
27448
|
+
});
|
|
27381
27449
|
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();
|
|
27382
27450
|
onHoverMarkerForAreaChartFamily(
|
|
27383
27451
|
formatOptions,
|
|
@@ -27911,7 +27979,7 @@ const StackAreaChart = ({
|
|
|
27911
27979
|
});
|
|
27912
27980
|
areaGroupsEnter.merge(areaGroups).each(function(d, i) {
|
|
27913
27981
|
const g = select$2(this);
|
|
27914
|
-
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
|
|
27982
|
+
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => enableTransition ? areaGeneratorStart(d2) : areaGenerator(d2)).attr(
|
|
27915
27983
|
"stroke",
|
|
27916
27984
|
(d2) => d2.color !== commonColors.white ? seriesData[i].properties.areaBorderColor : "none"
|
|
27917
27985
|
).attr("stroke-dasharray", (d2) => {
|
|
@@ -27932,7 +28000,11 @@ const StackAreaChart = ({
|
|
|
27932
28000
|
).attr(
|
|
27933
28001
|
"stroke-width",
|
|
27934
28002
|
() => !isLinesAndMarkersVisible ? 0 : seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : "0"
|
|
27935
|
-
).attr("fill", "none").style("pointer-events", "none")
|
|
28003
|
+
).attr("fill", "none").style("pointer-events", "none").each(function(d2) {
|
|
28004
|
+
if (enableTransition) {
|
|
28005
|
+
select$2(this).transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("d", areaGenerator(d2));
|
|
28006
|
+
}
|
|
28007
|
+
});
|
|
27936
28008
|
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();
|
|
27937
28009
|
svg.selectAll(
|
|
27938
28010
|
'[hoverId="' + (seriesData[d.index].properties.alias || seriesData[d.index].properties.name || "Legend").replace(/ /g, "-") + '"]'
|
|
@@ -28459,7 +28531,7 @@ const NormalizedStackAreaChart = ({
|
|
|
28459
28531
|
).y0((d) => yScaleLeft(d[0])).y1((d) => yScaleLeft(d[1])).defined((d) => d.data.hideZero ? Boolean(d[0]) : true).curve(curveLinear$1);
|
|
28460
28532
|
const columnGeneratorStart = area().x(
|
|
28461
28533
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
28462
|
-
).y0((
|
|
28534
|
+
).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined(
|
|
28463
28535
|
(d) => d.data.hideZero ? Boolean(d.data.key) : true
|
|
28464
28536
|
).curve(getCurveType(formatOptions));
|
|
28465
28537
|
let areas = gTag.selectAll(".lineGroup").data([stackChartData]);
|
|
@@ -28480,7 +28552,7 @@ const NormalizedStackAreaChart = ({
|
|
|
28480
28552
|
});
|
|
28481
28553
|
areaGroupsEnter.merge(areaGroups).each(function(d, i) {
|
|
28482
28554
|
const g = select$2(this);
|
|
28483
|
-
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
|
|
28555
|
+
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => enableTransition ? columnGeneratorStart(d2) : columnGenerator(d2)).attr(
|
|
28484
28556
|
"stroke",
|
|
28485
28557
|
(d2) => d2.color !== commonColors.white ? seriesData[i].properties.areaBorderColor : "none"
|
|
28486
28558
|
).attr("stroke-dasharray", (d2) => {
|
|
@@ -28501,7 +28573,11 @@ const NormalizedStackAreaChart = ({
|
|
|
28501
28573
|
).attr(
|
|
28502
28574
|
"stroke-width",
|
|
28503
28575
|
() => !isLinesAndMarkersVisible ? 0 : seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : "0"
|
|
28504
|
-
).attr("fill", "none").style("pointer-events", "none")
|
|
28576
|
+
).attr("fill", "none").style("pointer-events", "none").each(function(d2) {
|
|
28577
|
+
if (enableTransition) {
|
|
28578
|
+
select$2(this).transition().duration(formatOptions.animation.animationDuration).ease(effectsMap[formatOptions.animation.animationEffect]).attr("d", columnGenerator(d2));
|
|
28579
|
+
}
|
|
28580
|
+
});
|
|
28505
28581
|
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();
|
|
28506
28582
|
svg.selectAll(
|
|
28507
28583
|
'[hoverId="' + getJQuerySelector(
|
|
@@ -28994,7 +29070,7 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
28994
29070
|
try {
|
|
28995
29071
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
28996
29072
|
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
28997
|
-
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29073
|
+
chartAreaTagG.append("g").attr("class", "parentGroup pie-label-group").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
28998
29074
|
applyAnnotationRangeFilter(
|
|
28999
29075
|
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
29000
29076
|
chartFormatOptions,
|
|
@@ -29033,7 +29109,7 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
29033
29109
|
}
|
|
29034
29110
|
return "";
|
|
29035
29111
|
});
|
|
29036
|
-
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29112
|
+
chartAreaTagG.append("g").attr("class", "parentGroup pie-label-group").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29037
29113
|
applyAnnotationRangeFilter(
|
|
29038
29114
|
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
29039
29115
|
chartFormatOptions,
|
|
@@ -29103,13 +29179,13 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
29103
29179
|
});
|
|
29104
29180
|
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);
|
|
29105
29181
|
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);
|
|
29106
|
-
chartAreaTagG.selectAll("polyline").data(
|
|
29182
|
+
chartAreaTagG.selectAll("polyline.pie-label-connector").data(
|
|
29107
29183
|
applyAnnotationRangeFilter(
|
|
29108
29184
|
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29109
29185
|
chartFormatOptions,
|
|
29110
29186
|
(d) => d.data.data[0].value
|
|
29111
29187
|
)
|
|
29112
|
-
).join("polyline").attr("transform", getPiePosition()).style(
|
|
29188
|
+
).join("polyline").attr("class", "pie-label-connector").attr("transform", getPiePosition()).style(
|
|
29113
29189
|
"stroke",
|
|
29114
29190
|
(d) => chartFormatOptions.connector.connectorColorOption == "Uniform" ? chartFormatOptions.connector.connectorUniformLineColor : d.data.properties.color
|
|
29115
29191
|
).style("fill", "none").style(
|
|
@@ -29127,7 +29203,7 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
29127
29203
|
const yC = posB[1];
|
|
29128
29204
|
return [posA, posB, [xC, yC]].map((point2) => point2.join(",")).join(" ");
|
|
29129
29205
|
});
|
|
29130
|
-
chartAreaTagG.append("g").attr("transform", getPiePosition()).selectAll("foreignObject").data(
|
|
29206
|
+
chartAreaTagG.append("g").attr("class", "pie-label-group").attr("transform", getPiePosition()).selectAll("foreignObject").data(
|
|
29131
29207
|
applyAnnotationRangeFilter(
|
|
29132
29208
|
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29133
29209
|
chartFormatOptions,
|
|
@@ -29194,6 +29270,9 @@ const PieChart = ({ data, formatOptions, chartId, isReportEditable, onDataLabelC
|
|
|
29194
29270
|
}
|
|
29195
29271
|
return htmlString;
|
|
29196
29272
|
});
|
|
29273
|
+
if (chartFormatOptions.animation.animationEnabled) {
|
|
29274
|
+
chartAreaTagG.selectAll(".pie-label-group, .pie-label-connector").attr("opacity", 0).transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", 1);
|
|
29275
|
+
}
|
|
29197
29276
|
}
|
|
29198
29277
|
} catch (error) {
|
|
29199
29278
|
logError$2(fileName$8, "drawPieDataLabels", error);
|
|
@@ -29439,7 +29518,7 @@ const DonutChart = ({
|
|
|
29439
29518
|
try {
|
|
29440
29519
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
29441
29520
|
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
29442
|
-
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29521
|
+
chartAreaTagG.append("g").attr("class", "parentGroup pie-label-group").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29443
29522
|
applyAnnotationRangeFilter(
|
|
29444
29523
|
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
29445
29524
|
chartFormatOptions,
|
|
@@ -29478,7 +29557,7 @@ const DonutChart = ({
|
|
|
29478
29557
|
}
|
|
29479
29558
|
return "";
|
|
29480
29559
|
});
|
|
29481
|
-
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29560
|
+
chartAreaTagG.append("g").attr("class", "parentGroup pie-label-group").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
29482
29561
|
applyAnnotationRangeFilter(
|
|
29483
29562
|
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "1"),
|
|
29484
29563
|
chartFormatOptions,
|
|
@@ -29554,13 +29633,13 @@ const DonutChart = ({
|
|
|
29554
29633
|
});
|
|
29555
29634
|
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);
|
|
29556
29635
|
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);
|
|
29557
|
-
chartAreaTagG.selectAll("polyline").data(
|
|
29636
|
+
chartAreaTagG.selectAll("polyline.pie-label-connector").data(
|
|
29558
29637
|
applyAnnotationRangeFilter(
|
|
29559
29638
|
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29560
29639
|
chartFormatOptions,
|
|
29561
29640
|
(d) => d.data.data[0].value
|
|
29562
29641
|
)
|
|
29563
|
-
).join("polyline").attr("transform", getPiePosition()).style(
|
|
29642
|
+
).join("polyline").attr("class", "pie-label-connector").attr("transform", getPiePosition()).style(
|
|
29564
29643
|
"stroke",
|
|
29565
29644
|
(d) => chartFormatOptions.connector.connectorColorOption == "Uniform" ? chartFormatOptions.connector.connectorUniformLineColor : d.data.properties.color
|
|
29566
29645
|
).style("fill", "none").style(
|
|
@@ -29578,7 +29657,7 @@ const DonutChart = ({
|
|
|
29578
29657
|
const yC = posB[1];
|
|
29579
29658
|
return [posA, posB, [xC, yC]].map((point2) => point2.join(",")).join(" ");
|
|
29580
29659
|
});
|
|
29581
|
-
chartAreaTagG.append("g").attr("transform", getPiePosition()).selectAll("foreignObject").data(
|
|
29660
|
+
chartAreaTagG.append("g").attr("class", "pie-label-group").attr("transform", getPiePosition()).selectAll("foreignObject").data(
|
|
29582
29661
|
applyAnnotationRangeFilter(
|
|
29583
29662
|
pieChartData.filter((d) => d.data.properties.dataLabelPosition == "2"),
|
|
29584
29663
|
chartFormatOptions,
|
|
@@ -29656,6 +29735,9 @@ const DonutChart = ({
|
|
|
29656
29735
|
return "";
|
|
29657
29736
|
}
|
|
29658
29737
|
});
|
|
29738
|
+
if (chartFormatOptions.animation.animationEnabled) {
|
|
29739
|
+
chartAreaTagG.selectAll(".pie-label-group, .pie-label-connector").attr("opacity", 0).transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", 1);
|
|
29740
|
+
}
|
|
29659
29741
|
}
|
|
29660
29742
|
} catch (error) {
|
|
29661
29743
|
logError$2(fileName$7, "drawDonutDataLabels", error);
|
|
@@ -29922,6 +30004,9 @@ const Treemap = ({ data, formatOptions, chartId }) => {
|
|
|
29922
30004
|
)(d.data.data[0].value)
|
|
29923
30005
|
);
|
|
29924
30006
|
}
|
|
30007
|
+
if (shouldAnimate) {
|
|
30008
|
+
leaf.selectAll("text").attr("opacity", 0).transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", 1);
|
|
30009
|
+
}
|
|
29925
30010
|
}
|
|
29926
30011
|
} catch (error) {
|
|
29927
30012
|
logError$2(fileName$6, "initChartRect", error);
|
|
@@ -30607,6 +30692,9 @@ const PyramidChart = ({
|
|
|
30607
30692
|
}
|
|
30608
30693
|
}).notePadding(0).annotations(finalAnnotationList);
|
|
30609
30694
|
let annotations = chartAreaTagG.append("g").attr("class", "annotation-group parentGroup").call(makeAnnotations);
|
|
30695
|
+
if (chartFormatOptions.animation.animationEnabled) {
|
|
30696
|
+
annotations.attr("opacity", 0).transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", 1);
|
|
30697
|
+
}
|
|
30610
30698
|
annotations.selectAll("rect").style("visibility", "hidden");
|
|
30611
30699
|
annotations.selectAll(".annotation-subject").remove();
|
|
30612
30700
|
annotations.selectAll(".connector").style(
|
|
@@ -30978,7 +31066,7 @@ const ProgressChart = ({
|
|
|
30978
31066
|
return () => "";
|
|
30979
31067
|
}
|
|
30980
31068
|
});
|
|
30981
|
-
chartAreaTagG.append("text").attr("transform", getTransformString()).attr("dy", "0.35em").attr("text-anchor", "middle").attr(
|
|
31069
|
+
const centerLabel = chartAreaTagG.append("text").attr("transform", getTransformString()).attr("dy", "0.35em").attr("text-anchor", "middle").attr(
|
|
30982
31070
|
"visibility",
|
|
30983
31071
|
() => {
|
|
30984
31072
|
if (!chartFormatOptions.plotArea.dataLabels) return "hidden";
|
|
@@ -31011,6 +31099,9 @@ const ProgressChart = ({
|
|
|
31011
31099
|
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
31012
31100
|
)(progressValue);
|
|
31013
31101
|
});
|
|
31102
|
+
if (chartFormatOptions.animation.animationEnabled) {
|
|
31103
|
+
centerLabel.attr("opacity", 0).transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", 1);
|
|
31104
|
+
}
|
|
31014
31105
|
} catch (error) {
|
|
31015
31106
|
logError$2(fileName$3, "drawProgressChart", error);
|
|
31016
31107
|
}
|
|
@@ -31332,6 +31423,9 @@ const Speedometer = ({
|
|
|
31332
31423
|
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
31333
31424
|
)(d)
|
|
31334
31425
|
).attr("visibility", (d) => d === "" ? "hidden" : "visible");
|
|
31426
|
+
if (chartFormatOptions.animation.animationEnabled) {
|
|
31427
|
+
lg.selectAll("text").attr("opacity", 0).transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", 1);
|
|
31428
|
+
}
|
|
31335
31429
|
}
|
|
31336
31430
|
if (chartFormatOptions.pointerValue.showPointerValue && seriesData.length === 2) {
|
|
31337
31431
|
setPointerValueText(positionTransformString);
|
|
@@ -31800,7 +31894,8 @@ const RadialBarChart = ({
|
|
|
31800
31894
|
chartFormatOptions,
|
|
31801
31895
|
(d) => d?.data?.[0]?.value ?? 0
|
|
31802
31896
|
);
|
|
31803
|
-
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)
|
|
31897
|
+
const arcLabelTexts = 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);
|
|
31898
|
+
arcLabelTexts.append("textPath").attr("xlink:href", (d, i) => `#arc-path-${d.index ?? i}-` + chartId).style("startOffset", "50%").attr("hoverId", (d) => d.legend.replaceAll(" ", "-")).text(
|
|
31804
31899
|
(d) => ` ${d.properties.alias}
|
|
31805
31900
|
${chartFormatOptions.plotArea.dataLabelValue ? getNumberWithFormatFunction(
|
|
31806
31901
|
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
@@ -31843,6 +31938,9 @@ const RadialBarChart = ({
|
|
|
31843
31938
|
}).on("mouseout", () => {
|
|
31844
31939
|
hideTooltipOnMouseOut();
|
|
31845
31940
|
});
|
|
31941
|
+
if (chartFormatOptions.animation.animationEnabled) {
|
|
31942
|
+
arcLabelTexts.attr("opacity", 0).transition().duration(chartFormatOptions.animation.animationDuration).ease(effectsMap[chartFormatOptions.animation.animationEffect]).attr("opacity", 1);
|
|
31943
|
+
}
|
|
31846
31944
|
arcs.each((d, i) => {
|
|
31847
31945
|
svg2.append("path").attr("id", `arc-path-${i}-` + chartId).attr("d", dummyArc(d, i)).attr("fill", "none").attr("stroke", "none");
|
|
31848
31946
|
});
|