pace-chart-lib 1.0.65 → 1.0.66
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 +62 -49
- package/dist/pace-chart-lib.umd.js +62 -49
- package/package.json +1 -1
|
@@ -13097,7 +13097,7 @@ function setChartTitle(svg, formatOptions, width, chartTitleHeight) {
|
|
|
13097
13097
|
let object2 = svg.append("foreignObject").attr(
|
|
13098
13098
|
"visibility",
|
|
13099
13099
|
formatOptions.chartTitle.chartTitleVisibility ? "visible" : "hidden"
|
|
13100
|
-
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", width).attr("height", chartTitleHeight + "px");
|
|
13100
|
+
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", width - 4).attr("height", chartTitleHeight + "px");
|
|
13101
13101
|
const parseHTMLText = (html) => {
|
|
13102
13102
|
const temp = document.createElement("div");
|
|
13103
13103
|
temp.innerHTML = html;
|
|
@@ -21000,19 +21000,20 @@ function marginCalculationForBubbleScatter(width, height, maxMeasure, formatOpti
|
|
|
21000
21000
|
let maxLegendWidth = maxLegendDimensions[0];
|
|
21001
21001
|
let legendMargin = width15Percent < maxLegendWidth + 10 ? width15Percent : maxLegendWidth + 10;
|
|
21002
21002
|
let totalHeight = formatOptions.plotArea.numberOfBubbles ? 20 : 0;
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
|
|
21009
|
-
|
|
21010
|
-
|
|
21011
|
-
|
|
21003
|
+
const maxDim = getNumberWithFormatFunction(
|
|
21004
|
+
formatOptions.xAxisLabel.xAxisDisplayUnits,
|
|
21005
|
+
formatOptions.xAxisLabel.xAxisNumberFormat,
|
|
21006
|
+
formatOptions.xAxisLabel.xAxisLabelDecimalPrecision ?? "2"
|
|
21007
|
+
)(
|
|
21008
|
+
maxDimension
|
|
21009
|
+
).toString();
|
|
21010
|
+
let dimensionHeightWidth = calculateWidthHeightDynamically(
|
|
21011
|
+
maxDim,
|
|
21012
|
+
formatOptions.xAxisLabel.xAxisLabelFontSize,
|
|
21012
21013
|
formatOptions.xAxisLabel.xAxisLabelFontFamily,
|
|
21013
21014
|
formatOptions.xAxisLabel.xAxisLabelRotation
|
|
21014
21015
|
);
|
|
21015
|
-
let maxDimensionWidth = dimensionHeightWidth
|
|
21016
|
+
let maxDimensionWidth = dimensionHeightWidth[3] + 10;
|
|
21016
21017
|
let xTitle = formatOptions.xAxisTitle.xAxisTitleVisibility ? formatOptions.xAxisTitle.xAxisDynamicTitleText.length !== 0 ? preCalculateTextDimensions(
|
|
21017
21018
|
formatOptions.xAxisTitle.xAxisTitleHTML,
|
|
21018
21019
|
void 0,
|
|
@@ -54343,6 +54344,7 @@ const OrganizationChart = ({
|
|
|
54343
54344
|
};
|
|
54344
54345
|
const dataPreparation = () => {
|
|
54345
54346
|
try {
|
|
54347
|
+
const sortType = formatOptions?.plotArea?.sortBy ?? "default";
|
|
54346
54348
|
chartDirection = chartFormatOptions.plotArea.chartDirection || orgChartDirection.left;
|
|
54347
54349
|
var sum2 = 0;
|
|
54348
54350
|
var absoluteSum = 0;
|
|
@@ -54353,12 +54355,17 @@ const OrganizationChart = ({
|
|
|
54353
54355
|
let tempData = getFlattenedData(rootNode).filter(
|
|
54354
54356
|
(data2) => data2.value !== null
|
|
54355
54357
|
);
|
|
54358
|
+
if (sortType !== "default") {
|
|
54359
|
+
tempData = tempData.sort(
|
|
54360
|
+
(a2, b) => sortType === "asc" ? a2.value - b.value : b.value - a2.value
|
|
54361
|
+
);
|
|
54362
|
+
}
|
|
54356
54363
|
createIdIndexMap(tempData);
|
|
54357
54364
|
generateUID(tempData);
|
|
54358
54365
|
chartData = addStyleObjectToChartData(tempData);
|
|
54359
54366
|
if (chartFormatOptions.heatMap.showHeatMap) {
|
|
54360
54367
|
heatMapScale = sequential().domain([minMeasure, maxMeasure]).interpolator(
|
|
54361
|
-
interpolateRgb$1(chartFormatOptions.heatMap.
|
|
54368
|
+
interpolateRgb$1(chartFormatOptions.heatMap.heatMapMinColor, chartFormatOptions.heatMap.heatMapMaxColor)
|
|
54362
54369
|
);
|
|
54363
54370
|
}
|
|
54364
54371
|
} catch (error) {
|
|
@@ -55383,6 +55390,15 @@ const ScatterChart = ({
|
|
|
55383
55390
|
));
|
|
55384
55391
|
initSvg(svgRef, width, height, chartFormatOptions);
|
|
55385
55392
|
chartAreaTagG = initChartArea(svg, margins);
|
|
55393
|
+
initPlotArea(
|
|
55394
|
+
chartAreaTagG,
|
|
55395
|
+
formatOptions,
|
|
55396
|
+
0,
|
|
55397
|
+
innerWidth2,
|
|
55398
|
+
innerHeight2,
|
|
55399
|
+
"Scatter",
|
|
55400
|
+
chartId
|
|
55401
|
+
);
|
|
55386
55402
|
drawChartTitle(svgRef, chartTitleHeight, width, chartFormatOptions);
|
|
55387
55403
|
initScale();
|
|
55388
55404
|
drawXAxis();
|
|
@@ -55529,11 +55545,8 @@ const ScatterChart = ({
|
|
|
55529
55545
|
};
|
|
55530
55546
|
const initScale = () => {
|
|
55531
55547
|
try {
|
|
55532
|
-
let xStartValue = chartFormatOptions.xAxisLabel.xAxisIntervalsVisibility && chartFormatOptions.xAxisLabel.xAxisMinText !== "" ? parseFloat(chartFormatOptions.xAxisLabel.xAxisMinText) : minDimension > 0 ? 0 : minDimension * 1.1;
|
|
55533
|
-
let xEndValue = chartFormatOptions.xAxisLabel.xAxisIntervalsVisibility && chartFormatOptions.xAxisLabel.xAxisMaxText !== "" ? parseFloat(chartFormatOptions.xAxisLabel.xAxisMaxText) : maxDimension * 1.1;
|
|
55534
55548
|
let yStartValue = chartFormatOptions.yAxisLabel.yAxisIntervalsVisibility && chartFormatOptions.yAxisLabel.yAxisMinText !== "" ? parseFloat(chartFormatOptions.yAxisLabel.yAxisMinText) : minMeasure > 0 ? 0 : minMeasure * 1.1;
|
|
55535
55549
|
let yEndValue = chartFormatOptions.yAxisLabel.yAxisIntervalsVisibility && chartFormatOptions.yAxisLabel.yAxisMaxText !== "" ? parseFloat(chartFormatOptions.yAxisLabel.yAxisMaxText) : maxMeasure * 1.1;
|
|
55536
|
-
xScale = linear$1().domain([xStartValue, xEndValue]).range([0, innerWidth2]);
|
|
55537
55550
|
yScale = linear$1().domain([yStartValue, yEndValue]).range([innerHeight2, 0]);
|
|
55538
55551
|
sizeScale = linear$1().domain([sizeValueMin, sizeValueMax]).range([1, 10]);
|
|
55539
55552
|
} catch (e) {
|
|
@@ -55542,6 +55555,8 @@ const ScatterChart = ({
|
|
|
55542
55555
|
};
|
|
55543
55556
|
const drawXAxis = () => {
|
|
55544
55557
|
try {
|
|
55558
|
+
const tickHeightPercentage = parseFloat(formatOptions.plotArea.ticksHeight) || 100;
|
|
55559
|
+
const tickSize = tickHeightPercentage / 100 * innerHeight2;
|
|
55545
55560
|
let { xAxisLabelArray, customTickValue } = responsiveXaxisLabelForNumericValue(
|
|
55546
55561
|
maxDimension,
|
|
55547
55562
|
minDimension,
|
|
@@ -55552,6 +55567,11 @@ const ScatterChart = ({
|
|
|
55552
55567
|
innerHeight2,
|
|
55553
55568
|
false
|
|
55554
55569
|
);
|
|
55570
|
+
if (xAxisLabelArray.length > 0) {
|
|
55571
|
+
xScale = linear$1().domain([xAxisLabelArray[0], xAxisLabelArray[xAxisLabelArray.length - 1]]).range([0, innerWidth2]);
|
|
55572
|
+
} else {
|
|
55573
|
+
xScale = linear$1().domain([customXaxisMinValue, customXaxisMaxValue]).range([0, innerWidth2]);
|
|
55574
|
+
}
|
|
55555
55575
|
const xAxis = axisBottom(xScale).tickFormat(
|
|
55556
55576
|
getNumberWithFormatFunction(
|
|
55557
55577
|
formatOptions.xAxisLabel.xAxisDisplayUnits,
|
|
@@ -55559,7 +55579,7 @@ const ScatterChart = ({
|
|
|
55559
55579
|
formatOptions.xAxisLabel.xAxisLabelDecimalPrecision ?? "2"
|
|
55560
55580
|
)
|
|
55561
55581
|
).tickSize(
|
|
55562
|
-
chartFormatOptions.plotArea.gridLinesVisibility ? chartFormatOptions.plotArea.gridLinesVertical ? chartFormatOptions.xAxisLabel.xAxisPosition === "0" ? -
|
|
55582
|
+
chartFormatOptions.plotArea.gridLinesVisibility ? chartFormatOptions.plotArea.gridLinesVertical ? chartFormatOptions.xAxisLabel.xAxisPosition === "0" ? -tickSize : chartFormatOptions.xAxisLabel.xAxisPosition === "1" ? tickSize : 0 : 0 : 0
|
|
55563
55583
|
).tickValues(xAxisLabelArray.length > 0 ? xAxisLabelArray : null).ticks(customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
55564
55584
|
initXaxis(
|
|
55565
55585
|
chartAreaTagG,
|
|
@@ -55578,6 +55598,8 @@ const ScatterChart = ({
|
|
|
55578
55598
|
};
|
|
55579
55599
|
const drawYAxis = () => {
|
|
55580
55600
|
try {
|
|
55601
|
+
const tickWidthPercentage = parseFloat(formatOptions.plotArea.ticksWidth) || 100;
|
|
55602
|
+
const tickSize = tickWidthPercentage / 100 * innerWidth2;
|
|
55581
55603
|
let { yAxisLabelArray, customTickValue } = responsiveYaxisLabel(
|
|
55582
55604
|
maxMeasure,
|
|
55583
55605
|
minMeasure,
|
|
@@ -55593,7 +55615,7 @@ const ScatterChart = ({
|
|
|
55593
55615
|
formatOptions.yAxisLabel.yAxisLabelDecimalPrecision ?? "2"
|
|
55594
55616
|
)
|
|
55595
55617
|
).tickSize(
|
|
55596
|
-
chartFormatOptions.plotArea.gridLinesVisibility ? chartFormatOptions.plotArea.gridLinesHorizontal ? -
|
|
55618
|
+
chartFormatOptions.plotArea.gridLinesVisibility ? chartFormatOptions.plotArea.gridLinesHorizontal ? -tickSize : 0 : 0
|
|
55597
55619
|
).tickValues(yAxisLabelArray.length > 0 ? yAxisLabelArray : null).ticks(customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
55598
55620
|
initYaxis(
|
|
55599
55621
|
chartAreaTagG,
|
|
@@ -55776,10 +55798,12 @@ const ScatterChart = ({
|
|
|
55776
55798
|
).style("flex-wrap", "nowrap").style("padding-left", "3px");
|
|
55777
55799
|
ColorList.forEach((d, i) => {
|
|
55778
55800
|
let innerdiv = div.append("div").style("display", "inline-flex").style("justify-content", "flex-start").style("align-items", "center").style("margin", "3px 0px").style("width", "fit-content").style("flex-wrap", "nowrap").style("white-space", "nowrap").style("font-size", chartFormatOptions.legends.legendFontSize + "px").style("font-family", chartFormatOptions.legends.legendFontFamily).on("mousemove", function(d2) {
|
|
55779
|
-
|
|
55780
|
-
|
|
55781
|
-
|
|
55782
|
-
|
|
55801
|
+
if (chartFormatOptions.legends.onHoverEffect) {
|
|
55802
|
+
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
55803
|
+
svg.selectAll(
|
|
55804
|
+
'[colorId="' + getJQuerySelector2(this.textContent.replace(/ /g, "-")) + '"]'
|
|
55805
|
+
).classed("highlight", true).classed("unhighlight", false);
|
|
55806
|
+
}
|
|
55783
55807
|
}).on("mouseout", function(d2) {
|
|
55784
55808
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
55785
55809
|
svg.selectAll(
|
|
@@ -55862,35 +55886,24 @@ const ScatterChart = ({
|
|
|
55862
55886
|
logError$2(fileName, "shapeListWithScroll", e);
|
|
55863
55887
|
}
|
|
55864
55888
|
};
|
|
55865
|
-
const shapesForScatterPlot = (innerdiv,
|
|
55889
|
+
const shapesForScatterPlot = (innerdiv, shape) => {
|
|
55866
55890
|
try {
|
|
55867
|
-
|
|
55868
|
-
|
|
55869
|
-
|
|
55870
|
-
|
|
55871
|
-
|
|
55872
|
-
|
|
55873
|
-
|
|
55874
|
-
|
|
55875
|
-
|
|
55876
|
-
|
|
55877
|
-
|
|
55878
|
-
|
|
55879
|
-
|
|
55880
|
-
|
|
55881
|
-
|
|
55882
|
-
|
|
55883
|
-
innerdiv.append("div").style("height", "10px").style("width", "10px").style("background", "black").style("border-radius", "1px").style("transform", "rotate(45deg)");
|
|
55884
|
-
break;
|
|
55885
|
-
case "star":
|
|
55886
|
-
innerdiv.append("div").style("border-left", "6px solid transparent").style("border-right", "6px solid transparent").style("border-bottom", "10px solid black").style("position", "relative").style("top", "-2px").style("transform", "rotate(0deg)").append("div").style("border-left", "6px solid transparent").style("border-right", "6px solid transparent").style("border-top", "10px solid black").style("position", "absolute").style("top", "2px").style("left", "-5.5px").style("transform", "rotate(360deg)");
|
|
55887
|
-
break;
|
|
55888
|
-
case "wye":
|
|
55889
|
-
innerdiv.append("div").style("height", "6.5px").style("width", "3px").style("background", "black").append("div").style("height", "5px").style("width", "3px").style("background", "black").style("transform", "rotate(-55deg)").style("position", "relative").style("top", "-2px").style("left", "-2px").append("div").style("height", "5px").style("width", "3px").style("background", "black").style("transform", "rotate(108deg)").style("position", "relative").style("top", "3px").style("left", "2px");
|
|
55890
|
-
break;
|
|
55891
|
-
default:
|
|
55892
|
-
break;
|
|
55893
|
-
}
|
|
55891
|
+
const symbolMap = {
|
|
55892
|
+
none: circle,
|
|
55893
|
+
circle,
|
|
55894
|
+
square,
|
|
55895
|
+
triangle,
|
|
55896
|
+
cross,
|
|
55897
|
+
diamond,
|
|
55898
|
+
star,
|
|
55899
|
+
wye
|
|
55900
|
+
};
|
|
55901
|
+
const symbolType = symbolMap[shape?.toLowerCase()] || circle;
|
|
55902
|
+
const size = 80;
|
|
55903
|
+
innerdiv.append("svg").attr("width", 14).attr("height", 14).append("path").attr(
|
|
55904
|
+
"d",
|
|
55905
|
+
Symbol$1().type(symbolType).size(size)()
|
|
55906
|
+
).attr("transform", "translate(7,7)").attr("fill", "black");
|
|
55894
55907
|
} catch (error) {
|
|
55895
55908
|
logError$2(fileName, "shapesForScatterPlot", error);
|
|
55896
55909
|
}
|
|
@@ -13100,7 +13100,7 @@
|
|
|
13100
13100
|
let object2 = svg.append("foreignObject").attr(
|
|
13101
13101
|
"visibility",
|
|
13102
13102
|
formatOptions.chartTitle.chartTitleVisibility ? "visible" : "hidden"
|
|
13103
|
-
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", width).attr("height", chartTitleHeight + "px");
|
|
13103
|
+
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", width - 4).attr("height", chartTitleHeight + "px");
|
|
13104
13104
|
const parseHTMLText = (html) => {
|
|
13105
13105
|
const temp = document.createElement("div");
|
|
13106
13106
|
temp.innerHTML = html;
|
|
@@ -21003,19 +21003,20 @@
|
|
|
21003
21003
|
let maxLegendWidth = maxLegendDimensions[0];
|
|
21004
21004
|
let legendMargin = width15Percent < maxLegendWidth + 10 ? width15Percent : maxLegendWidth + 10;
|
|
21005
21005
|
let totalHeight = formatOptions.plotArea.numberOfBubbles ? 20 : 0;
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
|
|
21009
|
-
|
|
21010
|
-
|
|
21011
|
-
|
|
21012
|
-
|
|
21013
|
-
|
|
21014
|
-
|
|
21006
|
+
const maxDim = getNumberWithFormatFunction(
|
|
21007
|
+
formatOptions.xAxisLabel.xAxisDisplayUnits,
|
|
21008
|
+
formatOptions.xAxisLabel.xAxisNumberFormat,
|
|
21009
|
+
formatOptions.xAxisLabel.xAxisLabelDecimalPrecision ?? "2"
|
|
21010
|
+
)(
|
|
21011
|
+
maxDimension
|
|
21012
|
+
).toString();
|
|
21013
|
+
let dimensionHeightWidth = calculateWidthHeightDynamically(
|
|
21014
|
+
maxDim,
|
|
21015
|
+
formatOptions.xAxisLabel.xAxisLabelFontSize,
|
|
21015
21016
|
formatOptions.xAxisLabel.xAxisLabelFontFamily,
|
|
21016
21017
|
formatOptions.xAxisLabel.xAxisLabelRotation
|
|
21017
21018
|
);
|
|
21018
|
-
let maxDimensionWidth = dimensionHeightWidth
|
|
21019
|
+
let maxDimensionWidth = dimensionHeightWidth[3] + 10;
|
|
21019
21020
|
let xTitle = formatOptions.xAxisTitle.xAxisTitleVisibility ? formatOptions.xAxisTitle.xAxisDynamicTitleText.length !== 0 ? preCalculateTextDimensions(
|
|
21020
21021
|
formatOptions.xAxisTitle.xAxisTitleHTML,
|
|
21021
21022
|
void 0,
|
|
@@ -54346,6 +54347,7 @@
|
|
|
54346
54347
|
};
|
|
54347
54348
|
const dataPreparation = () => {
|
|
54348
54349
|
try {
|
|
54350
|
+
const sortType = formatOptions?.plotArea?.sortBy ?? "default";
|
|
54349
54351
|
chartDirection = chartFormatOptions.plotArea.chartDirection || orgChartDirection.left;
|
|
54350
54352
|
var sum2 = 0;
|
|
54351
54353
|
var absoluteSum = 0;
|
|
@@ -54356,12 +54358,17 @@
|
|
|
54356
54358
|
let tempData = getFlattenedData(rootNode).filter(
|
|
54357
54359
|
(data2) => data2.value !== null
|
|
54358
54360
|
);
|
|
54361
|
+
if (sortType !== "default") {
|
|
54362
|
+
tempData = tempData.sort(
|
|
54363
|
+
(a2, b) => sortType === "asc" ? a2.value - b.value : b.value - a2.value
|
|
54364
|
+
);
|
|
54365
|
+
}
|
|
54359
54366
|
createIdIndexMap(tempData);
|
|
54360
54367
|
generateUID(tempData);
|
|
54361
54368
|
chartData = addStyleObjectToChartData(tempData);
|
|
54362
54369
|
if (chartFormatOptions.heatMap.showHeatMap) {
|
|
54363
54370
|
heatMapScale = sequential().domain([minMeasure, maxMeasure]).interpolator(
|
|
54364
|
-
interpolateRgb$1(chartFormatOptions.heatMap.
|
|
54371
|
+
interpolateRgb$1(chartFormatOptions.heatMap.heatMapMinColor, chartFormatOptions.heatMap.heatMapMaxColor)
|
|
54365
54372
|
);
|
|
54366
54373
|
}
|
|
54367
54374
|
} catch (error) {
|
|
@@ -55386,6 +55393,15 @@
|
|
|
55386
55393
|
));
|
|
55387
55394
|
initSvg(svgRef, width, height, chartFormatOptions);
|
|
55388
55395
|
chartAreaTagG = initChartArea(svg, margins);
|
|
55396
|
+
initPlotArea(
|
|
55397
|
+
chartAreaTagG,
|
|
55398
|
+
formatOptions,
|
|
55399
|
+
0,
|
|
55400
|
+
innerWidth2,
|
|
55401
|
+
innerHeight2,
|
|
55402
|
+
"Scatter",
|
|
55403
|
+
chartId
|
|
55404
|
+
);
|
|
55389
55405
|
drawChartTitle(svgRef, chartTitleHeight, width, chartFormatOptions);
|
|
55390
55406
|
initScale();
|
|
55391
55407
|
drawXAxis();
|
|
@@ -55532,11 +55548,8 @@
|
|
|
55532
55548
|
};
|
|
55533
55549
|
const initScale = () => {
|
|
55534
55550
|
try {
|
|
55535
|
-
let xStartValue = chartFormatOptions.xAxisLabel.xAxisIntervalsVisibility && chartFormatOptions.xAxisLabel.xAxisMinText !== "" ? parseFloat(chartFormatOptions.xAxisLabel.xAxisMinText) : minDimension > 0 ? 0 : minDimension * 1.1;
|
|
55536
|
-
let xEndValue = chartFormatOptions.xAxisLabel.xAxisIntervalsVisibility && chartFormatOptions.xAxisLabel.xAxisMaxText !== "" ? parseFloat(chartFormatOptions.xAxisLabel.xAxisMaxText) : maxDimension * 1.1;
|
|
55537
55551
|
let yStartValue = chartFormatOptions.yAxisLabel.yAxisIntervalsVisibility && chartFormatOptions.yAxisLabel.yAxisMinText !== "" ? parseFloat(chartFormatOptions.yAxisLabel.yAxisMinText) : minMeasure > 0 ? 0 : minMeasure * 1.1;
|
|
55538
55552
|
let yEndValue = chartFormatOptions.yAxisLabel.yAxisIntervalsVisibility && chartFormatOptions.yAxisLabel.yAxisMaxText !== "" ? parseFloat(chartFormatOptions.yAxisLabel.yAxisMaxText) : maxMeasure * 1.1;
|
|
55539
|
-
xScale = linear$1().domain([xStartValue, xEndValue]).range([0, innerWidth2]);
|
|
55540
55553
|
yScale = linear$1().domain([yStartValue, yEndValue]).range([innerHeight2, 0]);
|
|
55541
55554
|
sizeScale = linear$1().domain([sizeValueMin, sizeValueMax]).range([1, 10]);
|
|
55542
55555
|
} catch (e) {
|
|
@@ -55545,6 +55558,8 @@
|
|
|
55545
55558
|
};
|
|
55546
55559
|
const drawXAxis = () => {
|
|
55547
55560
|
try {
|
|
55561
|
+
const tickHeightPercentage = parseFloat(formatOptions.plotArea.ticksHeight) || 100;
|
|
55562
|
+
const tickSize = tickHeightPercentage / 100 * innerHeight2;
|
|
55548
55563
|
let { xAxisLabelArray, customTickValue } = responsiveXaxisLabelForNumericValue(
|
|
55549
55564
|
maxDimension,
|
|
55550
55565
|
minDimension,
|
|
@@ -55555,6 +55570,11 @@
|
|
|
55555
55570
|
innerHeight2,
|
|
55556
55571
|
false
|
|
55557
55572
|
);
|
|
55573
|
+
if (xAxisLabelArray.length > 0) {
|
|
55574
|
+
xScale = linear$1().domain([xAxisLabelArray[0], xAxisLabelArray[xAxisLabelArray.length - 1]]).range([0, innerWidth2]);
|
|
55575
|
+
} else {
|
|
55576
|
+
xScale = linear$1().domain([customXaxisMinValue, customXaxisMaxValue]).range([0, innerWidth2]);
|
|
55577
|
+
}
|
|
55558
55578
|
const xAxis = axisBottom(xScale).tickFormat(
|
|
55559
55579
|
getNumberWithFormatFunction(
|
|
55560
55580
|
formatOptions.xAxisLabel.xAxisDisplayUnits,
|
|
@@ -55562,7 +55582,7 @@
|
|
|
55562
55582
|
formatOptions.xAxisLabel.xAxisLabelDecimalPrecision ?? "2"
|
|
55563
55583
|
)
|
|
55564
55584
|
).tickSize(
|
|
55565
|
-
chartFormatOptions.plotArea.gridLinesVisibility ? chartFormatOptions.plotArea.gridLinesVertical ? chartFormatOptions.xAxisLabel.xAxisPosition === "0" ? -
|
|
55585
|
+
chartFormatOptions.plotArea.gridLinesVisibility ? chartFormatOptions.plotArea.gridLinesVertical ? chartFormatOptions.xAxisLabel.xAxisPosition === "0" ? -tickSize : chartFormatOptions.xAxisLabel.xAxisPosition === "1" ? tickSize : 0 : 0 : 0
|
|
55566
55586
|
).tickValues(xAxisLabelArray.length > 0 ? xAxisLabelArray : null).ticks(customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
55567
55587
|
initXaxis(
|
|
55568
55588
|
chartAreaTagG,
|
|
@@ -55581,6 +55601,8 @@
|
|
|
55581
55601
|
};
|
|
55582
55602
|
const drawYAxis = () => {
|
|
55583
55603
|
try {
|
|
55604
|
+
const tickWidthPercentage = parseFloat(formatOptions.plotArea.ticksWidth) || 100;
|
|
55605
|
+
const tickSize = tickWidthPercentage / 100 * innerWidth2;
|
|
55584
55606
|
let { yAxisLabelArray, customTickValue } = responsiveYaxisLabel(
|
|
55585
55607
|
maxMeasure,
|
|
55586
55608
|
minMeasure,
|
|
@@ -55596,7 +55618,7 @@
|
|
|
55596
55618
|
formatOptions.yAxisLabel.yAxisLabelDecimalPrecision ?? "2"
|
|
55597
55619
|
)
|
|
55598
55620
|
).tickSize(
|
|
55599
|
-
chartFormatOptions.plotArea.gridLinesVisibility ? chartFormatOptions.plotArea.gridLinesHorizontal ? -
|
|
55621
|
+
chartFormatOptions.plotArea.gridLinesVisibility ? chartFormatOptions.plotArea.gridLinesHorizontal ? -tickSize : 0 : 0
|
|
55600
55622
|
).tickValues(yAxisLabelArray.length > 0 ? yAxisLabelArray : null).ticks(customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
55601
55623
|
initYaxis(
|
|
55602
55624
|
chartAreaTagG,
|
|
@@ -55779,10 +55801,12 @@
|
|
|
55779
55801
|
).style("flex-wrap", "nowrap").style("padding-left", "3px");
|
|
55780
55802
|
ColorList.forEach((d, i) => {
|
|
55781
55803
|
let innerdiv = div.append("div").style("display", "inline-flex").style("justify-content", "flex-start").style("align-items", "center").style("margin", "3px 0px").style("width", "fit-content").style("flex-wrap", "nowrap").style("white-space", "nowrap").style("font-size", chartFormatOptions.legends.legendFontSize + "px").style("font-family", chartFormatOptions.legends.legendFontFamily).on("mousemove", function(d2) {
|
|
55782
|
-
|
|
55783
|
-
|
|
55784
|
-
|
|
55785
|
-
|
|
55804
|
+
if (chartFormatOptions.legends.onHoverEffect) {
|
|
55805
|
+
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
55806
|
+
svg.selectAll(
|
|
55807
|
+
'[colorId="' + getJQuerySelector2(this.textContent.replace(/ /g, "-")) + '"]'
|
|
55808
|
+
).classed("highlight", true).classed("unhighlight", false);
|
|
55809
|
+
}
|
|
55786
55810
|
}).on("mouseout", function(d2) {
|
|
55787
55811
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
55788
55812
|
svg.selectAll(
|
|
@@ -55865,35 +55889,24 @@
|
|
|
55865
55889
|
logError$2(fileName, "shapeListWithScroll", e);
|
|
55866
55890
|
}
|
|
55867
55891
|
};
|
|
55868
|
-
const shapesForScatterPlot = (innerdiv,
|
|
55892
|
+
const shapesForScatterPlot = (innerdiv, shape) => {
|
|
55869
55893
|
try {
|
|
55870
|
-
|
|
55871
|
-
|
|
55872
|
-
|
|
55873
|
-
|
|
55874
|
-
|
|
55875
|
-
|
|
55876
|
-
|
|
55877
|
-
|
|
55878
|
-
|
|
55879
|
-
|
|
55880
|
-
|
|
55881
|
-
|
|
55882
|
-
|
|
55883
|
-
|
|
55884
|
-
|
|
55885
|
-
|
|
55886
|
-
innerdiv.append("div").style("height", "10px").style("width", "10px").style("background", "black").style("border-radius", "1px").style("transform", "rotate(45deg)");
|
|
55887
|
-
break;
|
|
55888
|
-
case "star":
|
|
55889
|
-
innerdiv.append("div").style("border-left", "6px solid transparent").style("border-right", "6px solid transparent").style("border-bottom", "10px solid black").style("position", "relative").style("top", "-2px").style("transform", "rotate(0deg)").append("div").style("border-left", "6px solid transparent").style("border-right", "6px solid transparent").style("border-top", "10px solid black").style("position", "absolute").style("top", "2px").style("left", "-5.5px").style("transform", "rotate(360deg)");
|
|
55890
|
-
break;
|
|
55891
|
-
case "wye":
|
|
55892
|
-
innerdiv.append("div").style("height", "6.5px").style("width", "3px").style("background", "black").append("div").style("height", "5px").style("width", "3px").style("background", "black").style("transform", "rotate(-55deg)").style("position", "relative").style("top", "-2px").style("left", "-2px").append("div").style("height", "5px").style("width", "3px").style("background", "black").style("transform", "rotate(108deg)").style("position", "relative").style("top", "3px").style("left", "2px");
|
|
55893
|
-
break;
|
|
55894
|
-
default:
|
|
55895
|
-
break;
|
|
55896
|
-
}
|
|
55894
|
+
const symbolMap = {
|
|
55895
|
+
none: circle,
|
|
55896
|
+
circle,
|
|
55897
|
+
square,
|
|
55898
|
+
triangle,
|
|
55899
|
+
cross,
|
|
55900
|
+
diamond,
|
|
55901
|
+
star,
|
|
55902
|
+
wye
|
|
55903
|
+
};
|
|
55904
|
+
const symbolType = symbolMap[shape?.toLowerCase()] || circle;
|
|
55905
|
+
const size = 80;
|
|
55906
|
+
innerdiv.append("svg").attr("width", 14).attr("height", 14).append("path").attr(
|
|
55907
|
+
"d",
|
|
55908
|
+
Symbol$1().type(symbolType).size(size)()
|
|
55909
|
+
).attr("transform", "translate(7,7)").attr("fill", "black");
|
|
55897
55910
|
} catch (error) {
|
|
55898
55911
|
logError$2(fileName, "shapesForScatterPlot", error);
|
|
55899
55912
|
}
|