pace-chart-lib 1.0.41 → 1.0.42
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.
|
@@ -569,6 +569,9 @@ export declare const defaultChartFormatOptions: {
|
|
|
569
569
|
dataTableDisplayUnits: string;
|
|
570
570
|
dataTableLabelColor: commonColors;
|
|
571
571
|
dataTableAxisLabel: boolean;
|
|
572
|
+
dataTableLegends: boolean;
|
|
573
|
+
disableLegendIcon: boolean;
|
|
574
|
+
legendsWrapText: boolean;
|
|
572
575
|
};
|
|
573
576
|
dataTableOuterBorder: {
|
|
574
577
|
borderButtonVisibility: boolean;
|
|
@@ -11446,7 +11446,10 @@ const defaultChartFormatOptions = {
|
|
|
11446
11446
|
dataTableDecimalPrecision: "2",
|
|
11447
11447
|
dataTableDisplayUnits: "None",
|
|
11448
11448
|
dataTableLabelColor: commonColors.black,
|
|
11449
|
-
dataTableAxisLabel: true
|
|
11449
|
+
dataTableAxisLabel: true,
|
|
11450
|
+
dataTableLegends: true,
|
|
11451
|
+
disableLegendIcon: true,
|
|
11452
|
+
legendsWrapText: false
|
|
11450
11453
|
},
|
|
11451
11454
|
dataTableOuterBorder: {
|
|
11452
11455
|
borderButtonVisibility: true,
|
|
@@ -11709,6 +11712,7 @@ function calculateHorizontalMargins(windowWidth, windowHeight, maxNumberForPrima
|
|
|
11709
11712
|
const yAxisRelatedMargin = isBarChart ? metrics.xTitle + metrics.xLabel : metrics.yTitle + metrics.yLabel;
|
|
11710
11713
|
const legendPosition = formatOptions.legends.legendPosition;
|
|
11711
11714
|
const legendVisibility = formatOptions.legends.legendVisibility;
|
|
11715
|
+
const yAxisPosition = formatOptions.xAxisLabel.xAxisPosition;
|
|
11712
11716
|
let left2 = 0;
|
|
11713
11717
|
let right2 = 0;
|
|
11714
11718
|
const secondaryExtra = isSecondaryAxisDrawn ? metrics.secondaryYLabel + metrics.secondaryAxisTitleWidth : 0;
|
|
@@ -11719,16 +11723,16 @@ function calculateHorizontalMargins(windowWidth, windowHeight, maxNumberForPrima
|
|
|
11719
11723
|
left2 = yAxisRelatedMargin + 5;
|
|
11720
11724
|
break;
|
|
11721
11725
|
case staticLegendPosition.top:
|
|
11722
|
-
right2 = 15 + secondaryExtra;
|
|
11723
|
-
left2 = yAxisRelatedMargin + 5;
|
|
11726
|
+
right2 = yAxisPosition == "1" ? yAxisRelatedMargin + 5 : 15 + secondaryExtra;
|
|
11727
|
+
left2 = yAxisPosition == "1" ? 15 + secondaryExtra : yAxisRelatedMargin + 5;
|
|
11724
11728
|
break;
|
|
11725
11729
|
case staticLegendPosition.right:
|
|
11726
|
-
right2 = metrics.legendMargin + secondaryExtra + 35;
|
|
11727
|
-
left2 = yAxisRelatedMargin + 5;
|
|
11730
|
+
right2 = yAxisPosition == "1" ? yAxisRelatedMargin + 5 + metrics.legendMargin : metrics.legendMargin + secondaryExtra + 35;
|
|
11731
|
+
left2 = yAxisPosition == "1" ? 15 + secondaryExtra + metrics.legendMargin : yAxisRelatedMargin + 5;
|
|
11728
11732
|
break;
|
|
11729
11733
|
case staticLegendPosition.bottom:
|
|
11730
|
-
right2 = 15 + secondaryExtra;
|
|
11731
|
-
left2 = yAxisRelatedMargin + 5;
|
|
11734
|
+
right2 = yAxisPosition == "1" ? yAxisRelatedMargin + 5 : 15 + secondaryExtra;
|
|
11735
|
+
left2 = yAxisPosition == "1" ? 15 + secondaryExtra : yAxisRelatedMargin + 5;
|
|
11732
11736
|
break;
|
|
11733
11737
|
case staticLegendPosition.left:
|
|
11734
11738
|
left2 = metrics.legendMargin + yAxisRelatedMargin + 33;
|
|
@@ -12459,7 +12463,7 @@ function initYaxis$1(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, in
|
|
|
12459
12463
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
12460
12464
|
);
|
|
12461
12465
|
const yAxisG = gTag.append("g").call(yAxisLeft);
|
|
12462
|
-
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em")
|
|
12466
|
+
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em");
|
|
12463
12467
|
yAxisG.selectAll("text").style(
|
|
12464
12468
|
"fill",
|
|
12465
12469
|
formatOptions.yAxisLabel.yAxisLabelColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisLabelColor : "none"
|
|
@@ -14035,7 +14039,7 @@ function addDataTable(isFitChart, svg, currentTag, dataTable, colWidth, yAxis, x
|
|
|
14035
14039
|
if (i == 0) {
|
|
14036
14040
|
temp.append("foreignObject").attr("x", -margin.left).attr("y", tableStartY).attr("class", "blankClass").attr("width", margin.left).attr("height", 20).append("xhtml:div").style("width", margin.left).style("height", `${20}px`).style(
|
|
14037
14041
|
"border-width",
|
|
14038
|
-
outerBorder ? `0px ${0}px ${outerBorderLineWidth}px 0px` : "0px 0px 0px 0px"
|
|
14042
|
+
outerBorder ? `0px ${0}px ${!formatOptions.dataTableProperties.dataTableAxisLabel ? 0 : outerBorderLineWidth}px 0px` : "0px 0px 0px 0px"
|
|
14039
14043
|
).style(
|
|
14040
14044
|
"border-style",
|
|
14041
14045
|
outerBorder ? `solid ${outerBorderLineStyle} ${outerBorderLineStyle} solid` : "solid solid solid solid"
|
|
@@ -14045,7 +14049,7 @@ function addDataTable(isFitChart, svg, currentTag, dataTable, colWidth, yAxis, x
|
|
|
14045
14049
|
).style("text-align", "center").style("vertical-align", "middle").text("");
|
|
14046
14050
|
}
|
|
14047
14051
|
let legendsParentTag = temp.append("foreignObject").attr("x", -margin.left).attr("y", tableStartY + yCordinate).attr("width", margin.left).attr("height", cellHeight2);
|
|
14048
|
-
let innerdiv = legendsParentTag.append("xhtml:div").style("display", "flex").style("justify-content", "flex-start").style("align-items", "center").attr("class", "parentClass").style("flex-wrap", "nowrap").style("pointer-events", "auto").style("width", cellWidth).style("height", `${cellHeight2}px`).style("padding-left", `5px`).style("padding-right", `3px`).style(
|
|
14052
|
+
let innerdiv = legendsParentTag.append("xhtml:div").style("display", "flex").style("justify-content", "flex-start").style("align-items", "center").attr("class", "parentClass").style("flex-wrap", "nowrap").style("pointer-events", "auto").style("width", cellWidth).style("height", `${cellHeight2}px`).style("padding-left", formatOptions.dataTableProperties.disableLegendIcon ? `2px` : `5px`).style("padding-right", `3px`).style(
|
|
14049
14053
|
"border-width",
|
|
14050
14054
|
getBorderStyle(
|
|
14051
14055
|
formatOptions,
|
|
@@ -14076,22 +14080,24 @@ function addDataTable(isFitChart, svg, currentTag, dataTable, colWidth, yAxis, x
|
|
|
14076
14080
|
"color"
|
|
14077
14081
|
)
|
|
14078
14082
|
);
|
|
14079
|
-
|
|
14080
|
-
|
|
14081
|
-
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14091
|
-
|
|
14092
|
-
|
|
14093
|
-
|
|
14094
|
-
|
|
14083
|
+
if (!formatOptions.dataTableProperties.disableLegendIcon) {
|
|
14084
|
+
switch (chartType) {
|
|
14085
|
+
case chartTypes.ColumnChart:
|
|
14086
|
+
case chartTypes.StackColumnChart:
|
|
14087
|
+
case chartTypes.NormalizedStackColumnChart:
|
|
14088
|
+
innerdiv.append("xhtml:div").style("height", "10px").style("width", "15px").style("background", data.properties.color).style("border-radius", "1px");
|
|
14089
|
+
break;
|
|
14090
|
+
case chartTypes.LineChart:
|
|
14091
|
+
case chartTypes.StackLineChart:
|
|
14092
|
+
case chartTypes.NormalizedStackLineChart:
|
|
14093
|
+
getLineShape(data, innerdiv, formatOptions);
|
|
14094
|
+
break;
|
|
14095
|
+
case chartTypes.AreaChart:
|
|
14096
|
+
case chartTypes.StackAreaChart:
|
|
14097
|
+
case chartTypes.NormalizedStackAreaChart:
|
|
14098
|
+
getAreaShape(data, innerdiv, formatOptions);
|
|
14099
|
+
break;
|
|
14100
|
+
}
|
|
14095
14101
|
}
|
|
14096
14102
|
let text = "";
|
|
14097
14103
|
{
|
|
@@ -14135,7 +14141,13 @@ function addDataTable(isFitChart, svg, currentTag, dataTable, colWidth, yAxis, x
|
|
|
14135
14141
|
dataTable.forEach((data, i) => {
|
|
14136
14142
|
yCordinate = yCordinate + (!formatOptions.dataTableProperties.dataTableAxisLabel && i === 0 ? 0 : cellHeight);
|
|
14137
14143
|
cellHeight = data.properties.height;
|
|
14138
|
-
|
|
14144
|
+
if (formatOptions.dataTableProperties.dataTableLegends) {
|
|
14145
|
+
if (!isFitChart) {
|
|
14146
|
+
getLegendsAppended(tag, i, data, cellHeight);
|
|
14147
|
+
} else {
|
|
14148
|
+
getLegendsAppended(tag, i, data, cellHeight);
|
|
14149
|
+
}
|
|
14150
|
+
}
|
|
14139
14151
|
let parentTag = tag.append("g").attr("class", "dataTableBorder").selectAll("#scaling-svg" + chartId + " .foreignObject").data((d, pos) => data["data"]).enter().filter((d) => xAxis(d.dimension)).append("g").attr("fill", commonColors.transparent).attr(
|
|
14140
14152
|
"transform",
|
|
14141
14153
|
(d, index2) => `translate(${index2 === 0 ? 0 : xAxis(d.dimension) - cellWidth / 2},0)`
|
|
@@ -14532,11 +14544,11 @@ function getBorderStyle(formatOptions, position, currentCellIndex, totalDimensio
|
|
|
14532
14544
|
borderStyle = `solid solid solid solid`;
|
|
14533
14545
|
borderColor = `black black black black`;
|
|
14534
14546
|
} else if (outerBorder && !innerHorizontalBorder && !innerVerticalBorder) {
|
|
14535
|
-
borderWidth = `${
|
|
14547
|
+
borderWidth = `${outerBorderLineWidth}px ${0}px ${0}px ${outerBorderLineWidth}px`;
|
|
14536
14548
|
borderStyle = `${outerBorderLineStyle} solid solid ${outerBorderLineStyle}`;
|
|
14537
14549
|
borderColor = `${outerBorderLineColor} black black ${outerBorderLineColor}`;
|
|
14538
14550
|
} else if (outerBorder && !innerHorizontalBorder && innerVerticalBorder) {
|
|
14539
|
-
borderWidth = `${
|
|
14551
|
+
borderWidth = `${outerBorderLineWidth}px ${0}px ${0}px ${outerBorderLineWidth}px`;
|
|
14540
14552
|
borderStyle = `${outerBorderLineStyle} ${innerVerticalBorderLineStyle} solid ${outerBorderLineStyle}`;
|
|
14541
14553
|
borderColor = `${outerBorderLineColor} ${innerVerticalBorderLineColor} black ${outerBorderLineColor}`;
|
|
14542
14554
|
} else if (outerBorder && innerHorizontalBorder && innerVerticalBorder) {
|
|
@@ -20856,7 +20868,7 @@ function initYaxis(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, inne
|
|
|
20856
20868
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
20857
20869
|
);
|
|
20858
20870
|
const yAxisG = gTag.append("g").call(yAxisLeft);
|
|
20859
|
-
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em")
|
|
20871
|
+
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em");
|
|
20860
20872
|
yAxisG.selectAll("text").style(
|
|
20861
20873
|
"fill",
|
|
20862
20874
|
formatOptions.yAxisLabel.yAxisLabelColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisLabelColor : "none"
|
|
@@ -22110,7 +22122,7 @@ const LineChart = ({
|
|
|
22110
22122
|
void 0,
|
|
22111
22123
|
void 0,
|
|
22112
22124
|
dataTableHeight,
|
|
22113
|
-
|
|
22125
|
+
chartType,
|
|
22114
22126
|
formatOptions,
|
|
22115
22127
|
yLabel,
|
|
22116
22128
|
yTitle,
|
|
@@ -22648,7 +22660,7 @@ const StackLineChart = ({
|
|
|
22648
22660
|
void 0,
|
|
22649
22661
|
void 0,
|
|
22650
22662
|
dataTableHeight,
|
|
22651
|
-
|
|
22663
|
+
chartTypes.LineChart,
|
|
22652
22664
|
formatOptions,
|
|
22653
22665
|
yLabel,
|
|
22654
22666
|
yTitle,
|
|
@@ -23176,7 +23188,7 @@ const NormalisedStackLineChart = ({
|
|
|
23176
23188
|
void 0,
|
|
23177
23189
|
void 0,
|
|
23178
23190
|
dataTableHeight,
|
|
23179
|
-
|
|
23191
|
+
chartTypes.LineChart,
|
|
23180
23192
|
formatOptions,
|
|
23181
23193
|
yLabel,
|
|
23182
23194
|
yTitle,
|
|
@@ -23396,28 +23408,32 @@ const HorizontalBarChart = ({
|
|
|
23396
23408
|
innerWidth2,
|
|
23397
23409
|
innerHeight2
|
|
23398
23410
|
);
|
|
23399
|
-
|
|
23400
|
-
|
|
23401
|
-
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
|
|
23420
|
-
|
|
23411
|
+
if (formatOptions.xAxisLabel.xAxisPosition != "1") {
|
|
23412
|
+
yAxistitle$1(
|
|
23413
|
+
innerHeight2,
|
|
23414
|
+
formatOptions,
|
|
23415
|
+
dataTableHeight,
|
|
23416
|
+
barChart,
|
|
23417
|
+
svg,
|
|
23418
|
+
margin,
|
|
23419
|
+
yTitle,
|
|
23420
|
+
yLabel,
|
|
23421
|
+
innerWidth2
|
|
23422
|
+
);
|
|
23423
|
+
}
|
|
23424
|
+
if (formatOptions.xAxisLabel.xAxisPosition == "1") {
|
|
23425
|
+
yAxistitleRight(
|
|
23426
|
+
svg,
|
|
23427
|
+
isSecondaryAxisDrawn,
|
|
23428
|
+
margin,
|
|
23429
|
+
formatOptions,
|
|
23430
|
+
dataTableHeight,
|
|
23431
|
+
innerHeight2,
|
|
23432
|
+
innerWidth2,
|
|
23433
|
+
secondaryYLabel,
|
|
23434
|
+
secondaryAxisTitleWidth
|
|
23435
|
+
);
|
|
23436
|
+
}
|
|
23421
23437
|
setChartTitle(svg, formatOptions, width, chartTitleHeight);
|
|
23422
23438
|
drawLegends(
|
|
23423
23439
|
height,
|
|
@@ -26677,7 +26693,7 @@ const AreaChart = ({
|
|
|
26677
26693
|
void 0,
|
|
26678
26694
|
void 0,
|
|
26679
26695
|
dataTableHeight,
|
|
26680
|
-
|
|
26696
|
+
chartType,
|
|
26681
26697
|
formatOptions,
|
|
26682
26698
|
yLabel,
|
|
26683
26699
|
yTitle,
|
|
@@ -53787,7 +53803,7 @@ const BubbleChart = ({
|
|
|
53787
53803
|
let tempLegendEntries = legendEntries;
|
|
53788
53804
|
maxLegendDimensions = calculateLegendsMaxPossibleWidth(
|
|
53789
53805
|
chartFormatOptions,
|
|
53790
|
-
tempLegendEntries,
|
|
53806
|
+
tempLegendEntries ?? [],
|
|
53791
53807
|
"alias"
|
|
53792
53808
|
);
|
|
53793
53809
|
let convertedData = convertIncomingData(data);
|
|
@@ -53871,6 +53887,18 @@ const BubbleChart = ({
|
|
|
53871
53887
|
drawReferenceLines();
|
|
53872
53888
|
initLegendList();
|
|
53873
53889
|
initCircles();
|
|
53890
|
+
setnumberOfBubbles(
|
|
53891
|
+
svg,
|
|
53892
|
+
chartFormatOptions.legends.legendPosition,
|
|
53893
|
+
chartFormatOptions,
|
|
53894
|
+
height,
|
|
53895
|
+
width,
|
|
53896
|
+
margins,
|
|
53897
|
+
innerHeight2,
|
|
53898
|
+
xTitle,
|
|
53899
|
+
xLabel,
|
|
53900
|
+
data.length
|
|
53901
|
+
);
|
|
53874
53902
|
};
|
|
53875
53903
|
const initCircles = () => {
|
|
53876
53904
|
try {
|
|
@@ -54019,7 +54047,7 @@ const BubbleChart = ({
|
|
|
54019
54047
|
formatOptions.xAxisLabel.xAxisLabelDecimalPrecision ?? "2"
|
|
54020
54048
|
)
|
|
54021
54049
|
).tickSize(
|
|
54022
|
-
|
|
54050
|
+
getVerticalGridLinesTickSize(formatOptions, innerHeight2, 0)
|
|
54023
54051
|
).tickValues(autoLabelFlag ? void 0 : xAxisLabelArray.length > 0 ? xAxisLabelArray : null).ticks(customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
54024
54052
|
initXaxis(
|
|
54025
54053
|
chartAreaTagG,
|
|
@@ -54115,7 +54143,7 @@ const BubbleChart = ({
|
|
|
54115
54143
|
};
|
|
54116
54144
|
const initLegendList = () => {
|
|
54117
54145
|
try {
|
|
54118
|
-
let tempLegendEntries = legendEntries
|
|
54146
|
+
let tempLegendEntries = legendEntries?.map((d) => {
|
|
54119
54147
|
let modifiedProperties = {
|
|
54120
54148
|
...d,
|
|
54121
54149
|
legendFontStyle: d.fontStyle,
|
|
@@ -54131,7 +54159,7 @@ const BubbleChart = ({
|
|
|
54131
54159
|
initLegendListWithTotalValueAllowance(
|
|
54132
54160
|
chartFormatOptions,
|
|
54133
54161
|
svg,
|
|
54134
|
-
tempLegendEntries,
|
|
54162
|
+
tempLegendEntries || [],
|
|
54135
54163
|
width,
|
|
54136
54164
|
height,
|
|
54137
54165
|
maxLegendDimensions[0],
|
|
@@ -11449,7 +11449,10 @@
|
|
|
11449
11449
|
dataTableDecimalPrecision: "2",
|
|
11450
11450
|
dataTableDisplayUnits: "None",
|
|
11451
11451
|
dataTableLabelColor: commonColors.black,
|
|
11452
|
-
dataTableAxisLabel: true
|
|
11452
|
+
dataTableAxisLabel: true,
|
|
11453
|
+
dataTableLegends: true,
|
|
11454
|
+
disableLegendIcon: true,
|
|
11455
|
+
legendsWrapText: false
|
|
11453
11456
|
},
|
|
11454
11457
|
dataTableOuterBorder: {
|
|
11455
11458
|
borderButtonVisibility: true,
|
|
@@ -11712,6 +11715,7 @@
|
|
|
11712
11715
|
const yAxisRelatedMargin = isBarChart ? metrics.xTitle + metrics.xLabel : metrics.yTitle + metrics.yLabel;
|
|
11713
11716
|
const legendPosition = formatOptions.legends.legendPosition;
|
|
11714
11717
|
const legendVisibility = formatOptions.legends.legendVisibility;
|
|
11718
|
+
const yAxisPosition = formatOptions.xAxisLabel.xAxisPosition;
|
|
11715
11719
|
let left2 = 0;
|
|
11716
11720
|
let right2 = 0;
|
|
11717
11721
|
const secondaryExtra = isSecondaryAxisDrawn ? metrics.secondaryYLabel + metrics.secondaryAxisTitleWidth : 0;
|
|
@@ -11722,16 +11726,16 @@
|
|
|
11722
11726
|
left2 = yAxisRelatedMargin + 5;
|
|
11723
11727
|
break;
|
|
11724
11728
|
case staticLegendPosition.top:
|
|
11725
|
-
right2 = 15 + secondaryExtra;
|
|
11726
|
-
left2 = yAxisRelatedMargin + 5;
|
|
11729
|
+
right2 = yAxisPosition == "1" ? yAxisRelatedMargin + 5 : 15 + secondaryExtra;
|
|
11730
|
+
left2 = yAxisPosition == "1" ? 15 + secondaryExtra : yAxisRelatedMargin + 5;
|
|
11727
11731
|
break;
|
|
11728
11732
|
case staticLegendPosition.right:
|
|
11729
|
-
right2 = metrics.legendMargin + secondaryExtra + 35;
|
|
11730
|
-
left2 = yAxisRelatedMargin + 5;
|
|
11733
|
+
right2 = yAxisPosition == "1" ? yAxisRelatedMargin + 5 + metrics.legendMargin : metrics.legendMargin + secondaryExtra + 35;
|
|
11734
|
+
left2 = yAxisPosition == "1" ? 15 + secondaryExtra + metrics.legendMargin : yAxisRelatedMargin + 5;
|
|
11731
11735
|
break;
|
|
11732
11736
|
case staticLegendPosition.bottom:
|
|
11733
|
-
right2 = 15 + secondaryExtra;
|
|
11734
|
-
left2 = yAxisRelatedMargin + 5;
|
|
11737
|
+
right2 = yAxisPosition == "1" ? yAxisRelatedMargin + 5 : 15 + secondaryExtra;
|
|
11738
|
+
left2 = yAxisPosition == "1" ? 15 + secondaryExtra : yAxisRelatedMargin + 5;
|
|
11735
11739
|
break;
|
|
11736
11740
|
case staticLegendPosition.left:
|
|
11737
11741
|
left2 = metrics.legendMargin + yAxisRelatedMargin + 33;
|
|
@@ -12462,7 +12466,7 @@
|
|
|
12462
12466
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
12463
12467
|
);
|
|
12464
12468
|
const yAxisG = gTag.append("g").call(yAxisLeft);
|
|
12465
|
-
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em")
|
|
12469
|
+
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em");
|
|
12466
12470
|
yAxisG.selectAll("text").style(
|
|
12467
12471
|
"fill",
|
|
12468
12472
|
formatOptions.yAxisLabel.yAxisLabelColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisLabelColor : "none"
|
|
@@ -14038,7 +14042,7 @@
|
|
|
14038
14042
|
if (i == 0) {
|
|
14039
14043
|
temp.append("foreignObject").attr("x", -margin.left).attr("y", tableStartY).attr("class", "blankClass").attr("width", margin.left).attr("height", 20).append("xhtml:div").style("width", margin.left).style("height", `${20}px`).style(
|
|
14040
14044
|
"border-width",
|
|
14041
|
-
outerBorder ? `0px ${0}px ${outerBorderLineWidth}px 0px` : "0px 0px 0px 0px"
|
|
14045
|
+
outerBorder ? `0px ${0}px ${!formatOptions.dataTableProperties.dataTableAxisLabel ? 0 : outerBorderLineWidth}px 0px` : "0px 0px 0px 0px"
|
|
14042
14046
|
).style(
|
|
14043
14047
|
"border-style",
|
|
14044
14048
|
outerBorder ? `solid ${outerBorderLineStyle} ${outerBorderLineStyle} solid` : "solid solid solid solid"
|
|
@@ -14048,7 +14052,7 @@
|
|
|
14048
14052
|
).style("text-align", "center").style("vertical-align", "middle").text("");
|
|
14049
14053
|
}
|
|
14050
14054
|
let legendsParentTag = temp.append("foreignObject").attr("x", -margin.left).attr("y", tableStartY + yCordinate).attr("width", margin.left).attr("height", cellHeight2);
|
|
14051
|
-
let innerdiv = legendsParentTag.append("xhtml:div").style("display", "flex").style("justify-content", "flex-start").style("align-items", "center").attr("class", "parentClass").style("flex-wrap", "nowrap").style("pointer-events", "auto").style("width", cellWidth).style("height", `${cellHeight2}px`).style("padding-left", `5px`).style("padding-right", `3px`).style(
|
|
14055
|
+
let innerdiv = legendsParentTag.append("xhtml:div").style("display", "flex").style("justify-content", "flex-start").style("align-items", "center").attr("class", "parentClass").style("flex-wrap", "nowrap").style("pointer-events", "auto").style("width", cellWidth).style("height", `${cellHeight2}px`).style("padding-left", formatOptions.dataTableProperties.disableLegendIcon ? `2px` : `5px`).style("padding-right", `3px`).style(
|
|
14052
14056
|
"border-width",
|
|
14053
14057
|
getBorderStyle(
|
|
14054
14058
|
formatOptions,
|
|
@@ -14079,22 +14083,24 @@
|
|
|
14079
14083
|
"color"
|
|
14080
14084
|
)
|
|
14081
14085
|
);
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14091
|
-
|
|
14092
|
-
|
|
14093
|
-
|
|
14094
|
-
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
|
|
14086
|
+
if (!formatOptions.dataTableProperties.disableLegendIcon) {
|
|
14087
|
+
switch (chartType) {
|
|
14088
|
+
case chartTypes.ColumnChart:
|
|
14089
|
+
case chartTypes.StackColumnChart:
|
|
14090
|
+
case chartTypes.NormalizedStackColumnChart:
|
|
14091
|
+
innerdiv.append("xhtml:div").style("height", "10px").style("width", "15px").style("background", data.properties.color).style("border-radius", "1px");
|
|
14092
|
+
break;
|
|
14093
|
+
case chartTypes.LineChart:
|
|
14094
|
+
case chartTypes.StackLineChart:
|
|
14095
|
+
case chartTypes.NormalizedStackLineChart:
|
|
14096
|
+
getLineShape(data, innerdiv, formatOptions);
|
|
14097
|
+
break;
|
|
14098
|
+
case chartTypes.AreaChart:
|
|
14099
|
+
case chartTypes.StackAreaChart:
|
|
14100
|
+
case chartTypes.NormalizedStackAreaChart:
|
|
14101
|
+
getAreaShape(data, innerdiv, formatOptions);
|
|
14102
|
+
break;
|
|
14103
|
+
}
|
|
14098
14104
|
}
|
|
14099
14105
|
let text = "";
|
|
14100
14106
|
{
|
|
@@ -14138,7 +14144,13 @@
|
|
|
14138
14144
|
dataTable.forEach((data, i) => {
|
|
14139
14145
|
yCordinate = yCordinate + (!formatOptions.dataTableProperties.dataTableAxisLabel && i === 0 ? 0 : cellHeight);
|
|
14140
14146
|
cellHeight = data.properties.height;
|
|
14141
|
-
|
|
14147
|
+
if (formatOptions.dataTableProperties.dataTableLegends) {
|
|
14148
|
+
if (!isFitChart) {
|
|
14149
|
+
getLegendsAppended(tag, i, data, cellHeight);
|
|
14150
|
+
} else {
|
|
14151
|
+
getLegendsAppended(tag, i, data, cellHeight);
|
|
14152
|
+
}
|
|
14153
|
+
}
|
|
14142
14154
|
let parentTag = tag.append("g").attr("class", "dataTableBorder").selectAll("#scaling-svg" + chartId + " .foreignObject").data((d, pos) => data["data"]).enter().filter((d) => xAxis(d.dimension)).append("g").attr("fill", commonColors.transparent).attr(
|
|
14143
14155
|
"transform",
|
|
14144
14156
|
(d, index2) => `translate(${index2 === 0 ? 0 : xAxis(d.dimension) - cellWidth / 2},0)`
|
|
@@ -14535,11 +14547,11 @@
|
|
|
14535
14547
|
borderStyle = `solid solid solid solid`;
|
|
14536
14548
|
borderColor = `black black black black`;
|
|
14537
14549
|
} else if (outerBorder && !innerHorizontalBorder && !innerVerticalBorder) {
|
|
14538
|
-
borderWidth = `${
|
|
14550
|
+
borderWidth = `${outerBorderLineWidth}px ${0}px ${0}px ${outerBorderLineWidth}px`;
|
|
14539
14551
|
borderStyle = `${outerBorderLineStyle} solid solid ${outerBorderLineStyle}`;
|
|
14540
14552
|
borderColor = `${outerBorderLineColor} black black ${outerBorderLineColor}`;
|
|
14541
14553
|
} else if (outerBorder && !innerHorizontalBorder && innerVerticalBorder) {
|
|
14542
|
-
borderWidth = `${
|
|
14554
|
+
borderWidth = `${outerBorderLineWidth}px ${0}px ${0}px ${outerBorderLineWidth}px`;
|
|
14543
14555
|
borderStyle = `${outerBorderLineStyle} ${innerVerticalBorderLineStyle} solid ${outerBorderLineStyle}`;
|
|
14544
14556
|
borderColor = `${outerBorderLineColor} ${innerVerticalBorderLineColor} black ${outerBorderLineColor}`;
|
|
14545
14557
|
} else if (outerBorder && innerHorizontalBorder && innerVerticalBorder) {
|
|
@@ -20859,7 +20871,7 @@
|
|
|
20859
20871
|
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
20860
20872
|
);
|
|
20861
20873
|
const yAxisG = gTag.append("g").call(yAxisLeft);
|
|
20862
|
-
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em")
|
|
20874
|
+
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em");
|
|
20863
20875
|
yAxisG.selectAll("text").style(
|
|
20864
20876
|
"fill",
|
|
20865
20877
|
formatOptions.yAxisLabel.yAxisLabelColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisLabelColor : "none"
|
|
@@ -22113,7 +22125,7 @@
|
|
|
22113
22125
|
void 0,
|
|
22114
22126
|
void 0,
|
|
22115
22127
|
dataTableHeight,
|
|
22116
|
-
|
|
22128
|
+
chartType,
|
|
22117
22129
|
formatOptions,
|
|
22118
22130
|
yLabel,
|
|
22119
22131
|
yTitle,
|
|
@@ -22651,7 +22663,7 @@
|
|
|
22651
22663
|
void 0,
|
|
22652
22664
|
void 0,
|
|
22653
22665
|
dataTableHeight,
|
|
22654
|
-
|
|
22666
|
+
chartTypes.LineChart,
|
|
22655
22667
|
formatOptions,
|
|
22656
22668
|
yLabel,
|
|
22657
22669
|
yTitle,
|
|
@@ -23179,7 +23191,7 @@
|
|
|
23179
23191
|
void 0,
|
|
23180
23192
|
void 0,
|
|
23181
23193
|
dataTableHeight,
|
|
23182
|
-
|
|
23194
|
+
chartTypes.LineChart,
|
|
23183
23195
|
formatOptions,
|
|
23184
23196
|
yLabel,
|
|
23185
23197
|
yTitle,
|
|
@@ -23399,28 +23411,32 @@
|
|
|
23399
23411
|
innerWidth2,
|
|
23400
23412
|
innerHeight2
|
|
23401
23413
|
);
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
|
|
23420
|
-
|
|
23421
|
-
|
|
23422
|
-
|
|
23423
|
-
|
|
23414
|
+
if (formatOptions.xAxisLabel.xAxisPosition != "1") {
|
|
23415
|
+
yAxistitle$1(
|
|
23416
|
+
innerHeight2,
|
|
23417
|
+
formatOptions,
|
|
23418
|
+
dataTableHeight,
|
|
23419
|
+
barChart,
|
|
23420
|
+
svg,
|
|
23421
|
+
margin,
|
|
23422
|
+
yTitle,
|
|
23423
|
+
yLabel,
|
|
23424
|
+
innerWidth2
|
|
23425
|
+
);
|
|
23426
|
+
}
|
|
23427
|
+
if (formatOptions.xAxisLabel.xAxisPosition == "1") {
|
|
23428
|
+
yAxistitleRight(
|
|
23429
|
+
svg,
|
|
23430
|
+
isSecondaryAxisDrawn,
|
|
23431
|
+
margin,
|
|
23432
|
+
formatOptions,
|
|
23433
|
+
dataTableHeight,
|
|
23434
|
+
innerHeight2,
|
|
23435
|
+
innerWidth2,
|
|
23436
|
+
secondaryYLabel,
|
|
23437
|
+
secondaryAxisTitleWidth
|
|
23438
|
+
);
|
|
23439
|
+
}
|
|
23424
23440
|
setChartTitle(svg, formatOptions, width, chartTitleHeight);
|
|
23425
23441
|
drawLegends(
|
|
23426
23442
|
height,
|
|
@@ -26680,7 +26696,7 @@
|
|
|
26680
26696
|
void 0,
|
|
26681
26697
|
void 0,
|
|
26682
26698
|
dataTableHeight,
|
|
26683
|
-
|
|
26699
|
+
chartType,
|
|
26684
26700
|
formatOptions,
|
|
26685
26701
|
yLabel,
|
|
26686
26702
|
yTitle,
|
|
@@ -53790,7 +53806,7 @@
|
|
|
53790
53806
|
let tempLegendEntries = legendEntries;
|
|
53791
53807
|
maxLegendDimensions = calculateLegendsMaxPossibleWidth(
|
|
53792
53808
|
chartFormatOptions,
|
|
53793
|
-
tempLegendEntries,
|
|
53809
|
+
tempLegendEntries ?? [],
|
|
53794
53810
|
"alias"
|
|
53795
53811
|
);
|
|
53796
53812
|
let convertedData = convertIncomingData(data);
|
|
@@ -53874,6 +53890,18 @@
|
|
|
53874
53890
|
drawReferenceLines();
|
|
53875
53891
|
initLegendList();
|
|
53876
53892
|
initCircles();
|
|
53893
|
+
setnumberOfBubbles(
|
|
53894
|
+
svg,
|
|
53895
|
+
chartFormatOptions.legends.legendPosition,
|
|
53896
|
+
chartFormatOptions,
|
|
53897
|
+
height,
|
|
53898
|
+
width,
|
|
53899
|
+
margins,
|
|
53900
|
+
innerHeight2,
|
|
53901
|
+
xTitle,
|
|
53902
|
+
xLabel,
|
|
53903
|
+
data.length
|
|
53904
|
+
);
|
|
53877
53905
|
};
|
|
53878
53906
|
const initCircles = () => {
|
|
53879
53907
|
try {
|
|
@@ -54022,7 +54050,7 @@
|
|
|
54022
54050
|
formatOptions.xAxisLabel.xAxisLabelDecimalPrecision ?? "2"
|
|
54023
54051
|
)
|
|
54024
54052
|
).tickSize(
|
|
54025
|
-
|
|
54053
|
+
getVerticalGridLinesTickSize(formatOptions, innerHeight2, 0)
|
|
54026
54054
|
).tickValues(autoLabelFlag ? void 0 : xAxisLabelArray.length > 0 ? xAxisLabelArray : null).ticks(customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
54027
54055
|
initXaxis(
|
|
54028
54056
|
chartAreaTagG,
|
|
@@ -54118,7 +54146,7 @@
|
|
|
54118
54146
|
};
|
|
54119
54147
|
const initLegendList = () => {
|
|
54120
54148
|
try {
|
|
54121
|
-
let tempLegendEntries = legendEntries
|
|
54149
|
+
let tempLegendEntries = legendEntries?.map((d) => {
|
|
54122
54150
|
let modifiedProperties = {
|
|
54123
54151
|
...d,
|
|
54124
54152
|
legendFontStyle: d.fontStyle,
|
|
@@ -54134,7 +54162,7 @@
|
|
|
54134
54162
|
initLegendListWithTotalValueAllowance(
|
|
54135
54163
|
chartFormatOptions,
|
|
54136
54164
|
svg,
|
|
54137
|
-
tempLegendEntries,
|
|
54165
|
+
tempLegendEntries || [],
|
|
54138
54166
|
width,
|
|
54139
54167
|
height,
|
|
54140
54168
|
maxLegendDimensions[0],
|