pace-chart-lib 1.0.9 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/Charts/Core/Common.types.d.ts +1 -0
- package/dist/pace-chart-lib.es.js +310 -438
- package/dist/pace-chart-lib.umd.js +310 -438
- package/package.json +1 -1
|
@@ -11605,7 +11605,7 @@
|
|
|
11605
11605
|
"Helvetica"
|
|
11606
11606
|
)[1] : 0;
|
|
11607
11607
|
yTitle = yTitle > width * 0.1 ? width * 0.1 : yTitle;
|
|
11608
|
-
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0);
|
|
11608
|
+
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) + 10 : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0) + 10;
|
|
11609
11609
|
yLabel += 8;
|
|
11610
11610
|
let secondaryYLabel = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? responsiveYaxisMargin(
|
|
11611
11611
|
maxNumberForSecondaryAxis,
|
|
@@ -15517,11 +15517,11 @@
|
|
|
15517
15517
|
chartFormatOptions.chartTitle.chartTitleVisibility ? "visible" : "hidden"
|
|
15518
15518
|
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", chartTitleWidth).attr("height", chartTitleHeight + "px");
|
|
15519
15519
|
if (chartFormatOptions.chartTitle.dynamicTitleText.length !== 0) {
|
|
15520
|
-
object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", chartFormatOptions.chartTitle.chartTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").html(
|
|
15520
|
+
object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", chartFormatOptions.chartTitle.chartTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").style("overflow", "visible").style("line-height", "1.3em").html(
|
|
15521
15521
|
chartFormatOptions.chartTitle.chartTitleHTML ? chartFormatOptions.chartTitle.chartTitleHTML : chartFormatOptions.chartTitle.chartTitleText
|
|
15522
15522
|
);
|
|
15523
15523
|
} else {
|
|
15524
|
-
object2.append("xhtml:div").style("white-space", "pre").style("user-select", "none").style("text-overflow", "ellipsis").style("overflow", "
|
|
15524
|
+
object2.append("xhtml:div").style("white-space", "pre").style("user-select", "none").style("text-overflow", "ellipsis").style("overflow", "visible").style("line-height", "1.3em").attr("class", "chartTiltle").attr("id", "chartTitleId").style("text-anchor", "start").style("color", "rgba(119,119,119)").style("font-size", "16px").style(
|
|
15525
15525
|
"font-family",
|
|
15526
15526
|
chartFormatOptions.chartTitle.chartTitleFontFamily
|
|
15527
15527
|
).attr("title", chartFormatOptions.chartTitle.chartTitleText).html(chartFormatOptions.chartTitle.chartTitleText);
|
|
@@ -15567,14 +15567,14 @@
|
|
|
15567
15567
|
if (chartFormatOptions.legends.onHoverEffect) {
|
|
15568
15568
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
15569
15569
|
selectAll(
|
|
15570
|
-
'[hoverId="' + this.textContent.replace(/ /g, "-") + '"]'
|
|
15570
|
+
'[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
|
|
15571
15571
|
).classed("highlight", true).classed("unhighlight", false);
|
|
15572
15572
|
}
|
|
15573
15573
|
}).on("mouseout", function(d2) {
|
|
15574
15574
|
if (chartFormatOptions.legends.onHoverEffect) {
|
|
15575
15575
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
15576
15576
|
selectAll(
|
|
15577
|
-
'[hoverId="' + this.textContent.replace(/ /g, "-") + '"]'
|
|
15577
|
+
'[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
|
|
15578
15578
|
).classed("highlight", false).classed("unhighlight", false);
|
|
15579
15579
|
}
|
|
15580
15580
|
});
|
|
@@ -15777,6 +15777,7 @@
|
|
|
15777
15777
|
const marginCalculationsForChartsWithoutAxis = (chartFormatOptions, width, height, maxLegendDimensions, margins, isVennChart = false) => {
|
|
15778
15778
|
try {
|
|
15779
15779
|
let legendPosition = chartFormatOptions.legends.legendPosition;
|
|
15780
|
+
legendPosition = chartFormatOptions.legends.legendVisibility ? chartFormatOptions.legends.legendPosition : staticLegendPosition.none;
|
|
15780
15781
|
let width15Percent = width * 0.15 * 0.8;
|
|
15781
15782
|
let legendListWidth = isVennChart ? maxLegendDimensions[0] : width15Percent < maxLegendDimensions[0] + 15 ? width15Percent : maxLegendDimensions[0] + 15;
|
|
15782
15783
|
let chartTitleHeight = chartFormatOptions.chartTitle.chartTitleVisibility ? chartFormatOptions.chartTitle.dynamicTitleText.length !== 0 ? preCalculateTextDimensions(
|
|
@@ -15790,10 +15791,10 @@
|
|
|
15790
15791
|
).height : 5;
|
|
15791
15792
|
switch (legendPosition) {
|
|
15792
15793
|
case staticLegendPosition.none:
|
|
15793
|
-
margins.top = chartTitleHeight +
|
|
15794
|
-
margins.bottom =
|
|
15795
|
-
margins.right =
|
|
15796
|
-
margins.left =
|
|
15794
|
+
margins.top = chartTitleHeight + 10;
|
|
15795
|
+
margins.bottom = 15;
|
|
15796
|
+
margins.right = 15;
|
|
15797
|
+
margins.left = 15;
|
|
15797
15798
|
break;
|
|
15798
15799
|
case staticLegendPosition.top:
|
|
15799
15800
|
margins.top = chartTitleHeight + 50;
|
|
@@ -16681,7 +16682,10 @@
|
|
|
16681
16682
|
let stackChartData = [];
|
|
16682
16683
|
const chartType = actualChartTypes.customColumnChart;
|
|
16683
16684
|
const svgRef = require$$0$1.useRef();
|
|
16684
|
-
const seriesData = generalizedChartData(
|
|
16685
|
+
const seriesData = generalizedChartData(
|
|
16686
|
+
data.ChartData,
|
|
16687
|
+
data.DimensionList
|
|
16688
|
+
);
|
|
16685
16689
|
const dimensionList = data.DimensionList;
|
|
16686
16690
|
const barChart = false;
|
|
16687
16691
|
let isSecondaryAxisDrawn = false;
|
|
@@ -17172,7 +17176,9 @@
|
|
|
17172
17176
|
)
|
|
17173
17177
|
).tickSize(
|
|
17174
17178
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
|
|
17175
|
-
).tickValues(
|
|
17179
|
+
).tickValues(
|
|
17180
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
17181
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
17176
17182
|
}
|
|
17177
17183
|
if (isSecondaryAxisDrawn) {
|
|
17178
17184
|
yAxisRight = axisRight(yScaleRight).tickFormat(
|
|
@@ -19911,7 +19917,7 @@
|
|
|
19911
19917
|
const columnWidth = 0;
|
|
19912
19918
|
const chartType = actualChartTypes.columnHistogram;
|
|
19913
19919
|
const svgRef = require$$0$1.useRef();
|
|
19914
|
-
const seriesData =
|
|
19920
|
+
const seriesData = data.ChartData;
|
|
19915
19921
|
const dimensionList = data.DimensionList;
|
|
19916
19922
|
const barChart = false;
|
|
19917
19923
|
const isSecondaryAxisDrawn = false;
|
|
@@ -20205,7 +20211,8 @@
|
|
|
20205
20211
|
};
|
|
20206
20212
|
const initScale = () => {
|
|
20207
20213
|
xScale = linear$1().domain([chartJSON.xMin, chartJSON.xMax]).range([0, innerWidth2]);
|
|
20208
|
-
|
|
20214
|
+
const numberOfBins = periods.length > 0 ? periods : xScale.ticks(thresholds);
|
|
20215
|
+
let histogram = bin().value((d) => d).domain(xScale.domain()).thresholds(numberOfBins);
|
|
20209
20216
|
filteredData.forEach((d) => {
|
|
20210
20217
|
let tempArray = histogram(d.data.map((val) => val.value));
|
|
20211
20218
|
bins.push(tempArray);
|
|
@@ -20263,7 +20270,7 @@
|
|
|
20263
20270
|
)
|
|
20264
20271
|
).tickSize(
|
|
20265
20272
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? formatOptions.plotArea.gridLinesVertical ? -(dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2) : parseFloat(formatOptions.plotArea.ticksHeight) * ((dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2) / 100) * (formatOptions.xAxisLabel.xAxisPosition == "1" ? 1 : -1) : 0 : 0
|
|
20266
|
-
).
|
|
20273
|
+
).tickSizeOuter(0);
|
|
20267
20274
|
formatOptions.bins.binsCalculation === "Automatic" ? xAxis.ticks(thresholds) : xAxis.tickValues(periods).ticks(innerWidth2 / 50);
|
|
20268
20275
|
};
|
|
20269
20276
|
const getChartType = (lineData) => {
|
|
@@ -20295,6 +20302,7 @@
|
|
|
20295
20302
|
event2
|
|
20296
20303
|
);
|
|
20297
20304
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
20305
|
+
gTag.selectAll(".parentGroup").raise();
|
|
20298
20306
|
};
|
|
20299
20307
|
const setSVGContainer = (margin2) => {
|
|
20300
20308
|
innerWidth2 = width - margin2.left - margin2.right;
|
|
@@ -20314,7 +20322,6 @@
|
|
|
20314
20322
|
(d) => filteredDimension.includes(d.dimension)
|
|
20315
20323
|
)
|
|
20316
20324
|
);
|
|
20317
|
-
getXAxis();
|
|
20318
20325
|
svg2.append("rect").attr("x", margin2.left).attr("y", scrollbarY).attr("width", innerWidth22).attr("height", 8).attr("fill", "#ddd").attr("rx", 4);
|
|
20319
20326
|
const handleWidth = innerWidth22 * visibleBars / chartJSON.dimensionList.length;
|
|
20320
20327
|
const handle = svg2.append("rect").attr("x", margin2.left).attr("y", scrollbarY).attr("width", handleWidth).attr("height", 8).attr("fill", "#999").attr("rx", 4).style("cursor", "ew-resize").call(
|
|
@@ -20361,7 +20368,6 @@
|
|
|
20361
20368
|
drawColumnChart();
|
|
20362
20369
|
};
|
|
20363
20370
|
const drawColumnChart = () => {
|
|
20364
|
-
getChartType();
|
|
20365
20371
|
initXaxis$1(
|
|
20366
20372
|
gTag,
|
|
20367
20373
|
chartJSON,
|
|
@@ -20378,6 +20384,7 @@
|
|
|
20378
20384
|
innerHeight2,
|
|
20379
20385
|
filteredDimension
|
|
20380
20386
|
);
|
|
20387
|
+
getChartType();
|
|
20381
20388
|
};
|
|
20382
20389
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20383
20390
|
"svg",
|
|
@@ -24319,20 +24326,22 @@
|
|
|
24319
24326
|
data
|
|
24320
24327
|
}) => {
|
|
24321
24328
|
const chartId = crypto.randomUUID();
|
|
24322
|
-
|
|
24323
|
-
const chartType = actualChartTypes.
|
|
24329
|
+
const columnWidth = 0;
|
|
24330
|
+
const chartType = actualChartTypes.columnHistogram;
|
|
24324
24331
|
const svgRef = require$$0$1.useRef();
|
|
24325
|
-
const seriesData =
|
|
24332
|
+
const seriesData = data.ChartData;
|
|
24326
24333
|
const dimensionList = data.DimensionList;
|
|
24327
|
-
const barChart =
|
|
24328
|
-
|
|
24334
|
+
const barChart = false;
|
|
24335
|
+
const isSecondaryAxisDrawn = false;
|
|
24329
24336
|
const isNormalizedChart = false;
|
|
24330
24337
|
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
24331
24338
|
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
24332
|
-
let
|
|
24339
|
+
let customXaxisMinValue = parseFloat(formatOptions.xAxisLabel.xAxisMinText);
|
|
24340
|
+
let customXaxisMaxValue = parseFloat(formatOptions.xAxisLabel.xAxisMaxText);
|
|
24341
|
+
parseFloat(
|
|
24333
24342
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
24334
24343
|
);
|
|
24335
|
-
|
|
24344
|
+
parseFloat(
|
|
24336
24345
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
24337
24346
|
);
|
|
24338
24347
|
let margin;
|
|
@@ -24349,21 +24358,21 @@
|
|
|
24349
24358
|
let maxNumberForSecondaryAxis;
|
|
24350
24359
|
let innerWidth2;
|
|
24351
24360
|
let innerHeight2;
|
|
24361
|
+
let thresholds;
|
|
24362
|
+
let periods = [];
|
|
24363
|
+
let bins = [];
|
|
24352
24364
|
let width;
|
|
24353
24365
|
let height;
|
|
24354
24366
|
let dataTable;
|
|
24355
24367
|
let dataTableHeight;
|
|
24356
24368
|
let svg;
|
|
24357
24369
|
let gTag;
|
|
24358
|
-
let
|
|
24359
|
-
let
|
|
24360
|
-
let
|
|
24361
|
-
let xScaleTop;
|
|
24370
|
+
let yScaleLeft;
|
|
24371
|
+
let xScale;
|
|
24372
|
+
let xScaleForLegends;
|
|
24362
24373
|
let calculatedRange;
|
|
24363
|
-
let
|
|
24364
|
-
let
|
|
24365
|
-
let xAxisTop;
|
|
24366
|
-
let yAxis;
|
|
24374
|
+
let yAxisLeft;
|
|
24375
|
+
let xAxis;
|
|
24367
24376
|
let filteredDimension;
|
|
24368
24377
|
let filteredData = [];
|
|
24369
24378
|
let scrollPosition = 0;
|
|
@@ -24384,12 +24393,12 @@
|
|
|
24384
24393
|
};
|
|
24385
24394
|
require$$0$1.useEffect(() => {
|
|
24386
24395
|
try {
|
|
24387
|
-
|
|
24396
|
+
createHorizontalChart();
|
|
24388
24397
|
} catch (error) {
|
|
24389
|
-
logError$2("
|
|
24398
|
+
logError$2("HorizontalHistogramChart", "createHorizontalChart", error);
|
|
24390
24399
|
}
|
|
24391
24400
|
}, [formatOptions]);
|
|
24392
|
-
const
|
|
24401
|
+
const createHorizontalChart = () => {
|
|
24393
24402
|
({ formatOptions, svg, width, height } = firstFunctionBeforeRender$1(
|
|
24394
24403
|
svgRef,
|
|
24395
24404
|
formatOptions
|
|
@@ -24427,8 +24436,7 @@
|
|
|
24427
24436
|
chartJSON.yMaxRight,
|
|
24428
24437
|
isSecondaryAxisDrawn,
|
|
24429
24438
|
isNormalizedChart,
|
|
24430
|
-
isDateType
|
|
24431
|
-
barChart
|
|
24439
|
+
isDateType
|
|
24432
24440
|
));
|
|
24433
24441
|
setSVGContainer(margin);
|
|
24434
24442
|
({ dataTable, dataTableHeight } = dataTablePreCalculation(
|
|
@@ -24439,49 +24447,36 @@
|
|
|
24439
24447
|
seriesData,
|
|
24440
24448
|
chartJSON.dimensionList
|
|
24441
24449
|
));
|
|
24442
|
-
initSvg$1(
|
|
24443
|
-
// for svg creation
|
|
24444
|
-
svg,
|
|
24445
|
-
width,
|
|
24446
|
-
height,
|
|
24447
|
-
formatOptions
|
|
24448
|
-
);
|
|
24450
|
+
initSvg$1(svg, width, height, formatOptions);
|
|
24449
24451
|
gTag = initChartArea$1(svg, margin);
|
|
24450
|
-
initPlotArea(
|
|
24452
|
+
initPlotArea(gTag, formatOptions, dataTableHeight, innerWidth2, innerHeight2, chartType);
|
|
24453
|
+
binsCalculation();
|
|
24454
|
+
initScale();
|
|
24455
|
+
initAxis();
|
|
24456
|
+
initXaxis$1(
|
|
24451
24457
|
gTag,
|
|
24458
|
+
chartJSON,
|
|
24459
|
+
xLabel,
|
|
24452
24460
|
formatOptions,
|
|
24453
24461
|
dataTableHeight,
|
|
24462
|
+
yScaleLeft,
|
|
24463
|
+
xAxis,
|
|
24464
|
+
dimensionHeightWidthArray,
|
|
24465
|
+
height,
|
|
24466
|
+
columnWidth,
|
|
24467
|
+
isDateType,
|
|
24454
24468
|
innerWidth2,
|
|
24455
24469
|
innerHeight2,
|
|
24456
|
-
|
|
24470
|
+
filteredDimension
|
|
24457
24471
|
);
|
|
24458
|
-
|
|
24459
|
-
initAxis();
|
|
24460
|
-
initYaxisBar(
|
|
24461
|
-
formatOptions,
|
|
24472
|
+
initYaxis$1(
|
|
24462
24473
|
gTag,
|
|
24463
|
-
|
|
24464
|
-
|
|
24465
|
-
|
|
24466
|
-
|
|
24467
|
-
|
|
24468
|
-
xScaleBottom,
|
|
24469
|
-
chartJSON.yMaxLeft,
|
|
24470
|
-
filteredDimension,
|
|
24471
|
-
chartType,
|
|
24472
|
-
isDateType,
|
|
24473
|
-
width,
|
|
24474
|
-
dimensionHeightWidthArray,
|
|
24475
|
-
columnWidth
|
|
24474
|
+
formatOptions,
|
|
24475
|
+
dataTableHeight,
|
|
24476
|
+
yLabel,
|
|
24477
|
+
yAxisLeft,
|
|
24478
|
+
innerHeight2
|
|
24476
24479
|
);
|
|
24477
|
-
if (isSecondaryAxisDrawn) {
|
|
24478
|
-
initXaxisTop(
|
|
24479
|
-
formatOptions,
|
|
24480
|
-
gTag,
|
|
24481
|
-
secondaryYLabel,
|
|
24482
|
-
xAxisTop
|
|
24483
|
-
);
|
|
24484
|
-
}
|
|
24485
24480
|
horizontalScrollBar2(seriesData, height, svg, margin, innerWidth2);
|
|
24486
24481
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
24487
24482
|
if (formatOptions.xAxisLabel.xAxisPosition != "1")
|
|
@@ -24492,9 +24487,9 @@
|
|
|
24492
24487
|
gTag,
|
|
24493
24488
|
dataTable,
|
|
24494
24489
|
columnWidth,
|
|
24495
|
-
|
|
24496
|
-
|
|
24497
|
-
|
|
24490
|
+
yScaleLeft,
|
|
24491
|
+
xScale,
|
|
24492
|
+
xScaleForLegends,
|
|
24498
24493
|
void 0,
|
|
24499
24494
|
void 0,
|
|
24500
24495
|
dataTableHeight,
|
|
@@ -24562,117 +24557,108 @@
|
|
|
24562
24557
|
const preProcessChartData = () => {
|
|
24563
24558
|
const allChartData = [];
|
|
24564
24559
|
const legendList = [];
|
|
24565
|
-
let
|
|
24560
|
+
let cumulativeDataPoints = [];
|
|
24566
24561
|
let yMaxLeft = -Infinity;
|
|
24567
24562
|
let yMinLeft = Infinity;
|
|
24568
|
-
let yMaxRight = -Infinity;
|
|
24569
|
-
let yMinRight = Infinity;
|
|
24570
24563
|
seriesData.forEach((series) => {
|
|
24571
24564
|
legendList.push(series.legend);
|
|
24572
24565
|
series.data.forEach((point2) => {
|
|
24573
24566
|
allChartData.push(point2);
|
|
24574
|
-
|
|
24575
|
-
|
|
24576
|
-
yMaxRight = Math.max(yMaxRight, point2.value);
|
|
24577
|
-
yMinRight = Math.min(yMinRight, point2.value);
|
|
24578
|
-
} else {
|
|
24579
|
-
yMaxLeft = Math.max(yMaxLeft, point2.value);
|
|
24580
|
-
yMinLeft = Math.min(yMinLeft, point2.value);
|
|
24581
|
-
}
|
|
24567
|
+
yMaxLeft = Math.max(yMaxLeft, point2.value);
|
|
24568
|
+
yMinLeft = Math.min(yMinLeft, point2.value);
|
|
24582
24569
|
});
|
|
24583
24570
|
});
|
|
24584
24571
|
chartJSON.chartData = allChartData;
|
|
24585
24572
|
chartJSON.legendList = legendList;
|
|
24586
24573
|
chartJSON.yMaxLeft = yMaxLeft;
|
|
24587
24574
|
chartJSON.yMinLeft = yMinLeft > 0 ? 0 : yMinLeft;
|
|
24588
|
-
chartJSON.yMaxRight = yMaxRight;
|
|
24589
|
-
chartJSON.yMinRight = yMinRight;
|
|
24590
|
-
formatedDimensionList = isDateType ? setDateFormats(
|
|
24591
|
-
formatOptions.xAxisLabel.xAxisNumberFormat,
|
|
24592
|
-
chartJSON.dimensionList
|
|
24593
|
-
).map((d) => d) : chartJSON.dimensionList;
|
|
24594
|
-
chartJSON.dimensionList.forEach((dim, i) => {
|
|
24595
|
-
chartJSON.formattedDimensionListMap.set(dim, formatedDimensionList[i]);
|
|
24596
|
-
});
|
|
24597
24575
|
filteredData = JSON.parse(JSON.stringify(seriesData));
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
|
|
24601
|
-
|
|
24602
|
-
|
|
24603
|
-
|
|
24604
|
-
|
|
24605
|
-
|
|
24606
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
24607
|
-
chartJSON.hideZeroValues = true;
|
|
24608
|
-
}
|
|
24576
|
+
filteredData.forEach(
|
|
24577
|
+
(d) => d.data.forEach((j) => cumulativeDataPoints.push(j.value))
|
|
24578
|
+
);
|
|
24579
|
+
let yMin = customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : 0;
|
|
24580
|
+
let yMax = customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : filteredData[0]?.data?.length;
|
|
24581
|
+
chartJSON.yMaxLeft = parseFloat((yMin + "").length > (yMax + "").length ? yMin + "" : yMax + "");
|
|
24582
|
+
chartJSON.xMax = max$2(cumulativeDataPoints);
|
|
24583
|
+
chartJSON.xMin = min$2(cumulativeDataPoints);
|
|
24609
24584
|
};
|
|
24610
|
-
const
|
|
24611
|
-
|
|
24612
|
-
|
|
24613
|
-
|
|
24614
|
-
|
|
24615
|
-
|
|
24616
|
-
|
|
24617
|
-
|
|
24618
|
-
|
|
24619
|
-
|
|
24620
|
-
chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
|
|
24621
|
-
chartJSON.yMinLeft = yAxisLabelArray[0];
|
|
24622
|
-
{
|
|
24623
|
-
xScaleBottom = linear$1().domain([
|
|
24624
|
-
chartJSON.yMinLeft >= 0 ? customYaxisMinValue !== void 0 && !Number.isNaN(customYaxisMinValue) ? customYaxisMinValue : 0 : chartJSON.yMinLeft < 0 ? chartJSON.yMinLeft * 1.1 : chartJSON.yMinLeft * 0.9,
|
|
24625
|
-
chartJSON.yMaxLeft <= 0 ? 0 : customYaxisMaxValue !== void 0 && !Number.isNaN(customYaxisMaxValue) ? customYaxisMaxValue : chartJSON.yMaxLeft * 1.1
|
|
24626
|
-
]).range([
|
|
24627
|
-
0,
|
|
24628
|
-
dataTableHeight > 0 ? innerWidth2 - dataTableHeight : innerWidth2
|
|
24629
|
-
]);
|
|
24585
|
+
const binsCalculation = () => {
|
|
24586
|
+
switch (formatOptions.bins.binsCalculation) {
|
|
24587
|
+
case "Automatic":
|
|
24588
|
+
thresholds = innerHeight2 / 50;
|
|
24589
|
+
break;
|
|
24590
|
+
case "Number of Bins":
|
|
24591
|
+
calculatingPeriodsWithBins(false);
|
|
24592
|
+
break;
|
|
24593
|
+
case "Bin Width":
|
|
24594
|
+
calculatingPeriodsWithBins(true);
|
|
24630
24595
|
}
|
|
24631
|
-
|
|
24632
|
-
|
|
24633
|
-
|
|
24634
|
-
|
|
24635
|
-
|
|
24636
|
-
|
|
24637
|
-
|
|
24638
|
-
|
|
24596
|
+
};
|
|
24597
|
+
const calculatingPeriodsWithBins = (isWithWidth) => {
|
|
24598
|
+
filteredData.forEach((d) => d.data.sort((a2, b) => a2.value - b.value));
|
|
24599
|
+
let range2 = chartJSON.xMax - chartJSON.xMin;
|
|
24600
|
+
let tempPeriod;
|
|
24601
|
+
if (isWithWidth) {
|
|
24602
|
+
parseFloat(formatOptions.bins.binsCalculationValue) <= 2 && (formatOptions.bins.binsCalculationValue = "3");
|
|
24603
|
+
tempPeriod = range2 / parseFloat(formatOptions.bins.binsCalculationValue);
|
|
24604
|
+
} else {
|
|
24605
|
+
parseFloat(formatOptions.bins.binsCalculationValue) <= 1 && (formatOptions.bins.binsCalculationValue = "1");
|
|
24606
|
+
tempPeriod = range2 / parseFloat(formatOptions.bins.binsCalculationValue);
|
|
24639
24607
|
}
|
|
24640
|
-
|
|
24641
|
-
if (
|
|
24642
|
-
|
|
24643
|
-
|
|
24644
|
-
|
|
24645
|
-
|
|
24646
|
-
|
|
24647
|
-
|
|
24648
|
-
|
|
24649
|
-
)
|
|
24650
|
-
|
|
24651
|
-
|
|
24652
|
-
|
|
24608
|
+
let currentElement = chartJSON.xMin;
|
|
24609
|
+
if (isWithWidth) {
|
|
24610
|
+
periods = [currentElement];
|
|
24611
|
+
while (currentElement < chartJSON.xMax) {
|
|
24612
|
+
currentElement += tempPeriod;
|
|
24613
|
+
periods.push(currentElement);
|
|
24614
|
+
}
|
|
24615
|
+
} else {
|
|
24616
|
+
periods = [currentElement];
|
|
24617
|
+
while (Math.round(currentElement) < Math.round(chartJSON.xMax)) {
|
|
24618
|
+
currentElement += tempPeriod;
|
|
24619
|
+
periods.push(Math.round(currentElement));
|
|
24620
|
+
}
|
|
24653
24621
|
}
|
|
24654
|
-
getYScale();
|
|
24655
24622
|
};
|
|
24656
|
-
const
|
|
24657
|
-
|
|
24658
|
-
|
|
24659
|
-
|
|
24623
|
+
const initScale = () => {
|
|
24624
|
+
yScaleLeft = linear$1().domain([chartJSON.xMin, chartJSON.xMax]).range([innerHeight2, 0]);
|
|
24625
|
+
const numberOfBins = periods.length > 0 ? periods : yScaleLeft.ticks(thresholds);
|
|
24626
|
+
let histogram = bin().value((d) => d).domain(yScaleLeft.domain()).thresholds(numberOfBins);
|
|
24627
|
+
filteredData.forEach((d) => {
|
|
24628
|
+
let tempArray = histogram(d.data.map((val) => val.value));
|
|
24629
|
+
bins.push(tempArray);
|
|
24630
|
+
});
|
|
24631
|
+
filteredData.forEach(
|
|
24632
|
+
(d, i) => bins[i].forEach((j) => {
|
|
24633
|
+
j["name"] = d.properties["legend"];
|
|
24634
|
+
j["color"] = d.properties["color"];
|
|
24635
|
+
j["opacity"] = d.properties["opacity"];
|
|
24636
|
+
})
|
|
24660
24637
|
);
|
|
24661
|
-
|
|
24638
|
+
let cumulativeLength = [];
|
|
24639
|
+
bins.forEach((d) => d.forEach((j) => cumulativeLength.push(j.length)));
|
|
24640
|
+
chartJSON.yMaxLeft = max$2(cumulativeLength);
|
|
24641
|
+
chartJSON.yMinLeft = min$2(cumulativeLength);
|
|
24642
|
+
xScale = linear$1().domain([
|
|
24643
|
+
customXaxisMinValue || customXaxisMinValue == 0 ? customXaxisMinValue : 0,
|
|
24644
|
+
customXaxisMaxValue || customXaxisMaxValue == 0 ? customXaxisMaxValue : chartJSON.yMaxLeft + 0.2 * chartJSON.yMaxLeft
|
|
24645
|
+
]).range([0, innerWidth2]);
|
|
24662
24646
|
};
|
|
24663
24647
|
const initAxis = () => {
|
|
24664
24648
|
getYAxis();
|
|
24665
24649
|
{
|
|
24666
|
-
let
|
|
24667
|
-
|
|
24650
|
+
let responsiveLabelsObj = responsiveYaxisLabel$1(
|
|
24651
|
+
chartJSON.yMaxLeft,
|
|
24668
24652
|
chartJSON.yMinLeft,
|
|
24669
|
-
|
|
24653
|
+
innerWidth2,
|
|
24670
24654
|
formatOptions,
|
|
24671
24655
|
chartJSON,
|
|
24672
24656
|
customYaxisMinValue,
|
|
24673
|
-
customYaxisMaxValue
|
|
24657
|
+
customYaxisMaxValue,
|
|
24658
|
+
false,
|
|
24659
|
+
innerHeight2
|
|
24674
24660
|
);
|
|
24675
|
-
|
|
24661
|
+
xAxis = axisBottom(xScale).tickFormat(
|
|
24676
24662
|
(d) => getNumberWithFormat(
|
|
24677
24663
|
d,
|
|
24678
24664
|
formatOptions.yAxisLabel.yAxisDisplayUnits,
|
|
@@ -24680,116 +24666,53 @@
|
|
|
24680
24666
|
formatOptions.yAxisLabel.yAxisLabelDecimalPrecision
|
|
24681
24667
|
)
|
|
24682
24668
|
).tickSize(
|
|
24683
|
-
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 +
|
|
24684
|
-
).tickValues(
|
|
24685
|
-
}
|
|
24686
|
-
if (isSecondaryAxisDrawn) {
|
|
24687
|
-
xAxisTop = axisTop(xScaleTop).tickFormat(
|
|
24688
|
-
(d) => getNumberWithFormat(
|
|
24689
|
-
d,
|
|
24690
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisDisplayUnits,
|
|
24691
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
|
|
24692
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
|
|
24693
|
-
)
|
|
24694
|
-
).tickValues(
|
|
24695
|
-
responsiveSecondaryYaxisLabel(
|
|
24696
|
-
secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
|
|
24697
|
-
chartJSON.yMinRight,
|
|
24698
|
-
formatOptions,
|
|
24699
|
-
chartJSON
|
|
24700
|
-
).secondaryYAxisLabelArray
|
|
24701
|
-
).ticks(
|
|
24702
|
-
responsiveSecondaryYaxisLabel(
|
|
24703
|
-
secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
|
|
24704
|
-
chartJSON.yMinRight,
|
|
24705
|
-
formatOptions,
|
|
24706
|
-
chartJSON
|
|
24707
|
-
).secondaryCustomTickValue ?? innerHeight2 / 30
|
|
24708
|
-
).tickSize(
|
|
24709
|
-
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
|
|
24710
|
-
).tickPadding(8).tickSizeOuter(0);
|
|
24669
|
+
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 + 0 : 0 : 0
|
|
24670
|
+
).tickValues(responsiveLabelsObj.autoLabelFlag ? void 0 : responsiveLabelsObj.yAxisLabelArray).ticks(responsiveLabelsObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
24711
24671
|
}
|
|
24712
24672
|
};
|
|
24713
24673
|
const getYAxis = () => {
|
|
24714
|
-
|
|
24715
|
-
|
|
24716
|
-
|
|
24674
|
+
let labelArray = responsiveXaxisLabelForNumericValue(chartJSON.xMax, chartJSON.xMin, innerHeight2, formatOptions, customXaxisMinValue, customXaxisMaxValue, innerWidth2, false).xAxisLabelArray;
|
|
24675
|
+
labelArray.shift();
|
|
24676
|
+
yAxisLeft = axisLeft(yScaleLeft).tickFormat(
|
|
24677
|
+
(d) => getNumberWithFormat(
|
|
24678
|
+
d,
|
|
24679
|
+
formatOptions.xAxisLabel.xAxisDisplayUnits,
|
|
24680
|
+
formatOptions.xAxisLabel.xAxisNumberFormat,
|
|
24681
|
+
formatOptions.xAxisLabel.xAxisLabelDecimalPrecision,
|
|
24682
|
+
false
|
|
24683
|
+
)
|
|
24684
|
+
).tickSize(
|
|
24685
|
+
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerWidth2 : 0 : 0
|
|
24686
|
+
).tickSizeOuter(0);
|
|
24687
|
+
formatOptions.bins.binsCalculation === "Automatic" ? yAxisLeft.ticks(thresholds) : yAxisLeft.tickValues(periods).ticks(innerHeight2 / 50);
|
|
24717
24688
|
};
|
|
24718
24689
|
const getChartType = (lineData) => {
|
|
24719
|
-
|
|
24720
|
-
|
|
24721
|
-
|
|
24722
|
-
|
|
24723
|
-
|
|
24724
|
-
|
|
24725
|
-
|
|
24726
|
-
|
|
24727
|
-
|
|
24728
|
-
|
|
24729
|
-
|
|
24730
|
-
|
|
24731
|
-
|
|
24732
|
-
|
|
24733
|
-
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
|
|
24737
|
-
|
|
24738
|
-
|
|
24739
|
-
|
|
24740
|
-
|
|
24741
|
-
|
|
24742
|
-
(d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`
|
|
24690
|
+
gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(bins).enter().append("g").selectAll("rect").data((d) => d).enter().append("rect").attr("class", "rect").attr("stroke", formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderColor).attr("stroke-width", formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderThickness).attr("stroke-opacity", formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderOpacity).attr("x", 0).attr("y", (d) => {
|
|
24691
|
+
const y02 = yScaleLeft(d.x0);
|
|
24692
|
+
const y12 = yScaleLeft(d.x1);
|
|
24693
|
+
return Math.min(y02, y12);
|
|
24694
|
+
}).attr("height", (d) => {
|
|
24695
|
+
const y02 = yScaleLeft(d.x0);
|
|
24696
|
+
const y12 = yScaleLeft(d.x1);
|
|
24697
|
+
const gap = parseFloat(formatOptions.bins.binsGapWidth) || 0;
|
|
24698
|
+
return Math.max(1, Math.abs(y12 - y02) - gap);
|
|
24699
|
+
}).attr("width", (d) => xScale(d.length)).style("fill", (d) => d.color !== "#ffffff" ? d.color : "none").style("opacity", formatOptions.bins.binsFillOpacity).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
24700
|
+
showTooltipOnMouseMove(
|
|
24701
|
+
[
|
|
24702
|
+
{
|
|
24703
|
+
key: formatOptions.yAxisTitle.yAxisTitleText,
|
|
24704
|
+
value: `${d["x0"]}-${d["x1"]}`
|
|
24705
|
+
},
|
|
24706
|
+
{
|
|
24707
|
+
key: formatOptions.xAxisTitle.xAxisTitleText,
|
|
24708
|
+
value: getNumberWithFormat(formatOptions.toolTip.toolTipNumberFormat == ",.0%" ? Math.abs(d.length / filteredData[0].data.length) : d.length, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, false)
|
|
24709
|
+
}
|
|
24710
|
+
],
|
|
24711
|
+
formatOptions,
|
|
24712
|
+
event2
|
|
24743
24713
|
);
|
|
24744
|
-
|
|
24745
|
-
|
|
24746
|
-
return d.value > 0 ? requiredXScale(0) : requiredXScale(d.value);
|
|
24747
|
-
}).attr("width", (d) => {
|
|
24748
|
-
const requiredXScale = data2.properties.axis === "Primary" ? xScaleBottom : xScaleTop;
|
|
24749
|
-
const requiredCustomValue = data2.properties.axis === "Primary" ? customYaxisMaxValue : secondaryCustomYaxisMaxValue;
|
|
24750
|
-
return d.value > 0 ? requiredCustomValue && d.value > requiredCustomValue ? requiredXScale(requiredCustomValue) - requiredXScale(0) : requiredXScale(d.value) - requiredXScale(0) : Math.abs(requiredXScale(0) - requiredXScale(d.value));
|
|
24751
|
-
}).attr("fill", data2.properties.color).attr(
|
|
24752
|
-
"stroke-dasharray",
|
|
24753
|
-
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
24754
|
-
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
24755
|
-
"stroke",
|
|
24756
|
-
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
24757
|
-
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
24758
|
-
"visibility",
|
|
24759
|
-
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
24760
|
-
).on("mousemove", (event2, d) => {
|
|
24761
|
-
showTooltipOnMouseMove(
|
|
24762
|
-
[
|
|
24763
|
-
{
|
|
24764
|
-
key: formatOptions.xAxisTitle.xAxisTitleText.includes("~$~") ? formatOptions.xAxisTitle.xAxisTitleText.split("~$~")[1] : formatOptions.xAxisTitle.xAxisTitleText,
|
|
24765
|
-
value: chartJSON.formattedDimensionListMap.get(
|
|
24766
|
-
Array.isArray(d.dimension) ? d.dimension[0] : d.dimension
|
|
24767
|
-
)
|
|
24768
|
-
},
|
|
24769
|
-
{
|
|
24770
|
-
key: formatOptions.yAxisTitle.yAxisTitleText || d.value,
|
|
24771
|
-
value: getNumberWithFormat(
|
|
24772
|
-
[
|
|
24773
|
-
actualChartTypes.stackLine100,
|
|
24774
|
-
actualChartTypes.stackArea100,
|
|
24775
|
-
""
|
|
24776
|
-
].includes(chartType) ? d[1] - d[0] : d.value,
|
|
24777
|
-
formatOptions.toolTip.toolTipDisplayUnits,
|
|
24778
|
-
formatOptions.toolTip.toolTipNumberFormat,
|
|
24779
|
-
formatOptions.toolTip.toolTipDecimalPrecision
|
|
24780
|
-
)
|
|
24781
|
-
},
|
|
24782
|
-
{
|
|
24783
|
-
key: "Legend",
|
|
24784
|
-
value: d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend
|
|
24785
|
-
}
|
|
24786
|
-
],
|
|
24787
|
-
formatOptions,
|
|
24788
|
-
event2
|
|
24789
|
-
);
|
|
24790
|
-
}).on("mouseout", hideTooltipOnMouseOut);
|
|
24791
|
-
columnGroups.exit().remove();
|
|
24792
|
-
});
|
|
24714
|
+
}).on("mouseout", hideTooltipOnMouseOut);
|
|
24715
|
+
gTag.selectAll(".parentGroup").raise();
|
|
24793
24716
|
};
|
|
24794
24717
|
const setSVGContainer = (margin2) => {
|
|
24795
24718
|
innerWidth2 = width - margin2.left - margin2.right;
|
|
@@ -24803,14 +24726,12 @@
|
|
|
24803
24726
|
scrollPosition,
|
|
24804
24727
|
scrollPosition + visibleBars
|
|
24805
24728
|
);
|
|
24806
|
-
getYScale();
|
|
24807
24729
|
filteredData = JSON.parse(JSON.stringify(seriesData2));
|
|
24808
24730
|
filteredData.forEach(
|
|
24809
24731
|
(data2, i) => filteredData[i].data = data2.data.filter(
|
|
24810
24732
|
(d) => filteredDimension.includes(d.dimension)
|
|
24811
24733
|
)
|
|
24812
24734
|
);
|
|
24813
|
-
getYAxis();
|
|
24814
24735
|
svg2.append("rect").attr("x", margin2.left).attr("y", scrollbarY).attr("width", innerWidth22).attr("height", 8).attr("fill", "#ddd").attr("rx", 4);
|
|
24815
24736
|
const handleWidth = innerWidth22 * visibleBars / chartJSON.dimensionList.length;
|
|
24816
24737
|
const handle = svg2.append("rect").attr("x", margin2.left).attr("y", scrollbarY).attr("width", handleWidth).attr("height", 8).attr("fill", "#999").attr("rx", 4).style("cursor", "ew-resize").call(
|
|
@@ -24827,7 +24748,6 @@
|
|
|
24827
24748
|
scrollPosition,
|
|
24828
24749
|
scrollPosition + visibleBars
|
|
24829
24750
|
);
|
|
24830
|
-
getYScale();
|
|
24831
24751
|
filteredData = JSON.parse(JSON.stringify(seriesData2));
|
|
24832
24752
|
filteredData.forEach(
|
|
24833
24753
|
(data2, i) => filteredData[i].data = data2.data.filter(
|
|
@@ -24845,7 +24765,6 @@
|
|
|
24845
24765
|
scrollPosition = Math.max(0, Math.min(scrollPosition, scrollMax));
|
|
24846
24766
|
const x2 = margin2.left + (innerWidth22 - handleWidth) * scrollPosition / scrollMax;
|
|
24847
24767
|
handle.attr("x", x2);
|
|
24848
|
-
getYScale();
|
|
24849
24768
|
filteredData = JSON.parse(JSON.stringify(seriesData2));
|
|
24850
24769
|
filteredData.forEach(
|
|
24851
24770
|
(data2, i) => filteredData[i].data = data2.data.filter(
|
|
@@ -24859,48 +24778,13 @@
|
|
|
24859
24778
|
drawColumnChart();
|
|
24860
24779
|
};
|
|
24861
24780
|
const drawColumnChart = () => {
|
|
24862
|
-
|
|
24863
|
-
|
|
24864
|
-
formatOptions,
|
|
24865
|
-
gTag,
|
|
24866
|
-
yLabel,
|
|
24867
|
-
innerHeight2,
|
|
24868
|
-
innerWidth2,
|
|
24869
|
-
xAxisBottom
|
|
24870
|
-
);
|
|
24871
|
-
commonAnnotations(
|
|
24872
|
-
filteredData,
|
|
24873
|
-
yScale,
|
|
24874
|
-
xScaleBottom,
|
|
24875
|
-
xScaleTop,
|
|
24876
|
-
// need to pass secondary axis scale if secondary axis is drawn
|
|
24877
|
-
margin,
|
|
24878
|
-
d3Annotation,
|
|
24879
|
-
[],
|
|
24880
|
-
//this.labelExcludeList,
|
|
24881
|
-
[],
|
|
24882
|
-
//this.individualLabelColor,
|
|
24883
|
-
[],
|
|
24884
|
-
//this.attributes.Id ? formatOptions.plotArea.dataLabelsCoordinates : this.parentReference.objService.tempAnnotationArray
|
|
24885
|
-
formatOptions,
|
|
24886
|
-
chartType,
|
|
24887
|
-
height,
|
|
24888
|
-
width,
|
|
24889
|
-
innerWidth2,
|
|
24890
|
-
filteredDimension,
|
|
24891
|
-
innerHeight2,
|
|
24892
|
-
chartId,
|
|
24893
|
-
svg,
|
|
24894
|
-
yScaleLegends,
|
|
24895
|
-
columnWidth,
|
|
24896
|
-
false,
|
|
24897
|
-
barChart
|
|
24898
|
-
);
|
|
24781
|
+
initYaxis$1(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, innerHeight2);
|
|
24782
|
+
getChartType();
|
|
24899
24783
|
};
|
|
24900
24784
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24901
24785
|
"svg",
|
|
24902
24786
|
{
|
|
24903
|
-
className: "
|
|
24787
|
+
className: "className",
|
|
24904
24788
|
ref: svgRef,
|
|
24905
24789
|
id: chartId,
|
|
24906
24790
|
style: { width: "100%", height: "100%" }
|
|
@@ -26718,7 +26602,7 @@
|
|
|
26718
26602
|
};
|
|
26719
26603
|
const defineChartRadius = () => {
|
|
26720
26604
|
try {
|
|
26721
|
-
radius = Math.min(innerHeight2 * 0.
|
|
26605
|
+
radius = Math.min(innerHeight2 * 0.5, innerWidth2 * 0.5);
|
|
26722
26606
|
outsideDataLabelFlag ? radius = radius * 0.9 : null;
|
|
26723
26607
|
} catch (error) {
|
|
26724
26608
|
logError$2(fileName$8, "defineChartRadius", error);
|
|
@@ -26772,7 +26656,9 @@
|
|
|
26772
26656
|
},
|
|
26773
26657
|
{ key: "Legend", value: d.currentTarget.__data__.data.legend }
|
|
26774
26658
|
],
|
|
26775
|
-
chartFormatOptions
|
|
26659
|
+
chartFormatOptions,
|
|
26660
|
+
void 0,
|
|
26661
|
+
d.currentTarget.__data__.data.properties
|
|
26776
26662
|
);
|
|
26777
26663
|
}).on("mouseout.text", () => {
|
|
26778
26664
|
hideTooltipOnMouseOut();
|
|
@@ -26792,16 +26678,20 @@
|
|
|
26792
26678
|
return "";
|
|
26793
26679
|
}
|
|
26794
26680
|
};
|
|
26795
|
-
const getDataLabelTransformString = (d) => {
|
|
26681
|
+
const getDataLabelTransformString = (d, isSingleDataLabel) => {
|
|
26796
26682
|
try {
|
|
26797
|
-
|
|
26798
|
-
|
|
26799
|
-
|
|
26800
|
-
|
|
26801
|
-
|
|
26802
|
-
|
|
26803
|
-
|
|
26804
|
-
|
|
26683
|
+
if (isSingleDataLabel) {
|
|
26684
|
+
return `translate(0 0)`;
|
|
26685
|
+
} else {
|
|
26686
|
+
const midAngle = (d.startAngle + d.endAngle) / 2;
|
|
26687
|
+
const x2 = Math.cos(midAngle - Math.PI / 2) * (radius * 0.65);
|
|
26688
|
+
const y2 = Math.sin(midAngle - Math.PI / 2) * (radius * 0.65);
|
|
26689
|
+
let rotate = midAngle * 180 / Math.PI % 360;
|
|
26690
|
+
let angle = 0;
|
|
26691
|
+
rotate > 180 && rotate < 360 ? angle = 90 : angle = -90;
|
|
26692
|
+
rotate += angle;
|
|
26693
|
+
return `translate(${x2},${y2}) rotate(${rotate})`;
|
|
26694
|
+
}
|
|
26805
26695
|
} catch (error) {
|
|
26806
26696
|
logError$2(fileName$8, "getDataLabelTransformString", error);
|
|
26807
26697
|
return "";
|
|
@@ -26810,6 +26700,7 @@
|
|
|
26810
26700
|
const drawPieDataLabels = () => {
|
|
26811
26701
|
try {
|
|
26812
26702
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
26703
|
+
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
26813
26704
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
26814
26705
|
pieChartData.filter(
|
|
26815
26706
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
@@ -26828,7 +26719,7 @@
|
|
|
26828
26719
|
).attr(
|
|
26829
26720
|
"font-family",
|
|
26830
26721
|
(d) => d.data.properties?.labelFont ?? "Helvetica"
|
|
26831
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
26722
|
+
).attr("transform", (d) => getDataLabelTransformString(d, isSingleDataLabel)).attr("visibility", (d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible").attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
26832
26723
|
const { plotArea } = chartFormatOptions;
|
|
26833
26724
|
if (plotArea.dataLabelName) {
|
|
26834
26725
|
return d.data.legend;
|
|
@@ -26853,7 +26744,7 @@
|
|
|
26853
26744
|
).attr(
|
|
26854
26745
|
"font-family",
|
|
26855
26746
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
26856
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
26747
|
+
).attr("transform", (d) => getDataLabelTransformString(d, isSingleDataLabel)).attr("visibility", (d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible").attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
26857
26748
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
26858
26749
|
const dataValue = d.data.data[0].value;
|
|
26859
26750
|
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
@@ -27065,7 +26956,7 @@
|
|
|
27065
26956
|
};
|
|
27066
26957
|
const defineChartRadius = () => {
|
|
27067
26958
|
try {
|
|
27068
|
-
radius = Math.min(innerHeight2 * 0.
|
|
26959
|
+
radius = Math.min(innerHeight2 * 0.5, innerWidth2 * 0.5);
|
|
27069
26960
|
outsideDataLabelFlag ? radius = radius * 0.9 : null;
|
|
27070
26961
|
innerRadius = Math.min(
|
|
27071
26962
|
convertStringToNumber(chartFormatOptions.plotArea.innerRadius) / 100 * radius,
|
|
@@ -27131,7 +27022,9 @@
|
|
|
27131
27022
|
},
|
|
27132
27023
|
{ key: "Legend", value: d.currentTarget.__data__.data.legend }
|
|
27133
27024
|
],
|
|
27134
|
-
chartFormatOptions
|
|
27025
|
+
chartFormatOptions,
|
|
27026
|
+
void 0,
|
|
27027
|
+
d.currentTarget.__data__.data.properties
|
|
27135
27028
|
);
|
|
27136
27029
|
}).on("mouseout.text", () => hideTooltipOnMouseOut()).on("mouseout.arc", function() {
|
|
27137
27030
|
if (enableTransition) ;
|
|
@@ -27155,17 +27048,21 @@
|
|
|
27155
27048
|
return "";
|
|
27156
27049
|
}
|
|
27157
27050
|
};
|
|
27158
|
-
const getDataLabelTransformString = (d) => {
|
|
27051
|
+
const getDataLabelTransformString = (d, isSingleDataLabel) => {
|
|
27159
27052
|
try {
|
|
27160
|
-
|
|
27161
|
-
|
|
27162
|
-
|
|
27163
|
-
|
|
27164
|
-
|
|
27165
|
-
|
|
27166
|
-
|
|
27167
|
-
|
|
27168
|
-
|
|
27053
|
+
if (isSingleDataLabel) {
|
|
27054
|
+
return `translate(0 0)`;
|
|
27055
|
+
} else {
|
|
27056
|
+
const midAngle = (d.startAngle + d.endAngle) / 2;
|
|
27057
|
+
const labelRadius = (innerRadius + radius) / 2;
|
|
27058
|
+
const x2 = Math.cos(midAngle - Math.PI / 2) * labelRadius;
|
|
27059
|
+
const y2 = Math.sin(midAngle - Math.PI / 2) * labelRadius;
|
|
27060
|
+
let rotate = midAngle * 180 / Math.PI % 360;
|
|
27061
|
+
let angle = 0;
|
|
27062
|
+
rotate > 180 && rotate < 360 ? angle = 90 : angle = -90;
|
|
27063
|
+
rotate += angle;
|
|
27064
|
+
return `translate(${x2},${y2}) rotate(${rotate})`;
|
|
27065
|
+
}
|
|
27169
27066
|
} catch (error) {
|
|
27170
27067
|
logError$2(fileName$7, "getDataLabelTransformString", error);
|
|
27171
27068
|
return "";
|
|
@@ -27174,6 +27071,7 @@
|
|
|
27174
27071
|
const drawDonutDataLabels = () => {
|
|
27175
27072
|
try {
|
|
27176
27073
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
27074
|
+
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
27177
27075
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
27178
27076
|
pieChartData.filter(
|
|
27179
27077
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
@@ -27192,7 +27090,7 @@
|
|
|
27192
27090
|
).attr(
|
|
27193
27091
|
"font-family",
|
|
27194
27092
|
(d) => d.data.properties?.labelFont ?? "Helvetica"
|
|
27195
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
27093
|
+
).attr("transform", (d) => getDataLabelTransformString(d, isSingleDataLabel)).attr("visibility", (d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible").attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
27196
27094
|
const { plotArea } = chartFormatOptions;
|
|
27197
27095
|
if (plotArea.dataLabelName) {
|
|
27198
27096
|
return d.data.legend;
|
|
@@ -27203,7 +27101,7 @@
|
|
|
27203
27101
|
pieChartData.filter(
|
|
27204
27102
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
27205
27103
|
)
|
|
27206
|
-
).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr("fill", (d) => d.data.properties?.
|
|
27104
|
+
).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr("fill", (d) => d.data.properties?.lableFontColor ?? "#000000").attr(
|
|
27207
27105
|
"font-style",
|
|
27208
27106
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27209
27107
|
).attr(
|
|
@@ -27217,7 +27115,7 @@
|
|
|
27217
27115
|
).attr(
|
|
27218
27116
|
"font-family",
|
|
27219
27117
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
27220
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
27118
|
+
).attr("transform", (d) => getDataLabelTransformString(d, isSingleDataLabel)).attr("visibility", (d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible").attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
27221
27119
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
27222
27120
|
const dataValue = d.data.data[0].value;
|
|
27223
27121
|
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
@@ -27284,69 +27182,7 @@
|
|
|
27284
27182
|
const textWidth = 80;
|
|
27285
27183
|
const xOffset = midangle < Math.PI ? 0 : -textWidth;
|
|
27286
27184
|
return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
|
|
27287
|
-
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px")
|
|
27288
|
-
try {
|
|
27289
|
-
let value2 = d.data.data[0].value.toString();
|
|
27290
|
-
if (d.data.data[0].value !== void 0) {
|
|
27291
|
-
value2 = chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%" ? (Math.abs(d.data.data[0].value / pieTotalValue) * 100).toFixed(
|
|
27292
|
-
convertStringToNumber(
|
|
27293
|
-
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
27294
|
-
)
|
|
27295
|
-
) + "%" : getNumberWithFormatFunction(
|
|
27296
|
-
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
27297
|
-
chartFormatOptions.plotArea.dataLabelNumberFormat,
|
|
27298
|
-
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
27299
|
-
)(d.data.data[0].value);
|
|
27300
|
-
}
|
|
27301
|
-
let htmlString = "";
|
|
27302
|
-
if (chartFormatOptions.plotArea.dataLabelName) {
|
|
27303
|
-
htmlString += `<span style="
|
|
27304
|
-
font-size: ${d.data.properties.labelFontSize}px;
|
|
27305
|
-
color: ${d.data.properties.labelFontColor};
|
|
27306
|
-
font-style: ${d.data.properties.labelFontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""};
|
|
27307
|
-
text-decoration: ${d.data.properties.labelFontStyle.includes(
|
|
27308
|
-
fontStyleOptions.underline
|
|
27309
|
-
) ? fontStyleOptions.underline : ""};
|
|
27310
|
-
font-weight: ${d.data.properties.labelFontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : ""};
|
|
27311
|
-
font-family: ${d.data.properties.labelFont};
|
|
27312
|
-
display: block; white-space: nowrap; width:80px; overflow:hidden; text-overflow:ellipsis; text-align: center;">
|
|
27313
|
-
${d.data.legend}
|
|
27314
|
-
</span>`;
|
|
27315
|
-
}
|
|
27316
|
-
if (chartFormatOptions.plotArea.dataLabelValue && d.data.data[0].value !== void 0) {
|
|
27317
|
-
htmlString += `<span style="
|
|
27318
|
-
font-size: ${d.data.properties.valueFontSize}px;
|
|
27319
|
-
color: ${d.data.properties.valueFontColor};
|
|
27320
|
-
font-style: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""};
|
|
27321
|
-
text-decoration: ${d.data.properties.valueFontStyle.includes(
|
|
27322
|
-
fontStyleOptions.underline
|
|
27323
|
-
) ? fontStyleOptions.underline : ""};
|
|
27324
|
-
font-weight: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : "300"};
|
|
27325
|
-
font-family: ${d.data.properties.valueFont};
|
|
27326
|
-
display: block;">
|
|
27327
|
-
${value2}
|
|
27328
|
-
</span>`;
|
|
27329
|
-
}
|
|
27330
|
-
if (chartFormatOptions.plotArea.plotAreaAbsoluteValue && d.data[0].value !== void 0) {
|
|
27331
|
-
htmlString += `<span style="
|
|
27332
|
-
font-size: ${d.data.properties.valueFontSize}px;
|
|
27333
|
-
color: ${d.data.properties.valueFontColor};
|
|
27334
|
-
font-style: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""};
|
|
27335
|
-
text-decoration: ${d.data.properties.valueFontStyle.includes(
|
|
27336
|
-
fontStyleOptions.underline
|
|
27337
|
-
) ? fontStyleOptions.underline : ""};
|
|
27338
|
-
font-weight: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : "300"};
|
|
27339
|
-
font-family: ${d.data.properties.valueFont};
|
|
27340
|
-
display: block;">
|
|
27341
|
-
${format(".2s")(d.data[0].value)}
|
|
27342
|
-
</span>`;
|
|
27343
|
-
}
|
|
27344
|
-
return htmlString;
|
|
27345
|
-
} catch (error) {
|
|
27346
|
-
logError$2(fileName$7, "drawDonutDataLabels", error);
|
|
27347
|
-
return "";
|
|
27348
|
-
}
|
|
27349
|
-
});
|
|
27185
|
+
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px");
|
|
27350
27186
|
}
|
|
27351
27187
|
} catch (error) {
|
|
27352
27188
|
logError$2(fileName$7, "drawDonutDataLabels", error);
|
|
@@ -27544,7 +27380,9 @@
|
|
|
27544
27380
|
)(data2.data.data[1].value)
|
|
27545
27381
|
} : ""
|
|
27546
27382
|
],
|
|
27547
|
-
chartFormatOptions
|
|
27383
|
+
chartFormatOptions,
|
|
27384
|
+
void 0,
|
|
27385
|
+
d.currentTarget.__data__.data.properties
|
|
27548
27386
|
);
|
|
27549
27387
|
}).on("mouseout", () => hideTooltipOnMouseOut());
|
|
27550
27388
|
leaf.append("clipPath").attr("id", (d, i) => `clip-${i}-${chartId}`).append("rect").attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0);
|
|
@@ -27727,7 +27565,9 @@
|
|
|
27727
27565
|
},
|
|
27728
27566
|
{ key: "Legend", value: d.currentTarget.__data__.data.legend }
|
|
27729
27567
|
],
|
|
27730
|
-
chartFormatOptions
|
|
27568
|
+
chartFormatOptions,
|
|
27569
|
+
void 0,
|
|
27570
|
+
d.currentTarget.__data__.data.properties
|
|
27731
27571
|
);
|
|
27732
27572
|
}).on("mouseout.text", () => {
|
|
27733
27573
|
hideTooltipOnMouseOut();
|
|
@@ -27793,7 +27633,9 @@
|
|
|
27793
27633
|
},
|
|
27794
27634
|
{ key: "Legend", value: d.currentTarget.__data__.data.legend }
|
|
27795
27635
|
],
|
|
27796
|
-
chartFormatOptions
|
|
27636
|
+
chartFormatOptions,
|
|
27637
|
+
void 0,
|
|
27638
|
+
d.currentTarget.__data__.data.properties
|
|
27797
27639
|
);
|
|
27798
27640
|
}).on("mouseout.text", () => {
|
|
27799
27641
|
hideTooltipOnMouseOut();
|
|
@@ -28129,13 +27971,13 @@
|
|
|
28129
27971
|
${centerX + bottomWidth / 2},${yBottom}
|
|
28130
27972
|
${centerX - bottomWidth / 2},${yBottom}
|
|
28131
27973
|
`
|
|
28132
|
-
).attr("fill", d.properties.color || "#4cb2ff").on("mousemove", function() {
|
|
27974
|
+
).attr("fill", d.properties.color || "#4cb2ff").on("mousemove", function(d2) {
|
|
28133
27975
|
try {
|
|
28134
27976
|
showTooltipOnMouseMove(
|
|
28135
27977
|
[
|
|
28136
27978
|
{
|
|
28137
|
-
key:
|
|
28138
|
-
value: chartFormatOptions.toolTip.toolTipNumberFormat == ",.0%" ?
|
|
27979
|
+
key: d2.legend,
|
|
27980
|
+
value: chartFormatOptions.toolTip.toolTipNumberFormat == ",.0%" ? d2.data[0].value ? (Math.abs(d2.data[0].value / pyramidTotalValue) * 100).toFixed(
|
|
28139
27981
|
convertStringToNumber(
|
|
28140
27982
|
chartFormatOptions.toolTip.toolTipDecimalPrecision
|
|
28141
27983
|
)
|
|
@@ -28143,10 +27985,12 @@
|
|
|
28143
27985
|
"None",
|
|
28144
27986
|
chartFormatOptions.toolTip.toolTipNumberFormat,
|
|
28145
27987
|
chartFormatOptions.toolTip.toolTipDecimalPrecision
|
|
28146
|
-
)(
|
|
27988
|
+
)(d2.data[0].value)
|
|
28147
27989
|
}
|
|
28148
27990
|
],
|
|
28149
|
-
chartFormatOptions
|
|
27991
|
+
chartFormatOptions,
|
|
27992
|
+
void 0,
|
|
27993
|
+
d2.currentTarget.__data__.data.properties
|
|
28150
27994
|
);
|
|
28151
27995
|
select$2(this).style("opacity", 0.8).style("stroke", chartFormatOptions.chartArea.chartAreaColor).style("stroke-width", "3px");
|
|
28152
27996
|
} catch (error) {
|
|
@@ -28478,7 +28322,9 @@
|
|
|
28478
28322
|
)(maxValue)
|
|
28479
28323
|
}
|
|
28480
28324
|
],
|
|
28481
|
-
chartFormatOptions
|
|
28325
|
+
chartFormatOptions,
|
|
28326
|
+
void 0,
|
|
28327
|
+
d.currentTarget.__data__.data.properties
|
|
28482
28328
|
);
|
|
28483
28329
|
} catch (error) {
|
|
28484
28330
|
logError$2(
|
|
@@ -28931,7 +28777,9 @@
|
|
|
28931
28777
|
)(data[index2].data[0].value)
|
|
28932
28778
|
}
|
|
28933
28779
|
],
|
|
28934
|
-
chartFormatOptions
|
|
28780
|
+
chartFormatOptions,
|
|
28781
|
+
void 0,
|
|
28782
|
+
d.currentTarget.__data__.data.properties
|
|
28935
28783
|
);
|
|
28936
28784
|
}).on("mouseout", () => {
|
|
28937
28785
|
hideTooltipOnMouseOut();
|
|
@@ -29296,7 +29144,9 @@
|
|
|
29296
29144
|
},
|
|
29297
29145
|
{ key: "Legend", value: d.properties.alias }
|
|
29298
29146
|
],
|
|
29299
|
-
chartFormatOptions
|
|
29147
|
+
chartFormatOptions,
|
|
29148
|
+
void 0,
|
|
29149
|
+
d.properties
|
|
29300
29150
|
);
|
|
29301
29151
|
}).on("mouseout", () => {
|
|
29302
29152
|
hideTooltipOnMouseOut();
|
|
@@ -29857,7 +29707,9 @@
|
|
|
29857
29707
|
value: totalMeasureValue
|
|
29858
29708
|
}
|
|
29859
29709
|
],
|
|
29860
|
-
chartFormatOptions
|
|
29710
|
+
chartFormatOptions,
|
|
29711
|
+
void 0,
|
|
29712
|
+
d.properties
|
|
29861
29713
|
);
|
|
29862
29714
|
} catch (error) {
|
|
29863
29715
|
logError$2(fileName$2, "draw-mousemove", error);
|
|
@@ -33326,7 +33178,9 @@
|
|
|
33326
33178
|
)(d.size)
|
|
33327
33179
|
}
|
|
33328
33180
|
],
|
|
33329
|
-
chartFormatOptions
|
|
33181
|
+
chartFormatOptions,
|
|
33182
|
+
void 0,
|
|
33183
|
+
d.properties
|
|
33330
33184
|
);
|
|
33331
33185
|
let selection2 = select$2(this).transition("tooltip").duration(10);
|
|
33332
33186
|
selection2.selectAll("path").style("stroke-dasharray", "5,5").style("stroke-opacity", 1).style("stroke", "black");
|
|
@@ -34075,7 +33929,9 @@
|
|
|
34075
33929
|
)(d.value)
|
|
34076
33930
|
}
|
|
34077
33931
|
],
|
|
34078
|
-
chartFormatOptions
|
|
33932
|
+
chartFormatOptions,
|
|
33933
|
+
void 0,
|
|
33934
|
+
d.currentTarget.__data__.data.properties
|
|
34079
33935
|
);
|
|
34080
33936
|
}
|
|
34081
33937
|
chartAreaTagG.selectAll(".sankey-nodes").style("fill-opacity", 0.1).style("stroke", "none");
|
|
@@ -34144,7 +34000,7 @@
|
|
|
34144
34000
|
showTooltipOnMouseMove(
|
|
34145
34001
|
[
|
|
34146
34002
|
{
|
|
34147
|
-
key: d.source.name + "→" + d.target.name,
|
|
34003
|
+
key: d.source.name.split("~$~")[1] + "→" + d.target.name.split("~$~")[1],
|
|
34148
34004
|
value: getNumberWithFormatFunction(
|
|
34149
34005
|
"None",
|
|
34150
34006
|
chartFormatOptions.toolTip.toolTipNumberFormat,
|
|
@@ -34152,7 +34008,9 @@
|
|
|
34152
34008
|
)(d.value)
|
|
34153
34009
|
}
|
|
34154
34010
|
],
|
|
34155
|
-
chartFormatOptions
|
|
34011
|
+
chartFormatOptions,
|
|
34012
|
+
void 0,
|
|
34013
|
+
{ markerColor: d.source.color, markerShape: "circle" }
|
|
34156
34014
|
);
|
|
34157
34015
|
}
|
|
34158
34016
|
} catch (error) {
|
|
@@ -49610,7 +49468,9 @@
|
|
|
49610
49468
|
},
|
|
49611
49469
|
...keyValueObject
|
|
49612
49470
|
],
|
|
49613
|
-
chartFormatOptions
|
|
49471
|
+
chartFormatOptions,
|
|
49472
|
+
void 0,
|
|
49473
|
+
d.currentTarget.__data__.data.properties
|
|
49614
49474
|
);
|
|
49615
49475
|
}
|
|
49616
49476
|
}).on("mouseout", (event2, d) => {
|
|
@@ -49720,7 +49580,9 @@
|
|
|
49720
49580
|
)(d.properties.data?.data[1]?.value)
|
|
49721
49581
|
}
|
|
49722
49582
|
],
|
|
49723
|
-
chartFormatOptions
|
|
49583
|
+
chartFormatOptions,
|
|
49584
|
+
void 0,
|
|
49585
|
+
d.currentTarget.__data__.data.properties
|
|
49724
49586
|
);
|
|
49725
49587
|
select$2(this).style(
|
|
49726
49588
|
"r",
|
|
@@ -53694,25 +53556,30 @@
|
|
|
53694
53556
|
barGroups = barGroupsEnter.merge(barGroups);
|
|
53695
53557
|
let rects = barGroups.selectAll("rect").data((d) => d, (d) => d.key || d.Key);
|
|
53696
53558
|
const rectsEnter = rects.enter().append("rect").attr("class", "rect").attr("class", (d) => d.key ? d.key.replace(/ /g, "-") : d.Key.replace(/ /g, "-")).attr("x", (d) => xScale(d.data.dimension || d.data.legend)).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr("height", (d) => d[1] ? yScaleLeft(d[0]) - yScaleLeft(d[1]) : 0).attr("width", xScale.bandwidth()).attr("visibility", (d) => k2 === 0 && d.data.dimension && stackTotalData ? "hidden" : "visible").style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
53697
|
-
showTooltipOnMouseMove(
|
|
53698
|
-
|
|
53699
|
-
|
|
53700
|
-
|
|
53701
|
-
|
|
53702
|
-
|
|
53703
|
-
|
|
53704
|
-
|
|
53705
|
-
d.key === "
|
|
53706
|
-
|
|
53707
|
-
|
|
53708
|
-
|
|
53709
|
-
|
|
53710
|
-
|
|
53711
|
-
|
|
53712
|
-
|
|
53713
|
-
|
|
53714
|
-
|
|
53715
|
-
|
|
53559
|
+
showTooltipOnMouseMove(
|
|
53560
|
+
[
|
|
53561
|
+
{
|
|
53562
|
+
key: d.key === "dimensionTotal" ? "Dimension" : formatOptions.xAxisTitle.xAxisTitleText,
|
|
53563
|
+
value: chartJSON.formattedDimensionListMap.get(d.data.dimension)
|
|
53564
|
+
},
|
|
53565
|
+
{
|
|
53566
|
+
key: formatOptions.yAxisTitle.yAxisTitleText,
|
|
53567
|
+
value: (d.key === "up" ? "+" : d.key === "down" ? "-" : "") + getNumberWithFormat(
|
|
53568
|
+
d.key === "dimensionTotal" ? d.data.dimensionTotal : d[1] - d[0],
|
|
53569
|
+
formatOptions.toolTip.toolTipDisplayUnits,
|
|
53570
|
+
formatOptions.toolTip.toolTipNumberFormat,
|
|
53571
|
+
formatOptions.toolTip.toolTipDecimalPrecision
|
|
53572
|
+
)
|
|
53573
|
+
},
|
|
53574
|
+
{
|
|
53575
|
+
key: "Legend",
|
|
53576
|
+
value: d.Key ? d.Key.includes("~$~") ? d.Key.split("~$~")[1] : d.Key : d.data.legend ? d.data.legend.includes("~$~") ? d.data.legend.split("~$~")[1] : d.data.legend : "Total"
|
|
53577
|
+
}
|
|
53578
|
+
],
|
|
53579
|
+
formatOptions,
|
|
53580
|
+
void 0,
|
|
53581
|
+
d.currentTarget.__data__.data.properties
|
|
53582
|
+
);
|
|
53716
53583
|
}).on("mouseout", () => {
|
|
53717
53584
|
hideTooltipOnMouseOut();
|
|
53718
53585
|
});
|
|
@@ -54277,14 +54144,19 @@
|
|
|
54277
54144
|
...child,
|
|
54278
54145
|
parentProperties: d.properties
|
|
54279
54146
|
}))).enter().append("rect").attr("class", "rect").attr("y", (d) => d.dimension ? yScaleLeft(d.dimension) : yScaleLeft("defaultEntry")).attr("x", (d) => xScale(Math.min(0, d.value))).attr("stroke-dasharray", (d) => d.stackBorderStyle == 2 ? "5,3" : "0").attr("stroke-width", (d) => d.stackBorderWidth + "px").attr("stroke", (d) => d.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? d.stackBorderColor : "none").style("shape-rendering", "crispEdges").attr("width", (d) => d.value ? Math.abs(xScale(d.value) - xScale(0)) : 0).attr("height", yScaleLeft.bandwidth()).style("fill", (d) => d.parentProperties.color).attr("opacity", 1).on("mousemove", (event2, d) => {
|
|
54280
|
-
showTooltipOnMouseMove(
|
|
54281
|
-
|
|
54282
|
-
|
|
54283
|
-
|
|
54284
|
-
|
|
54285
|
-
|
|
54286
|
-
|
|
54287
|
-
|
|
54147
|
+
showTooltipOnMouseMove(
|
|
54148
|
+
[
|
|
54149
|
+
{ key: "Measure", value: d.legend },
|
|
54150
|
+
{ key: "Legend", value: d.dimension },
|
|
54151
|
+
{
|
|
54152
|
+
key: "Value",
|
|
54153
|
+
value: d.value < 0 ? getNumberWithFormat(-d.value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, true) : getNumberWithFormat(d.value, formatOptions.toolTip.toolTipDisplayUnits, formatOptions.toolTip.toolTipNumberFormat, formatOptions.toolTip.toolTipDecimalPrecision, true)
|
|
54154
|
+
}
|
|
54155
|
+
],
|
|
54156
|
+
formatOptions,
|
|
54157
|
+
void 0,
|
|
54158
|
+
d.currentTarget.__data__.data.properties
|
|
54159
|
+
);
|
|
54288
54160
|
}).on("mouseout", () => {
|
|
54289
54161
|
hideTooltipOnMouseOut();
|
|
54290
54162
|
});
|