pace-chart-lib 1.0.8 → 1.0.9
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.
|
@@ -23,7 +23,7 @@ export declare function getRandomColor(): {
|
|
|
23
23
|
*
|
|
24
24
|
* @return {void} - This function does not return anything. It updates the SVG by rendering legends.
|
|
25
25
|
*/
|
|
26
|
-
export declare function drawLegends(height: number, svg: any, maxLegendDimensions: number[], chartTitleHeight: number, width: number, legendMargin: number, formatOptions: TDefaultChartFormatOptionsType,
|
|
26
|
+
export declare function drawLegends(height: number, svg: any, maxLegendDimensions: number[], chartTitleHeight: number, width: number, legendMargin: number, formatOptions: TDefaultChartFormatOptionsType, inputSeries: TSeries[], chartId: string, legendShape: string): void;
|
|
27
27
|
/**
|
|
28
28
|
* @param {string[]} list - Array of legend strings.
|
|
29
29
|
* @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options including legend font size and family.
|
|
@@ -236,3 +236,4 @@ export declare const convertStringToNumber: (value: any) => any;
|
|
|
236
236
|
export declare function generalizedChartData(chartData: any, dimensionList?: any): any;
|
|
237
237
|
export declare const getJQuerySelector: (strSeletor?: string) => string;
|
|
238
238
|
export declare const connectorNumberFormat: (numerator: any, denominator: any, decimalValues: any, numberFormat: any, x: any, y: any, formatOptions: TDefaultChartFormatOptionsType) => any;
|
|
239
|
+
export declare const getHoverId: (inputText: string) => string;
|
|
@@ -564,6 +564,7 @@ export declare const defaultChartFormatOptions: {
|
|
|
564
564
|
dataTableNumberFormat: string;
|
|
565
565
|
dataTableDecimalPrecision: string;
|
|
566
566
|
dataTableDisplayUnits: string;
|
|
567
|
+
dataTableLabelColor: string;
|
|
567
568
|
};
|
|
568
569
|
dataTableOuterBorder: {
|
|
569
570
|
borderButtonVisibility: boolean;
|
|
@@ -11404,7 +11404,8 @@ const defaultChartFormatOptions = {
|
|
|
11404
11404
|
dataTableFontStyle: [],
|
|
11405
11405
|
dataTableNumberFormat: ",",
|
|
11406
11406
|
dataTableDecimalPrecision: "2",
|
|
11407
|
-
dataTableDisplayUnits: "None"
|
|
11407
|
+
dataTableDisplayUnits: "None",
|
|
11408
|
+
dataTableLabelColor: "#000000"
|
|
11408
11409
|
},
|
|
11409
11410
|
dataTableOuterBorder: {
|
|
11410
11411
|
borderButtonVisibility: true,
|
|
@@ -11730,8 +11731,8 @@ function calculateVerticalMargins(windowWidth, windowHeight, maxNumberForPrimary
|
|
|
11730
11731
|
xAxisObject,
|
|
11731
11732
|
isBarChart
|
|
11732
11733
|
);
|
|
11733
|
-
const legendPosition = formatOptions.legends.legendPosition;
|
|
11734
11734
|
const legendVisibility = formatOptions.legends.legendVisibility;
|
|
11735
|
+
const legendPosition = legendVisibility ? formatOptions.legends.legendPosition : staticLegendPosition.none;
|
|
11735
11736
|
const scrollHeightConstant = isScrollbarVisible ? 12 : 0;
|
|
11736
11737
|
const xAxisRelatedMargin = isBarChart ? metrics.yTitle + metrics.yLabel : metrics.xTitle + metrics.xLabel;
|
|
11737
11738
|
let top2 = 0;
|
|
@@ -13044,7 +13045,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13044
13045
|
let axis2 = d.x.axis;
|
|
13045
13046
|
return dataLabelsPositionForBarChartFamily(formatOptions, d.x.measure ? d.x.measure : 0, d.position, requiredXScale, minValue, void 0, chartType, isSensitivityChart, axis2);
|
|
13046
13047
|
} else if (chartType === actualChartTypes.column) {
|
|
13047
|
-
return xScale(d.x) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2;
|
|
13048
|
+
return xScaleForLegends(d.currentLegend) ? xScale(d.x) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 : xScale(d.x);
|
|
13048
13049
|
} else {
|
|
13049
13050
|
return xScale(d.x);
|
|
13050
13051
|
}
|
|
@@ -13062,7 +13063,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13062
13063
|
} else {
|
|
13063
13064
|
if (barChart) {
|
|
13064
13065
|
let actualColWidth = chartType === actualChartTypes.tornadoChart || chartType === actualChartTypes.layeredBarChart ? xScaleForLegends.bandwidth() : -columnWidth;
|
|
13065
|
-
return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) : 0) + xScale(d.y)
|
|
13066
|
+
return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) + xScaleForLegends.bandwidth() / 2 : 0) + xScale(d.y) - 5;
|
|
13066
13067
|
} else
|
|
13067
13068
|
return dataLabelsPosition(
|
|
13068
13069
|
d.y.measure,
|
|
@@ -13612,7 +13613,7 @@ function addDataTable(isFitChart, svg, currentTag, dataTable, colWidth, yAxis, x
|
|
|
13612
13613
|
parentTag.append("foreignObject").attr("x", (d) => 0).attr("y", tableStartY + yCordinate).attr("width", (d, index2) => index2 === 0 ? cellWidth + outerPadding + calWidthForSeriesNames / 2 : index2 === dimensionCount - 1 ? cellWidth + outerPadding - calWidthForSeriesNames / 2 : cellWidth).attr("height", cellHeight).style("justify-content", "center").append("xhtml:div").attr("class", "middlepart").style("width", (d, index2) => index2 === 0 ? cellWidth + outerPadding + calWidthForSeriesNames / 2 : index2 === dimensionCount - 1 ? cellWidth + outerPadding - calWidthForSeriesNames / 2 : cellWidth).style("height", `${cellHeight}px`).style("line-height", `${cellHeight}px`).style("border-width", (d, pos) => getBorderStyle(formatOptions, i, pos, dimensionCount, legendsCount, "width")).style("border-style", (d, pos) => getBorderStyle(formatOptions, i, pos, dimensionCount, legendsCount, "style")).style("border-color", (d, pos) => getBorderStyle(formatOptions, i, pos, dimensionCount, legendsCount, "color")).style("text-align", "center").style("white-space", "nowrap").style("text-overflow", "ellipsis").style("overflow", "hidden").style("padding-inline", "3px").style("font-size", formatOptions.dataTableProperties.dataTableFontSize + "px").style("font-family", formatOptions.dataTableProperties.dataTableFontFamily).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
13613
13614
|
"text-decoration",
|
|
13614
13615
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
13615
|
-
).style("color",
|
|
13616
|
+
).style("color", formatOptions.dataTableProperties.dataTableLabelColor).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr("title", (d) => getNumberWithFormat(
|
|
13616
13617
|
chartType.includes("100stack") ? d.TooltipMeasure / d.TotalMeasure : d.TooltipMeasure || d.value,
|
|
13617
13618
|
formatOptions.dataTableProperties.dataTableDisplayUnits,
|
|
13618
13619
|
formatOptions.dataTableProperties.dataTableNumberFormat,
|
|
@@ -14461,16 +14462,18 @@ function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin
|
|
|
14461
14462
|
y: d.data.dimension,
|
|
14462
14463
|
x: d[1] > 0 ? d[1] : d[0],
|
|
14463
14464
|
prevValue: d[0] >= 0 ? d[0] : d[1],
|
|
14464
|
-
position: d.data.labelPosition,
|
|
14465
|
+
position: formatOptions.annotation.annotationPosition == "4" ? d.data.labelPosition : JSON.parse(formatOptions.annotation.annotationPosition),
|
|
14465
14466
|
currentLegend: d.key.includes("~$~") ? d.key.split("~$~")[1] : d.key,
|
|
14466
|
-
isVisible: true
|
|
14467
|
+
isVisible: true,
|
|
14468
|
+
hoverId: d.properties.alias ? getHoverId(d.properties.alias) : getHoverId(d.key)
|
|
14467
14469
|
} : {
|
|
14468
14470
|
x: d.data.dimension,
|
|
14469
14471
|
y: d[1] > 0 ? d[1] : d[0],
|
|
14470
14472
|
prevValue: d[0] >= 0 ? d[0] : d[1],
|
|
14471
|
-
position: d.data.labelPosition,
|
|
14473
|
+
position: formatOptions.annotation.annotationPosition == "4" ? d.data.labelPosition : JSON.parse(formatOptions.annotation.annotationPosition),
|
|
14472
14474
|
currentLegend: d.key.includes("~$~") ? d.key.split("~$~")[1] : d.key,
|
|
14473
|
-
isVisible: true
|
|
14475
|
+
isVisible: true,
|
|
14476
|
+
hoverId: d.properties.alias ? getHoverId(d.properties.alias) : getHoverId(d.key)
|
|
14474
14477
|
},
|
|
14475
14478
|
dx: 0,
|
|
14476
14479
|
dy: 0,
|
|
@@ -14592,7 +14595,7 @@ const appendAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotation
|
|
|
14592
14595
|
}
|
|
14593
14596
|
});
|
|
14594
14597
|
annotations.selectAll("text").append("text").style("fill", formatOptions.annotation.annotationColor !== "#ffffff" ? formatOptions.annotation.annotationColor : "none");
|
|
14595
|
-
annotations.selectAll("tspan").attr("hoverId", (d) => d.data.currentLegend.replaceAll(" ", "-")).style("visibility", (d) => parseFloat(d.data.y) == 0 && formatOptions.annotation.annotationHideZeroValues ? "hidden" : "visible");
|
|
14598
|
+
annotations.selectAll("tspan").attr("hoverId", (d) => d.data.hoverId ? d.data.hoverId : d.data.currentLegend.replaceAll(" ", "-")).style("visibility", (d) => parseFloat(d.data.y) == 0 && formatOptions.annotation.annotationHideZeroValues ? "hidden" : "visible");
|
|
14596
14599
|
return annotations;
|
|
14597
14600
|
};
|
|
14598
14601
|
const initXaxisBar = (formatOptions, gTag, yLabel, innerHeight2, innerWidth2, xAxisBottom) => {
|
|
@@ -14613,7 +14616,10 @@ const initXaxisBar = (formatOptions, gTag, yLabel, innerHeight2, innerWidth2, xA
|
|
|
14613
14616
|
"visibility",
|
|
14614
14617
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
|
|
14615
14618
|
);
|
|
14616
|
-
xAxisG.select(".domain").
|
|
14619
|
+
xAxisG.select(".domain").attr(
|
|
14620
|
+
"visibility",
|
|
14621
|
+
formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
|
|
14622
|
+
).style("shape-rendering", "crispEdges").style(
|
|
14617
14623
|
"stroke",
|
|
14618
14624
|
formatOptions.yAxisLabel.yAxisColorInverted
|
|
14619
14625
|
).attr("stroke-width", formatOptions.yAxisLabel.yAxisWidth ? formatOptions.yAxisLabel.yAxisWidth : formatOptions.plotArea.plotAreaBorderThickness);
|
|
@@ -14625,7 +14631,7 @@ const initYaxisBar = (formatOptions, gTag, xLabel, innerHeight2, innerWidth2, yA
|
|
|
14625
14631
|
try {
|
|
14626
14632
|
let fontStyle = formatOptions.xAxisLabel.xAxisLabelFontStyle;
|
|
14627
14633
|
let xaxisLabelPosition = parseInt(formatOptions.xAxisLabel.xAxisPosition);
|
|
14628
|
-
let responsiveDimList = responsiveXaxisLabel(dimensionList,
|
|
14634
|
+
let responsiveDimList = responsiveXaxisLabel(dimensionList, innerHeight2);
|
|
14629
14635
|
let labelWidth = formatOptions.xAxisLabel.labelTextWrap ? dimensionHeightWidthArray[3] + 10 < width * 0.1 ? dimensionHeightWidthArray[3] + 10 : width * 0.1 : formatOptions.xAxisLabel.xAxisLabelRotation == 0 ? columnWidth : dimensionHeightWidthArray[0] + 5;
|
|
14630
14636
|
let xLabelMargin = formatOptions.xAxisLabel.labelTextWrap ? xLabel : labelWidth;
|
|
14631
14637
|
let formatedResponsiveDimList = isDateType ? setDateFormats(
|
|
@@ -14996,8 +15002,9 @@ const fileName$b = "CommonFunctions.ts";
|
|
|
14996
15002
|
actualChartTypes.speedometerChart,
|
|
14997
15003
|
actualChartTypes.radialBarChart
|
|
14998
15004
|
];
|
|
14999
|
-
function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions,
|
|
15005
|
+
function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, inputSeries, chartId, legendShape) {
|
|
15000
15006
|
try {
|
|
15007
|
+
let seriesData = [...inputSeries].reverse();
|
|
15001
15008
|
let position = formatOptions.legends.legendPosition;
|
|
15002
15009
|
let horizontalLegendAlignment = formatOptions.legends.legendAlignmentTopBottom;
|
|
15003
15010
|
let verticalLegendAlignment = formatOptions.legends.legendAlignment;
|
|
@@ -16086,6 +16093,13 @@ const connectorNumberFormat = (numerator, denominator, decimalValues, numberForm
|
|
|
16086
16093
|
} catch (e) {
|
|
16087
16094
|
}
|
|
16088
16095
|
};
|
|
16096
|
+
const getHoverId = (inputText) => {
|
|
16097
|
+
try {
|
|
16098
|
+
return inputText.includes("~$~") ? inputText.split("~$~")[1].replace(/ /g, "-") : inputText.replace(/ /g, "-");
|
|
16099
|
+
} catch (error) {
|
|
16100
|
+
return inputText;
|
|
16101
|
+
}
|
|
16102
|
+
};
|
|
16089
16103
|
const ColumnChart = ({
|
|
16090
16104
|
isDateType,
|
|
16091
16105
|
formatOptions,
|
|
@@ -18142,7 +18156,7 @@ const StackColumnChart = ({
|
|
|
18142
18156
|
const seriesData = generalizedChartData(
|
|
18143
18157
|
data.ChartData,
|
|
18144
18158
|
data.DimensionList
|
|
18145
|
-
);
|
|
18159
|
+
)?.reverse();
|
|
18146
18160
|
const dimensionList = data.DimensionList;
|
|
18147
18161
|
const barChart = false;
|
|
18148
18162
|
const isSecondaryAxisDrawn = false;
|
|
@@ -18463,7 +18477,7 @@ const StackColumnChart = ({
|
|
|
18463
18477
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
18464
18478
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
18465
18479
|
"hoverId",
|
|
18466
|
-
(d) => d.
|
|
18480
|
+
(d) => d[0]?.properties.alias ? getHoverId(d[0]?.properties.alias) : getHoverId(d.key)
|
|
18467
18481
|
);
|
|
18468
18482
|
columnGroups = columnGroupsEnter.merge(columnGroups);
|
|
18469
18483
|
let rects = columnGroups.selectAll("rect").data((d) => d);
|
|
@@ -18515,14 +18529,14 @@ const StackColumnChart = ({
|
|
|
18515
18529
|
);
|
|
18516
18530
|
const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
|
|
18517
18531
|
gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
|
|
18518
|
-
let legend = d.
|
|
18532
|
+
let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
|
|
18519
18533
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
18520
18534
|
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
18521
18535
|
}).on("mouseout", (event2, d) => {
|
|
18522
18536
|
hideTooltipOnMouseOut();
|
|
18523
18537
|
const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
|
|
18524
18538
|
gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
|
|
18525
|
-
let legend = d.
|
|
18539
|
+
let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
|
|
18526
18540
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
18527
18541
|
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
18528
18542
|
});
|
|
@@ -18862,7 +18876,7 @@ const NormalizedStackColumnChart = ({
|
|
|
18862
18876
|
const seriesData = generalizedChartData(
|
|
18863
18877
|
data.ChartData,
|
|
18864
18878
|
data.DimensionList
|
|
18865
|
-
);
|
|
18879
|
+
).reverse();
|
|
18866
18880
|
const dimensionList = data.DimensionList;
|
|
18867
18881
|
const barChart = false;
|
|
18868
18882
|
const isSecondaryAxisDrawn = false;
|
|
@@ -20932,7 +20946,7 @@ const StackLineChart = ({
|
|
|
20932
20946
|
const seriesData = generalizedChartData(
|
|
20933
20947
|
data.ChartData,
|
|
20934
20948
|
data.DimensionList
|
|
20935
|
-
);
|
|
20949
|
+
)?.reverse() || [];
|
|
20936
20950
|
const dimensionList = data.DimensionList;
|
|
20937
20951
|
const barChart = false;
|
|
20938
20952
|
const isSecondaryAxisDrawn = false;
|
|
@@ -21472,7 +21486,7 @@ const NormalisedStackLineChart = ({
|
|
|
21472
21486
|
const seriesData = generalizedChartData(
|
|
21473
21487
|
data.ChartData,
|
|
21474
21488
|
data.DimensionList
|
|
21475
|
-
);
|
|
21489
|
+
)?.reverse() || [];
|
|
21476
21490
|
const dimensionList = data.DimensionList;
|
|
21477
21491
|
const barChart = false;
|
|
21478
21492
|
const isSecondaryAxisDrawn = false;
|
|
@@ -21774,7 +21788,7 @@ const NormalisedStackLineChart = ({
|
|
|
21774
21788
|
const lineGenerator = line$1().x(
|
|
21775
21789
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
21776
21790
|
).y((d) => d[1] > 0 ? yScaleLeft(d[1]) : yScaleLeft(d[0])).curve(getCurveType(formatOptions));
|
|
21777
|
-
let lines = gTag.selectAll(".parentGroup").data([stackChartData
|
|
21791
|
+
let lines = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
21778
21792
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
21779
21793
|
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
21780
21794
|
let lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
|
|
@@ -22472,7 +22486,7 @@ const StackHorizontalChart = ({
|
|
|
22472
22486
|
const seriesData = generalizedChartData(
|
|
22473
22487
|
data.ChartData,
|
|
22474
22488
|
data.DimensionList
|
|
22475
|
-
);
|
|
22489
|
+
)?.reverse();
|
|
22476
22490
|
const dimensionList = data.DimensionList;
|
|
22477
22491
|
const barChart = true;
|
|
22478
22492
|
const isSecondaryAxisDrawn = false;
|
|
@@ -23162,7 +23176,7 @@ const NormalizedStackHorizontalBarChart = ({
|
|
|
23162
23176
|
let columnWidth = 0;
|
|
23163
23177
|
const chartType = actualChartTypes.stackBar100;
|
|
23164
23178
|
const svgRef = useRef();
|
|
23165
|
-
const seriesData = generalizedChartData(data.ChartData, data.DimensionList);
|
|
23179
|
+
const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse();
|
|
23166
23180
|
const dimensionList = data.DimensionList;
|
|
23167
23181
|
const barChart = true;
|
|
23168
23182
|
const isSecondaryAxisDrawn = false;
|
|
@@ -23316,6 +23330,7 @@ const NormalizedStackHorizontalBarChart = ({
|
|
|
23316
23330
|
margin,
|
|
23317
23331
|
yTitle,
|
|
23318
23332
|
yLabel,
|
|
23333
|
+
void 0,
|
|
23319
23334
|
xTitle,
|
|
23320
23335
|
xLabel
|
|
23321
23336
|
);
|
|
@@ -23455,7 +23470,7 @@ const NormalizedStackHorizontalBarChart = ({
|
|
|
23455
23470
|
filteredDimension.forEach((dim) => {
|
|
23456
23471
|
gTag.append("rect").attr("id", `dim-background-${dim}`).attr("class", "dimension-background").attr("y", yScale(dim) - yScale.bandwidth() / 2).attr("height", yScale.bandwidth()).attr("x", 0).attr("width", innerWidth2).attr("fill", "#E5E5E5").attr("visibility", "hidden").lower();
|
|
23457
23472
|
});
|
|
23458
|
-
let columns = gTag.selectAll(".parentGroup").data([stackChartData
|
|
23473
|
+
let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
23459
23474
|
columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
|
|
23460
23475
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
23461
23476
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
@@ -25424,7 +25439,7 @@ const StackAreaChart = ({
|
|
|
25424
25439
|
const seriesData = generalizedChartData(
|
|
25425
25440
|
data.ChartData,
|
|
25426
25441
|
data.DimensionList
|
|
25427
|
-
);
|
|
25442
|
+
)?.reverse() || [];
|
|
25428
25443
|
const dimensionList = data.DimensionList;
|
|
25429
25444
|
const barChart = false;
|
|
25430
25445
|
const isSecondaryAxisDrawn = false;
|
|
@@ -25777,7 +25792,7 @@ const StackAreaChart = ({
|
|
|
25777
25792
|
).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined(
|
|
25778
25793
|
(d) => d.data.hideZero ? Boolean(d.data.key) : true
|
|
25779
25794
|
).curve(getCurveType(formatOptions));
|
|
25780
|
-
let areas = gTag.selectAll(".lineGroup").data([stackChartData
|
|
25795
|
+
let areas = gTag.selectAll(".lineGroup").data([stackChartData]);
|
|
25781
25796
|
let focus = gTag.append("g").attr("class", "focusClass");
|
|
25782
25797
|
areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
|
|
25783
25798
|
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
@@ -25992,7 +26007,7 @@ const NormalizedStackAreaChart = ({
|
|
|
25992
26007
|
const seriesData = generalizedChartData(
|
|
25993
26008
|
data.ChartData,
|
|
25994
26009
|
data.DimensionList
|
|
25995
|
-
);
|
|
26010
|
+
)?.reverse() || [];
|
|
25996
26011
|
const dimensionList = data.DimensionList;
|
|
25997
26012
|
const barChart = false;
|
|
25998
26013
|
const isSecondaryAxisDrawn = false;
|
|
@@ -26306,13 +26321,13 @@ const NormalizedStackAreaChart = ({
|
|
|
26306
26321
|
});
|
|
26307
26322
|
const columnGenerator = area().x(
|
|
26308
26323
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
26309
|
-
).y0(() => yScaleLeft(0)).y1((d) => yScaleLeft(d[1])).defined((d) => d.data.hideZero ? Boolean(d[0]) : true).curve(curveLinear$1);
|
|
26324
|
+
).y0((d) => yScaleLeft(d[0])).y1((d) => yScaleLeft(d[1])).defined((d) => d.data.hideZero ? Boolean(d[0]) : true).curve(curveLinear$1);
|
|
26310
26325
|
const columnGeneratorStart = area().x(
|
|
26311
26326
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
26312
|
-
).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(
|
|
26327
|
+
).y0((d) => yScaleLeft(d[0])).y1((d) => yScaleLeft(d[1])).defined(
|
|
26313
26328
|
(d) => d.data.hideZero ? Boolean(d.data.key) : true
|
|
26314
26329
|
).curve(getCurveType(formatOptions));
|
|
26315
|
-
let areas = gTag.selectAll(".lineGroup").data([stackChartData
|
|
26330
|
+
let areas = gTag.selectAll(".lineGroup").data([stackChartData]);
|
|
26316
26331
|
let focus = gTag.append("g").attr("class", "focusClass");
|
|
26317
26332
|
areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
|
|
26318
26333
|
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
@@ -26835,10 +26850,10 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26835
26850
|
).attr(
|
|
26836
26851
|
"font-family",
|
|
26837
26852
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
26838
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", "1.00em").text((d) => {
|
|
26853
|
+
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
26839
26854
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
26840
26855
|
const dataValue = d.data.data[0].value;
|
|
26841
|
-
if (chartFormatOptions.plotArea.
|
|
26856
|
+
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
26842
26857
|
if (chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%") {
|
|
26843
26858
|
return (Math.abs(dataValue / pieTotalValue) * 100).toFixed(
|
|
26844
26859
|
convertStringToNumber(
|
|
@@ -27199,10 +27214,10 @@ const DonutChart = ({
|
|
|
27199
27214
|
).attr(
|
|
27200
27215
|
"font-family",
|
|
27201
27216
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
27202
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", "1.00em").text((d) => {
|
|
27217
|
+
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
27203
27218
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
27204
27219
|
const dataValue = d.data.data[0].value;
|
|
27205
|
-
if (chartFormatOptions.plotArea.
|
|
27220
|
+
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
27206
27221
|
if (chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%") {
|
|
27207
27222
|
return (Math.abs(dataValue / pieTotalValue) * 100).toFixed(
|
|
27208
27223
|
convertStringToNumber(
|
|
@@ -11407,7 +11407,8 @@
|
|
|
11407
11407
|
dataTableFontStyle: [],
|
|
11408
11408
|
dataTableNumberFormat: ",",
|
|
11409
11409
|
dataTableDecimalPrecision: "2",
|
|
11410
|
-
dataTableDisplayUnits: "None"
|
|
11410
|
+
dataTableDisplayUnits: "None",
|
|
11411
|
+
dataTableLabelColor: "#000000"
|
|
11411
11412
|
},
|
|
11412
11413
|
dataTableOuterBorder: {
|
|
11413
11414
|
borderButtonVisibility: true,
|
|
@@ -11733,8 +11734,8 @@
|
|
|
11733
11734
|
xAxisObject,
|
|
11734
11735
|
isBarChart
|
|
11735
11736
|
);
|
|
11736
|
-
const legendPosition = formatOptions.legends.legendPosition;
|
|
11737
11737
|
const legendVisibility = formatOptions.legends.legendVisibility;
|
|
11738
|
+
const legendPosition = legendVisibility ? formatOptions.legends.legendPosition : staticLegendPosition.none;
|
|
11738
11739
|
const scrollHeightConstant = isScrollbarVisible ? 12 : 0;
|
|
11739
11740
|
const xAxisRelatedMargin = isBarChart ? metrics.yTitle + metrics.yLabel : metrics.xTitle + metrics.xLabel;
|
|
11740
11741
|
let top2 = 0;
|
|
@@ -13047,7 +13048,7 @@
|
|
|
13047
13048
|
let axis2 = d.x.axis;
|
|
13048
13049
|
return dataLabelsPositionForBarChartFamily(formatOptions, d.x.measure ? d.x.measure : 0, d.position, requiredXScale, minValue, void 0, chartType, isSensitivityChart, axis2);
|
|
13049
13050
|
} else if (chartType === actualChartTypes.column) {
|
|
13050
|
-
return xScale(d.x) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2;
|
|
13051
|
+
return xScaleForLegends(d.currentLegend) ? xScale(d.x) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 : xScale(d.x);
|
|
13051
13052
|
} else {
|
|
13052
13053
|
return xScale(d.x);
|
|
13053
13054
|
}
|
|
@@ -13065,7 +13066,7 @@
|
|
|
13065
13066
|
} else {
|
|
13066
13067
|
if (barChart) {
|
|
13067
13068
|
let actualColWidth = chartType === actualChartTypes.tornadoChart || chartType === actualChartTypes.layeredBarChart ? xScaleForLegends.bandwidth() : -columnWidth;
|
|
13068
|
-
return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) : 0) + xScale(d.y)
|
|
13069
|
+
return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) + xScaleForLegends.bandwidth() / 2 : 0) + xScale(d.y) - 5;
|
|
13069
13070
|
} else
|
|
13070
13071
|
return dataLabelsPosition(
|
|
13071
13072
|
d.y.measure,
|
|
@@ -13615,7 +13616,7 @@
|
|
|
13615
13616
|
parentTag.append("foreignObject").attr("x", (d) => 0).attr("y", tableStartY + yCordinate).attr("width", (d, index2) => index2 === 0 ? cellWidth + outerPadding + calWidthForSeriesNames / 2 : index2 === dimensionCount - 1 ? cellWidth + outerPadding - calWidthForSeriesNames / 2 : cellWidth).attr("height", cellHeight).style("justify-content", "center").append("xhtml:div").attr("class", "middlepart").style("width", (d, index2) => index2 === 0 ? cellWidth + outerPadding + calWidthForSeriesNames / 2 : index2 === dimensionCount - 1 ? cellWidth + outerPadding - calWidthForSeriesNames / 2 : cellWidth).style("height", `${cellHeight}px`).style("line-height", `${cellHeight}px`).style("border-width", (d, pos) => getBorderStyle(formatOptions, i, pos, dimensionCount, legendsCount, "width")).style("border-style", (d, pos) => getBorderStyle(formatOptions, i, pos, dimensionCount, legendsCount, "style")).style("border-color", (d, pos) => getBorderStyle(formatOptions, i, pos, dimensionCount, legendsCount, "color")).style("text-align", "center").style("white-space", "nowrap").style("text-overflow", "ellipsis").style("overflow", "hidden").style("padding-inline", "3px").style("font-size", formatOptions.dataTableProperties.dataTableFontSize + "px").style("font-family", formatOptions.dataTableProperties.dataTableFontFamily).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
13616
13617
|
"text-decoration",
|
|
13617
13618
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
13618
|
-
).style("color",
|
|
13619
|
+
).style("color", formatOptions.dataTableProperties.dataTableLabelColor).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr("title", (d) => getNumberWithFormat(
|
|
13619
13620
|
chartType.includes("100stack") ? d.TooltipMeasure / d.TotalMeasure : d.TooltipMeasure || d.value,
|
|
13620
13621
|
formatOptions.dataTableProperties.dataTableDisplayUnits,
|
|
13621
13622
|
formatOptions.dataTableProperties.dataTableNumberFormat,
|
|
@@ -14464,16 +14465,18 @@
|
|
|
14464
14465
|
y: d.data.dimension,
|
|
14465
14466
|
x: d[1] > 0 ? d[1] : d[0],
|
|
14466
14467
|
prevValue: d[0] >= 0 ? d[0] : d[1],
|
|
14467
|
-
position: d.data.labelPosition,
|
|
14468
|
+
position: formatOptions.annotation.annotationPosition == "4" ? d.data.labelPosition : JSON.parse(formatOptions.annotation.annotationPosition),
|
|
14468
14469
|
currentLegend: d.key.includes("~$~") ? d.key.split("~$~")[1] : d.key,
|
|
14469
|
-
isVisible: true
|
|
14470
|
+
isVisible: true,
|
|
14471
|
+
hoverId: d.properties.alias ? getHoverId(d.properties.alias) : getHoverId(d.key)
|
|
14470
14472
|
} : {
|
|
14471
14473
|
x: d.data.dimension,
|
|
14472
14474
|
y: d[1] > 0 ? d[1] : d[0],
|
|
14473
14475
|
prevValue: d[0] >= 0 ? d[0] : d[1],
|
|
14474
|
-
position: d.data.labelPosition,
|
|
14476
|
+
position: formatOptions.annotation.annotationPosition == "4" ? d.data.labelPosition : JSON.parse(formatOptions.annotation.annotationPosition),
|
|
14475
14477
|
currentLegend: d.key.includes("~$~") ? d.key.split("~$~")[1] : d.key,
|
|
14476
|
-
isVisible: true
|
|
14478
|
+
isVisible: true,
|
|
14479
|
+
hoverId: d.properties.alias ? getHoverId(d.properties.alias) : getHoverId(d.key)
|
|
14477
14480
|
},
|
|
14478
14481
|
dx: 0,
|
|
14479
14482
|
dy: 0,
|
|
@@ -14595,7 +14598,7 @@
|
|
|
14595
14598
|
}
|
|
14596
14599
|
});
|
|
14597
14600
|
annotations.selectAll("text").append("text").style("fill", formatOptions.annotation.annotationColor !== "#ffffff" ? formatOptions.annotation.annotationColor : "none");
|
|
14598
|
-
annotations.selectAll("tspan").attr("hoverId", (d) => d.data.currentLegend.replaceAll(" ", "-")).style("visibility", (d) => parseFloat(d.data.y) == 0 && formatOptions.annotation.annotationHideZeroValues ? "hidden" : "visible");
|
|
14601
|
+
annotations.selectAll("tspan").attr("hoverId", (d) => d.data.hoverId ? d.data.hoverId : d.data.currentLegend.replaceAll(" ", "-")).style("visibility", (d) => parseFloat(d.data.y) == 0 && formatOptions.annotation.annotationHideZeroValues ? "hidden" : "visible");
|
|
14599
14602
|
return annotations;
|
|
14600
14603
|
};
|
|
14601
14604
|
const initXaxisBar = (formatOptions, gTag, yLabel, innerHeight2, innerWidth2, xAxisBottom) => {
|
|
@@ -14616,7 +14619,10 @@
|
|
|
14616
14619
|
"visibility",
|
|
14617
14620
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
|
|
14618
14621
|
);
|
|
14619
|
-
xAxisG.select(".domain").
|
|
14622
|
+
xAxisG.select(".domain").attr(
|
|
14623
|
+
"visibility",
|
|
14624
|
+
formatOptions.yAxisLabel.yAxisLabelVisibility ? "visible" : "hidden"
|
|
14625
|
+
).style("shape-rendering", "crispEdges").style(
|
|
14620
14626
|
"stroke",
|
|
14621
14627
|
formatOptions.yAxisLabel.yAxisColorInverted
|
|
14622
14628
|
).attr("stroke-width", formatOptions.yAxisLabel.yAxisWidth ? formatOptions.yAxisLabel.yAxisWidth : formatOptions.plotArea.plotAreaBorderThickness);
|
|
@@ -14628,7 +14634,7 @@
|
|
|
14628
14634
|
try {
|
|
14629
14635
|
let fontStyle = formatOptions.xAxisLabel.xAxisLabelFontStyle;
|
|
14630
14636
|
let xaxisLabelPosition = parseInt(formatOptions.xAxisLabel.xAxisPosition);
|
|
14631
|
-
let responsiveDimList = responsiveXaxisLabel(dimensionList,
|
|
14637
|
+
let responsiveDimList = responsiveXaxisLabel(dimensionList, innerHeight2);
|
|
14632
14638
|
let labelWidth = formatOptions.xAxisLabel.labelTextWrap ? dimensionHeightWidthArray[3] + 10 < width * 0.1 ? dimensionHeightWidthArray[3] + 10 : width * 0.1 : formatOptions.xAxisLabel.xAxisLabelRotation == 0 ? columnWidth : dimensionHeightWidthArray[0] + 5;
|
|
14633
14639
|
let xLabelMargin = formatOptions.xAxisLabel.labelTextWrap ? xLabel : labelWidth;
|
|
14634
14640
|
let formatedResponsiveDimList = isDateType ? setDateFormats(
|
|
@@ -14999,8 +15005,9 @@
|
|
|
14999
15005
|
actualChartTypes.speedometerChart,
|
|
15000
15006
|
actualChartTypes.radialBarChart
|
|
15001
15007
|
];
|
|
15002
|
-
function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions,
|
|
15008
|
+
function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, inputSeries, chartId, legendShape) {
|
|
15003
15009
|
try {
|
|
15010
|
+
let seriesData = [...inputSeries].reverse();
|
|
15004
15011
|
let position = formatOptions.legends.legendPosition;
|
|
15005
15012
|
let horizontalLegendAlignment = formatOptions.legends.legendAlignmentTopBottom;
|
|
15006
15013
|
let verticalLegendAlignment = formatOptions.legends.legendAlignment;
|
|
@@ -16089,6 +16096,13 @@
|
|
|
16089
16096
|
} catch (e) {
|
|
16090
16097
|
}
|
|
16091
16098
|
};
|
|
16099
|
+
const getHoverId = (inputText) => {
|
|
16100
|
+
try {
|
|
16101
|
+
return inputText.includes("~$~") ? inputText.split("~$~")[1].replace(/ /g, "-") : inputText.replace(/ /g, "-");
|
|
16102
|
+
} catch (error) {
|
|
16103
|
+
return inputText;
|
|
16104
|
+
}
|
|
16105
|
+
};
|
|
16092
16106
|
const ColumnChart = ({
|
|
16093
16107
|
isDateType,
|
|
16094
16108
|
formatOptions,
|
|
@@ -18145,7 +18159,7 @@
|
|
|
18145
18159
|
const seriesData = generalizedChartData(
|
|
18146
18160
|
data.ChartData,
|
|
18147
18161
|
data.DimensionList
|
|
18148
|
-
);
|
|
18162
|
+
)?.reverse();
|
|
18149
18163
|
const dimensionList = data.DimensionList;
|
|
18150
18164
|
const barChart = false;
|
|
18151
18165
|
const isSecondaryAxisDrawn = false;
|
|
@@ -18466,7 +18480,7 @@
|
|
|
18466
18480
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
18467
18481
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
18468
18482
|
"hoverId",
|
|
18469
|
-
(d) => d.
|
|
18483
|
+
(d) => d[0]?.properties.alias ? getHoverId(d[0]?.properties.alias) : getHoverId(d.key)
|
|
18470
18484
|
);
|
|
18471
18485
|
columnGroups = columnGroupsEnter.merge(columnGroups);
|
|
18472
18486
|
let rects = columnGroups.selectAll("rect").data((d) => d);
|
|
@@ -18518,14 +18532,14 @@
|
|
|
18518
18532
|
);
|
|
18519
18533
|
const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
|
|
18520
18534
|
gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
|
|
18521
|
-
let legend = d.
|
|
18535
|
+
let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
|
|
18522
18536
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
18523
18537
|
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
18524
18538
|
}).on("mouseout", (event2, d) => {
|
|
18525
18539
|
hideTooltipOnMouseOut();
|
|
18526
18540
|
const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
|
|
18527
18541
|
gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
|
|
18528
|
-
let legend = d.
|
|
18542
|
+
let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
|
|
18529
18543
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
18530
18544
|
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
18531
18545
|
});
|
|
@@ -18865,7 +18879,7 @@
|
|
|
18865
18879
|
const seriesData = generalizedChartData(
|
|
18866
18880
|
data.ChartData,
|
|
18867
18881
|
data.DimensionList
|
|
18868
|
-
);
|
|
18882
|
+
).reverse();
|
|
18869
18883
|
const dimensionList = data.DimensionList;
|
|
18870
18884
|
const barChart = false;
|
|
18871
18885
|
const isSecondaryAxisDrawn = false;
|
|
@@ -20935,7 +20949,7 @@
|
|
|
20935
20949
|
const seriesData = generalizedChartData(
|
|
20936
20950
|
data.ChartData,
|
|
20937
20951
|
data.DimensionList
|
|
20938
|
-
);
|
|
20952
|
+
)?.reverse() || [];
|
|
20939
20953
|
const dimensionList = data.DimensionList;
|
|
20940
20954
|
const barChart = false;
|
|
20941
20955
|
const isSecondaryAxisDrawn = false;
|
|
@@ -21475,7 +21489,7 @@
|
|
|
21475
21489
|
const seriesData = generalizedChartData(
|
|
21476
21490
|
data.ChartData,
|
|
21477
21491
|
data.DimensionList
|
|
21478
|
-
);
|
|
21492
|
+
)?.reverse() || [];
|
|
21479
21493
|
const dimensionList = data.DimensionList;
|
|
21480
21494
|
const barChart = false;
|
|
21481
21495
|
const isSecondaryAxisDrawn = false;
|
|
@@ -21777,7 +21791,7 @@
|
|
|
21777
21791
|
const lineGenerator = line$1().x(
|
|
21778
21792
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
21779
21793
|
).y((d) => d[1] > 0 ? yScaleLeft(d[1]) : yScaleLeft(d[0])).curve(getCurveType(formatOptions));
|
|
21780
|
-
let lines = gTag.selectAll(".parentGroup").data([stackChartData
|
|
21794
|
+
let lines = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
21781
21795
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
21782
21796
|
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
21783
21797
|
let lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
|
|
@@ -22475,7 +22489,7 @@
|
|
|
22475
22489
|
const seriesData = generalizedChartData(
|
|
22476
22490
|
data.ChartData,
|
|
22477
22491
|
data.DimensionList
|
|
22478
|
-
);
|
|
22492
|
+
)?.reverse();
|
|
22479
22493
|
const dimensionList = data.DimensionList;
|
|
22480
22494
|
const barChart = true;
|
|
22481
22495
|
const isSecondaryAxisDrawn = false;
|
|
@@ -23165,7 +23179,7 @@
|
|
|
23165
23179
|
let columnWidth = 0;
|
|
23166
23180
|
const chartType = actualChartTypes.stackBar100;
|
|
23167
23181
|
const svgRef = require$$0$1.useRef();
|
|
23168
|
-
const seriesData = generalizedChartData(data.ChartData, data.DimensionList);
|
|
23182
|
+
const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse();
|
|
23169
23183
|
const dimensionList = data.DimensionList;
|
|
23170
23184
|
const barChart = true;
|
|
23171
23185
|
const isSecondaryAxisDrawn = false;
|
|
@@ -23319,6 +23333,7 @@
|
|
|
23319
23333
|
margin,
|
|
23320
23334
|
yTitle,
|
|
23321
23335
|
yLabel,
|
|
23336
|
+
void 0,
|
|
23322
23337
|
xTitle,
|
|
23323
23338
|
xLabel
|
|
23324
23339
|
);
|
|
@@ -23458,7 +23473,7 @@
|
|
|
23458
23473
|
filteredDimension.forEach((dim) => {
|
|
23459
23474
|
gTag.append("rect").attr("id", `dim-background-${dim}`).attr("class", "dimension-background").attr("y", yScale(dim) - yScale.bandwidth() / 2).attr("height", yScale.bandwidth()).attr("x", 0).attr("width", innerWidth2).attr("fill", "#E5E5E5").attr("visibility", "hidden").lower();
|
|
23460
23475
|
});
|
|
23461
|
-
let columns = gTag.selectAll(".parentGroup").data([stackChartData
|
|
23476
|
+
let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
23462
23477
|
columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
|
|
23463
23478
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
23464
23479
|
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
@@ -25427,7 +25442,7 @@
|
|
|
25427
25442
|
const seriesData = generalizedChartData(
|
|
25428
25443
|
data.ChartData,
|
|
25429
25444
|
data.DimensionList
|
|
25430
|
-
);
|
|
25445
|
+
)?.reverse() || [];
|
|
25431
25446
|
const dimensionList = data.DimensionList;
|
|
25432
25447
|
const barChart = false;
|
|
25433
25448
|
const isSecondaryAxisDrawn = false;
|
|
@@ -25780,7 +25795,7 @@
|
|
|
25780
25795
|
).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(0)).defined(
|
|
25781
25796
|
(d) => d.data.hideZero ? Boolean(d.data.key) : true
|
|
25782
25797
|
).curve(getCurveType(formatOptions));
|
|
25783
|
-
let areas = gTag.selectAll(".lineGroup").data([stackChartData
|
|
25798
|
+
let areas = gTag.selectAll(".lineGroup").data([stackChartData]);
|
|
25784
25799
|
let focus = gTag.append("g").attr("class", "focusClass");
|
|
25785
25800
|
areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
|
|
25786
25801
|
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
@@ -25995,7 +26010,7 @@
|
|
|
25995
26010
|
const seriesData = generalizedChartData(
|
|
25996
26011
|
data.ChartData,
|
|
25997
26012
|
data.DimensionList
|
|
25998
|
-
);
|
|
26013
|
+
)?.reverse() || [];
|
|
25999
26014
|
const dimensionList = data.DimensionList;
|
|
26000
26015
|
const barChart = false;
|
|
26001
26016
|
const isSecondaryAxisDrawn = false;
|
|
@@ -26309,13 +26324,13 @@
|
|
|
26309
26324
|
});
|
|
26310
26325
|
const columnGenerator = area().x(
|
|
26311
26326
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
26312
|
-
).y0(() => yScaleLeft(0)).y1((d) => yScaleLeft(d[1])).defined((d) => d.data.hideZero ? Boolean(d[0]) : true).curve(curveLinear$1);
|
|
26327
|
+
).y0((d) => yScaleLeft(d[0])).y1((d) => yScaleLeft(d[1])).defined((d) => d.data.hideZero ? Boolean(d[0]) : true).curve(curveLinear$1);
|
|
26313
26328
|
const columnGeneratorStart = area().x(
|
|
26314
26329
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
26315
|
-
).y0(() => yScaleLeft(0)).y1(() => yScaleLeft(
|
|
26330
|
+
).y0((d) => yScaleLeft(d[0])).y1((d) => yScaleLeft(d[1])).defined(
|
|
26316
26331
|
(d) => d.data.hideZero ? Boolean(d.data.key) : true
|
|
26317
26332
|
).curve(getCurveType(formatOptions));
|
|
26318
|
-
let areas = gTag.selectAll(".lineGroup").data([stackChartData
|
|
26333
|
+
let areas = gTag.selectAll(".lineGroup").data([stackChartData]);
|
|
26319
26334
|
let focus = gTag.append("g").attr("class", "focusClass");
|
|
26320
26335
|
areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
|
|
26321
26336
|
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
@@ -26838,10 +26853,10 @@
|
|
|
26838
26853
|
).attr(
|
|
26839
26854
|
"font-family",
|
|
26840
26855
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
26841
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", "1.00em").text((d) => {
|
|
26856
|
+
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
26842
26857
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
26843
26858
|
const dataValue = d.data.data[0].value;
|
|
26844
|
-
if (chartFormatOptions.plotArea.
|
|
26859
|
+
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
26845
26860
|
if (chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%") {
|
|
26846
26861
|
return (Math.abs(dataValue / pieTotalValue) * 100).toFixed(
|
|
26847
26862
|
convertStringToNumber(
|
|
@@ -27202,10 +27217,10 @@
|
|
|
27202
27217
|
).attr(
|
|
27203
27218
|
"font-family",
|
|
27204
27219
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
27205
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", "1.00em").text((d) => {
|
|
27220
|
+
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
27206
27221
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
27207
27222
|
const dataValue = d.data.data[0].value;
|
|
27208
|
-
if (chartFormatOptions.plotArea.
|
|
27223
|
+
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
27209
27224
|
if (chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%") {
|
|
27210
27225
|
return (Math.abs(dataValue / pieTotalValue) * 100).toFixed(
|
|
27211
27226
|
convertStringToNumber(
|