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
|
@@ -11602,7 +11602,7 @@ function computeMarginMetrics(windowWidth, windowHeight, maxNumberForPrimaryAxis
|
|
|
11602
11602
|
"Helvetica"
|
|
11603
11603
|
)[1] : 0;
|
|
11604
11604
|
yTitle = yTitle > width * 0.1 ? width * 0.1 : yTitle;
|
|
11605
|
-
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0);
|
|
11605
|
+
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) + 10 : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0) + 10;
|
|
11606
11606
|
yLabel += 8;
|
|
11607
11607
|
let secondaryYLabel = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? responsiveYaxisMargin(
|
|
11608
11608
|
maxNumberForSecondaryAxis,
|
|
@@ -15514,11 +15514,11 @@ const drawChartTitle = (chartSvg, chartTitleHeight, chartTitleWidth, chartFormat
|
|
|
15514
15514
|
chartFormatOptions.chartTitle.chartTitleVisibility ? "visible" : "hidden"
|
|
15515
15515
|
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", chartTitleWidth).attr("height", chartTitleHeight + "px");
|
|
15516
15516
|
if (chartFormatOptions.chartTitle.dynamicTitleText.length !== 0) {
|
|
15517
|
-
object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", chartFormatOptions.chartTitle.chartTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").html(
|
|
15517
|
+
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(
|
|
15518
15518
|
chartFormatOptions.chartTitle.chartTitleHTML ? chartFormatOptions.chartTitle.chartTitleHTML : chartFormatOptions.chartTitle.chartTitleText
|
|
15519
15519
|
);
|
|
15520
15520
|
} else {
|
|
15521
|
-
object2.append("xhtml:div").style("white-space", "pre").style("user-select", "none").style("text-overflow", "ellipsis").style("overflow", "
|
|
15521
|
+
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(
|
|
15522
15522
|
"font-family",
|
|
15523
15523
|
chartFormatOptions.chartTitle.chartTitleFontFamily
|
|
15524
15524
|
).attr("title", chartFormatOptions.chartTitle.chartTitleText).html(chartFormatOptions.chartTitle.chartTitleText);
|
|
@@ -15564,14 +15564,14 @@ const legendsWithScroll = (svg, seriesData, x2, y2, width, height, legendPositio
|
|
|
15564
15564
|
if (chartFormatOptions.legends.onHoverEffect) {
|
|
15565
15565
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
15566
15566
|
selectAll(
|
|
15567
|
-
'[hoverId="' + this.textContent.replace(/ /g, "-") + '"]'
|
|
15567
|
+
'[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
|
|
15568
15568
|
).classed("highlight", true).classed("unhighlight", false);
|
|
15569
15569
|
}
|
|
15570
15570
|
}).on("mouseout", function(d2) {
|
|
15571
15571
|
if (chartFormatOptions.legends.onHoverEffect) {
|
|
15572
15572
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
15573
15573
|
selectAll(
|
|
15574
|
-
'[hoverId="' + this.textContent.replace(/ /g, "-") + '"]'
|
|
15574
|
+
'[hoverId="' + ((this.textContent.match(/\(([^)]+)\)/) || [])[1] || this.textContent).replace(/ /g, "-") + '"]'
|
|
15575
15575
|
).classed("highlight", false).classed("unhighlight", false);
|
|
15576
15576
|
}
|
|
15577
15577
|
});
|
|
@@ -15774,6 +15774,7 @@ const firstFunctionBeforeRender = (svgRef, formatOptions) => {
|
|
|
15774
15774
|
const marginCalculationsForChartsWithoutAxis = (chartFormatOptions, width, height, maxLegendDimensions, margins, isVennChart = false) => {
|
|
15775
15775
|
try {
|
|
15776
15776
|
let legendPosition = chartFormatOptions.legends.legendPosition;
|
|
15777
|
+
legendPosition = chartFormatOptions.legends.legendVisibility ? chartFormatOptions.legends.legendPosition : staticLegendPosition.none;
|
|
15777
15778
|
let width15Percent = width * 0.15 * 0.8;
|
|
15778
15779
|
let legendListWidth = isVennChart ? maxLegendDimensions[0] : width15Percent < maxLegendDimensions[0] + 15 ? width15Percent : maxLegendDimensions[0] + 15;
|
|
15779
15780
|
let chartTitleHeight = chartFormatOptions.chartTitle.chartTitleVisibility ? chartFormatOptions.chartTitle.dynamicTitleText.length !== 0 ? preCalculateTextDimensions(
|
|
@@ -15787,10 +15788,10 @@ const marginCalculationsForChartsWithoutAxis = (chartFormatOptions, width, heigh
|
|
|
15787
15788
|
).height : 5;
|
|
15788
15789
|
switch (legendPosition) {
|
|
15789
15790
|
case staticLegendPosition.none:
|
|
15790
|
-
margins.top = chartTitleHeight +
|
|
15791
|
-
margins.bottom =
|
|
15792
|
-
margins.right =
|
|
15793
|
-
margins.left =
|
|
15791
|
+
margins.top = chartTitleHeight + 10;
|
|
15792
|
+
margins.bottom = 15;
|
|
15793
|
+
margins.right = 15;
|
|
15794
|
+
margins.left = 15;
|
|
15794
15795
|
break;
|
|
15795
15796
|
case staticLegendPosition.top:
|
|
15796
15797
|
margins.top = chartTitleHeight + 50;
|
|
@@ -16678,7 +16679,10 @@ const CustomColumnChart = ({
|
|
|
16678
16679
|
let stackChartData = [];
|
|
16679
16680
|
const chartType = actualChartTypes.customColumnChart;
|
|
16680
16681
|
const svgRef = useRef();
|
|
16681
|
-
const seriesData = generalizedChartData(
|
|
16682
|
+
const seriesData = generalizedChartData(
|
|
16683
|
+
data.ChartData,
|
|
16684
|
+
data.DimensionList
|
|
16685
|
+
);
|
|
16682
16686
|
const dimensionList = data.DimensionList;
|
|
16683
16687
|
const barChart = false;
|
|
16684
16688
|
let isSecondaryAxisDrawn = false;
|
|
@@ -17169,7 +17173,9 @@ const CustomColumnChart = ({
|
|
|
17169
17173
|
)
|
|
17170
17174
|
).tickSize(
|
|
17171
17175
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
|
|
17172
|
-
).tickValues(
|
|
17176
|
+
).tickValues(
|
|
17177
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
17178
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
17173
17179
|
}
|
|
17174
17180
|
if (isSecondaryAxisDrawn) {
|
|
17175
17181
|
yAxisRight = axisRight(yScaleRight).tickFormat(
|
|
@@ -19908,7 +19914,7 @@ const ColumnHistogramChart = ({
|
|
|
19908
19914
|
const columnWidth = 0;
|
|
19909
19915
|
const chartType = actualChartTypes.columnHistogram;
|
|
19910
19916
|
const svgRef = useRef();
|
|
19911
|
-
const seriesData =
|
|
19917
|
+
const seriesData = data.ChartData;
|
|
19912
19918
|
const dimensionList = data.DimensionList;
|
|
19913
19919
|
const barChart = false;
|
|
19914
19920
|
const isSecondaryAxisDrawn = false;
|
|
@@ -20202,7 +20208,8 @@ const ColumnHistogramChart = ({
|
|
|
20202
20208
|
};
|
|
20203
20209
|
const initScale = () => {
|
|
20204
20210
|
xScale = linear$1().domain([chartJSON.xMin, chartJSON.xMax]).range([0, innerWidth2]);
|
|
20205
|
-
|
|
20211
|
+
const numberOfBins = periods.length > 0 ? periods : xScale.ticks(thresholds);
|
|
20212
|
+
let histogram = bin().value((d) => d).domain(xScale.domain()).thresholds(numberOfBins);
|
|
20206
20213
|
filteredData.forEach((d) => {
|
|
20207
20214
|
let tempArray = histogram(d.data.map((val) => val.value));
|
|
20208
20215
|
bins.push(tempArray);
|
|
@@ -20260,7 +20267,7 @@ const ColumnHistogramChart = ({
|
|
|
20260
20267
|
)
|
|
20261
20268
|
).tickSize(
|
|
20262
20269
|
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
|
|
20263
|
-
).
|
|
20270
|
+
).tickSizeOuter(0);
|
|
20264
20271
|
formatOptions.bins.binsCalculation === "Automatic" ? xAxis.ticks(thresholds) : xAxis.tickValues(periods).ticks(innerWidth2 / 50);
|
|
20265
20272
|
};
|
|
20266
20273
|
const getChartType = (lineData) => {
|
|
@@ -20292,6 +20299,7 @@ const ColumnHistogramChart = ({
|
|
|
20292
20299
|
event2
|
|
20293
20300
|
);
|
|
20294
20301
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
20302
|
+
gTag.selectAll(".parentGroup").raise();
|
|
20295
20303
|
};
|
|
20296
20304
|
const setSVGContainer = (margin2) => {
|
|
20297
20305
|
innerWidth2 = width - margin2.left - margin2.right;
|
|
@@ -20311,7 +20319,6 @@ const ColumnHistogramChart = ({
|
|
|
20311
20319
|
(d) => filteredDimension.includes(d.dimension)
|
|
20312
20320
|
)
|
|
20313
20321
|
);
|
|
20314
|
-
getXAxis();
|
|
20315
20322
|
svg2.append("rect").attr("x", margin2.left).attr("y", scrollbarY).attr("width", innerWidth22).attr("height", 8).attr("fill", "#ddd").attr("rx", 4);
|
|
20316
20323
|
const handleWidth = innerWidth22 * visibleBars / chartJSON.dimensionList.length;
|
|
20317
20324
|
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(
|
|
@@ -20358,7 +20365,6 @@ const ColumnHistogramChart = ({
|
|
|
20358
20365
|
drawColumnChart();
|
|
20359
20366
|
};
|
|
20360
20367
|
const drawColumnChart = () => {
|
|
20361
|
-
getChartType();
|
|
20362
20368
|
initXaxis$1(
|
|
20363
20369
|
gTag,
|
|
20364
20370
|
chartJSON,
|
|
@@ -20375,6 +20381,7 @@ const ColumnHistogramChart = ({
|
|
|
20375
20381
|
innerHeight2,
|
|
20376
20382
|
filteredDimension
|
|
20377
20383
|
);
|
|
20384
|
+
getChartType();
|
|
20378
20385
|
};
|
|
20379
20386
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20380
20387
|
"svg",
|
|
@@ -24316,20 +24323,22 @@ const HorizontalHistogramChart = ({
|
|
|
24316
24323
|
data
|
|
24317
24324
|
}) => {
|
|
24318
24325
|
const chartId = crypto.randomUUID();
|
|
24319
|
-
|
|
24320
|
-
const chartType = actualChartTypes.
|
|
24326
|
+
const columnWidth = 0;
|
|
24327
|
+
const chartType = actualChartTypes.columnHistogram;
|
|
24321
24328
|
const svgRef = useRef();
|
|
24322
|
-
const seriesData =
|
|
24329
|
+
const seriesData = data.ChartData;
|
|
24323
24330
|
const dimensionList = data.DimensionList;
|
|
24324
|
-
const barChart =
|
|
24325
|
-
|
|
24331
|
+
const barChart = false;
|
|
24332
|
+
const isSecondaryAxisDrawn = false;
|
|
24326
24333
|
const isNormalizedChart = false;
|
|
24327
24334
|
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
24328
24335
|
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
24329
|
-
let
|
|
24336
|
+
let customXaxisMinValue = parseFloat(formatOptions.xAxisLabel.xAxisMinText);
|
|
24337
|
+
let customXaxisMaxValue = parseFloat(formatOptions.xAxisLabel.xAxisMaxText);
|
|
24338
|
+
parseFloat(
|
|
24330
24339
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMinText
|
|
24331
24340
|
);
|
|
24332
|
-
|
|
24341
|
+
parseFloat(
|
|
24333
24342
|
formatOptions.secondaryYAxisLabel.secondaryYAxisMaxText
|
|
24334
24343
|
);
|
|
24335
24344
|
let margin;
|
|
@@ -24346,21 +24355,21 @@ const HorizontalHistogramChart = ({
|
|
|
24346
24355
|
let maxNumberForSecondaryAxis;
|
|
24347
24356
|
let innerWidth2;
|
|
24348
24357
|
let innerHeight2;
|
|
24358
|
+
let thresholds;
|
|
24359
|
+
let periods = [];
|
|
24360
|
+
let bins = [];
|
|
24349
24361
|
let width;
|
|
24350
24362
|
let height;
|
|
24351
24363
|
let dataTable;
|
|
24352
24364
|
let dataTableHeight;
|
|
24353
24365
|
let svg;
|
|
24354
24366
|
let gTag;
|
|
24355
|
-
let
|
|
24356
|
-
let
|
|
24357
|
-
let
|
|
24358
|
-
let xScaleTop;
|
|
24367
|
+
let yScaleLeft;
|
|
24368
|
+
let xScale;
|
|
24369
|
+
let xScaleForLegends;
|
|
24359
24370
|
let calculatedRange;
|
|
24360
|
-
let
|
|
24361
|
-
let
|
|
24362
|
-
let xAxisTop;
|
|
24363
|
-
let yAxis;
|
|
24371
|
+
let yAxisLeft;
|
|
24372
|
+
let xAxis;
|
|
24364
24373
|
let filteredDimension;
|
|
24365
24374
|
let filteredData = [];
|
|
24366
24375
|
let scrollPosition = 0;
|
|
@@ -24381,12 +24390,12 @@ const HorizontalHistogramChart = ({
|
|
|
24381
24390
|
};
|
|
24382
24391
|
useEffect(() => {
|
|
24383
24392
|
try {
|
|
24384
|
-
|
|
24393
|
+
createHorizontalChart();
|
|
24385
24394
|
} catch (error) {
|
|
24386
|
-
logError$2("
|
|
24395
|
+
logError$2("HorizontalHistogramChart", "createHorizontalChart", error);
|
|
24387
24396
|
}
|
|
24388
24397
|
}, [formatOptions]);
|
|
24389
|
-
const
|
|
24398
|
+
const createHorizontalChart = () => {
|
|
24390
24399
|
({ formatOptions, svg, width, height } = firstFunctionBeforeRender$1(
|
|
24391
24400
|
svgRef,
|
|
24392
24401
|
formatOptions
|
|
@@ -24424,8 +24433,7 @@ const HorizontalHistogramChart = ({
|
|
|
24424
24433
|
chartJSON.yMaxRight,
|
|
24425
24434
|
isSecondaryAxisDrawn,
|
|
24426
24435
|
isNormalizedChart,
|
|
24427
|
-
isDateType
|
|
24428
|
-
barChart
|
|
24436
|
+
isDateType
|
|
24429
24437
|
));
|
|
24430
24438
|
setSVGContainer(margin);
|
|
24431
24439
|
({ dataTable, dataTableHeight } = dataTablePreCalculation(
|
|
@@ -24436,49 +24444,36 @@ const HorizontalHistogramChart = ({
|
|
|
24436
24444
|
seriesData,
|
|
24437
24445
|
chartJSON.dimensionList
|
|
24438
24446
|
));
|
|
24439
|
-
initSvg$1(
|
|
24440
|
-
// for svg creation
|
|
24441
|
-
svg,
|
|
24442
|
-
width,
|
|
24443
|
-
height,
|
|
24444
|
-
formatOptions
|
|
24445
|
-
);
|
|
24447
|
+
initSvg$1(svg, width, height, formatOptions);
|
|
24446
24448
|
gTag = initChartArea$1(svg, margin);
|
|
24447
|
-
initPlotArea(
|
|
24449
|
+
initPlotArea(gTag, formatOptions, dataTableHeight, innerWidth2, innerHeight2, chartType);
|
|
24450
|
+
binsCalculation();
|
|
24451
|
+
initScale();
|
|
24452
|
+
initAxis();
|
|
24453
|
+
initXaxis$1(
|
|
24448
24454
|
gTag,
|
|
24455
|
+
chartJSON,
|
|
24456
|
+
xLabel,
|
|
24449
24457
|
formatOptions,
|
|
24450
24458
|
dataTableHeight,
|
|
24459
|
+
yScaleLeft,
|
|
24460
|
+
xAxis,
|
|
24461
|
+
dimensionHeightWidthArray,
|
|
24462
|
+
height,
|
|
24463
|
+
columnWidth,
|
|
24464
|
+
isDateType,
|
|
24451
24465
|
innerWidth2,
|
|
24452
24466
|
innerHeight2,
|
|
24453
|
-
|
|
24467
|
+
filteredDimension
|
|
24454
24468
|
);
|
|
24455
|
-
|
|
24456
|
-
initAxis();
|
|
24457
|
-
initYaxisBar(
|
|
24458
|
-
formatOptions,
|
|
24469
|
+
initYaxis$1(
|
|
24459
24470
|
gTag,
|
|
24460
|
-
|
|
24461
|
-
|
|
24462
|
-
|
|
24463
|
-
|
|
24464
|
-
|
|
24465
|
-
xScaleBottom,
|
|
24466
|
-
chartJSON.yMaxLeft,
|
|
24467
|
-
filteredDimension,
|
|
24468
|
-
chartType,
|
|
24469
|
-
isDateType,
|
|
24470
|
-
width,
|
|
24471
|
-
dimensionHeightWidthArray,
|
|
24472
|
-
columnWidth
|
|
24471
|
+
formatOptions,
|
|
24472
|
+
dataTableHeight,
|
|
24473
|
+
yLabel,
|
|
24474
|
+
yAxisLeft,
|
|
24475
|
+
innerHeight2
|
|
24473
24476
|
);
|
|
24474
|
-
if (isSecondaryAxisDrawn) {
|
|
24475
|
-
initXaxisTop(
|
|
24476
|
-
formatOptions,
|
|
24477
|
-
gTag,
|
|
24478
|
-
secondaryYLabel,
|
|
24479
|
-
xAxisTop
|
|
24480
|
-
);
|
|
24481
|
-
}
|
|
24482
24477
|
horizontalScrollBar2(seriesData, height, svg, margin, innerWidth2);
|
|
24483
24478
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
24484
24479
|
if (formatOptions.xAxisLabel.xAxisPosition != "1")
|
|
@@ -24489,9 +24484,9 @@ const HorizontalHistogramChart = ({
|
|
|
24489
24484
|
gTag,
|
|
24490
24485
|
dataTable,
|
|
24491
24486
|
columnWidth,
|
|
24492
|
-
|
|
24493
|
-
|
|
24494
|
-
|
|
24487
|
+
yScaleLeft,
|
|
24488
|
+
xScale,
|
|
24489
|
+
xScaleForLegends,
|
|
24495
24490
|
void 0,
|
|
24496
24491
|
void 0,
|
|
24497
24492
|
dataTableHeight,
|
|
@@ -24559,117 +24554,108 @@ const HorizontalHistogramChart = ({
|
|
|
24559
24554
|
const preProcessChartData = () => {
|
|
24560
24555
|
const allChartData = [];
|
|
24561
24556
|
const legendList = [];
|
|
24562
|
-
let
|
|
24557
|
+
let cumulativeDataPoints = [];
|
|
24563
24558
|
let yMaxLeft = -Infinity;
|
|
24564
24559
|
let yMinLeft = Infinity;
|
|
24565
|
-
let yMaxRight = -Infinity;
|
|
24566
|
-
let yMinRight = Infinity;
|
|
24567
24560
|
seriesData.forEach((series) => {
|
|
24568
24561
|
legendList.push(series.legend);
|
|
24569
24562
|
series.data.forEach((point2) => {
|
|
24570
24563
|
allChartData.push(point2);
|
|
24571
|
-
|
|
24572
|
-
|
|
24573
|
-
yMaxRight = Math.max(yMaxRight, point2.value);
|
|
24574
|
-
yMinRight = Math.min(yMinRight, point2.value);
|
|
24575
|
-
} else {
|
|
24576
|
-
yMaxLeft = Math.max(yMaxLeft, point2.value);
|
|
24577
|
-
yMinLeft = Math.min(yMinLeft, point2.value);
|
|
24578
|
-
}
|
|
24564
|
+
yMaxLeft = Math.max(yMaxLeft, point2.value);
|
|
24565
|
+
yMinLeft = Math.min(yMinLeft, point2.value);
|
|
24579
24566
|
});
|
|
24580
24567
|
});
|
|
24581
24568
|
chartJSON.chartData = allChartData;
|
|
24582
24569
|
chartJSON.legendList = legendList;
|
|
24583
24570
|
chartJSON.yMaxLeft = yMaxLeft;
|
|
24584
24571
|
chartJSON.yMinLeft = yMinLeft > 0 ? 0 : yMinLeft;
|
|
24585
|
-
chartJSON.yMaxRight = yMaxRight;
|
|
24586
|
-
chartJSON.yMinRight = yMinRight;
|
|
24587
|
-
formatedDimensionList = isDateType ? setDateFormats(
|
|
24588
|
-
formatOptions.xAxisLabel.xAxisNumberFormat,
|
|
24589
|
-
chartJSON.dimensionList
|
|
24590
|
-
).map((d) => d) : chartJSON.dimensionList;
|
|
24591
|
-
chartJSON.dimensionList.forEach((dim, i) => {
|
|
24592
|
-
chartJSON.formattedDimensionListMap.set(dim, formatedDimensionList[i]);
|
|
24593
|
-
});
|
|
24594
24572
|
filteredData = JSON.parse(JSON.stringify(seriesData));
|
|
24595
|
-
|
|
24596
|
-
|
|
24597
|
-
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
|
|
24601
|
-
|
|
24602
|
-
|
|
24603
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
24604
|
-
chartJSON.hideZeroValues = true;
|
|
24605
|
-
}
|
|
24573
|
+
filteredData.forEach(
|
|
24574
|
+
(d) => d.data.forEach((j) => cumulativeDataPoints.push(j.value))
|
|
24575
|
+
);
|
|
24576
|
+
let yMin = customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : 0;
|
|
24577
|
+
let yMax = customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : filteredData[0]?.data?.length;
|
|
24578
|
+
chartJSON.yMaxLeft = parseFloat((yMin + "").length > (yMax + "").length ? yMin + "" : yMax + "");
|
|
24579
|
+
chartJSON.xMax = max$2(cumulativeDataPoints);
|
|
24580
|
+
chartJSON.xMin = min$2(cumulativeDataPoints);
|
|
24606
24581
|
};
|
|
24607
|
-
const
|
|
24608
|
-
|
|
24609
|
-
|
|
24610
|
-
|
|
24611
|
-
|
|
24612
|
-
|
|
24613
|
-
|
|
24614
|
-
|
|
24615
|
-
|
|
24616
|
-
|
|
24617
|
-
chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
|
|
24618
|
-
chartJSON.yMinLeft = yAxisLabelArray[0];
|
|
24619
|
-
{
|
|
24620
|
-
xScaleBottom = linear$1().domain([
|
|
24621
|
-
chartJSON.yMinLeft >= 0 ? customYaxisMinValue !== void 0 && !Number.isNaN(customYaxisMinValue) ? customYaxisMinValue : 0 : chartJSON.yMinLeft < 0 ? chartJSON.yMinLeft * 1.1 : chartJSON.yMinLeft * 0.9,
|
|
24622
|
-
chartJSON.yMaxLeft <= 0 ? 0 : customYaxisMaxValue !== void 0 && !Number.isNaN(customYaxisMaxValue) ? customYaxisMaxValue : chartJSON.yMaxLeft * 1.1
|
|
24623
|
-
]).range([
|
|
24624
|
-
0,
|
|
24625
|
-
dataTableHeight > 0 ? innerWidth2 - dataTableHeight : innerWidth2
|
|
24626
|
-
]);
|
|
24582
|
+
const binsCalculation = () => {
|
|
24583
|
+
switch (formatOptions.bins.binsCalculation) {
|
|
24584
|
+
case "Automatic":
|
|
24585
|
+
thresholds = innerHeight2 / 50;
|
|
24586
|
+
break;
|
|
24587
|
+
case "Number of Bins":
|
|
24588
|
+
calculatingPeriodsWithBins(false);
|
|
24589
|
+
break;
|
|
24590
|
+
case "Bin Width":
|
|
24591
|
+
calculatingPeriodsWithBins(true);
|
|
24627
24592
|
}
|
|
24628
|
-
|
|
24629
|
-
|
|
24630
|
-
|
|
24631
|
-
|
|
24632
|
-
|
|
24633
|
-
|
|
24634
|
-
|
|
24635
|
-
|
|
24593
|
+
};
|
|
24594
|
+
const calculatingPeriodsWithBins = (isWithWidth) => {
|
|
24595
|
+
filteredData.forEach((d) => d.data.sort((a2, b) => a2.value - b.value));
|
|
24596
|
+
let range2 = chartJSON.xMax - chartJSON.xMin;
|
|
24597
|
+
let tempPeriod;
|
|
24598
|
+
if (isWithWidth) {
|
|
24599
|
+
parseFloat(formatOptions.bins.binsCalculationValue) <= 2 && (formatOptions.bins.binsCalculationValue = "3");
|
|
24600
|
+
tempPeriod = range2 / parseFloat(formatOptions.bins.binsCalculationValue);
|
|
24601
|
+
} else {
|
|
24602
|
+
parseFloat(formatOptions.bins.binsCalculationValue) <= 1 && (formatOptions.bins.binsCalculationValue = "1");
|
|
24603
|
+
tempPeriod = range2 / parseFloat(formatOptions.bins.binsCalculationValue);
|
|
24636
24604
|
}
|
|
24637
|
-
|
|
24638
|
-
if (
|
|
24639
|
-
|
|
24640
|
-
|
|
24641
|
-
|
|
24642
|
-
|
|
24643
|
-
|
|
24644
|
-
|
|
24645
|
-
|
|
24646
|
-
)
|
|
24647
|
-
|
|
24648
|
-
|
|
24649
|
-
|
|
24605
|
+
let currentElement = chartJSON.xMin;
|
|
24606
|
+
if (isWithWidth) {
|
|
24607
|
+
periods = [currentElement];
|
|
24608
|
+
while (currentElement < chartJSON.xMax) {
|
|
24609
|
+
currentElement += tempPeriod;
|
|
24610
|
+
periods.push(currentElement);
|
|
24611
|
+
}
|
|
24612
|
+
} else {
|
|
24613
|
+
periods = [currentElement];
|
|
24614
|
+
while (Math.round(currentElement) < Math.round(chartJSON.xMax)) {
|
|
24615
|
+
currentElement += tempPeriod;
|
|
24616
|
+
periods.push(Math.round(currentElement));
|
|
24617
|
+
}
|
|
24650
24618
|
}
|
|
24651
|
-
getYScale();
|
|
24652
24619
|
};
|
|
24653
|
-
const
|
|
24654
|
-
|
|
24655
|
-
|
|
24656
|
-
|
|
24620
|
+
const initScale = () => {
|
|
24621
|
+
yScaleLeft = linear$1().domain([chartJSON.xMin, chartJSON.xMax]).range([innerHeight2, 0]);
|
|
24622
|
+
const numberOfBins = periods.length > 0 ? periods : yScaleLeft.ticks(thresholds);
|
|
24623
|
+
let histogram = bin().value((d) => d).domain(yScaleLeft.domain()).thresholds(numberOfBins);
|
|
24624
|
+
filteredData.forEach((d) => {
|
|
24625
|
+
let tempArray = histogram(d.data.map((val) => val.value));
|
|
24626
|
+
bins.push(tempArray);
|
|
24627
|
+
});
|
|
24628
|
+
filteredData.forEach(
|
|
24629
|
+
(d, i) => bins[i].forEach((j) => {
|
|
24630
|
+
j["name"] = d.properties["legend"];
|
|
24631
|
+
j["color"] = d.properties["color"];
|
|
24632
|
+
j["opacity"] = d.properties["opacity"];
|
|
24633
|
+
})
|
|
24657
24634
|
);
|
|
24658
|
-
|
|
24635
|
+
let cumulativeLength = [];
|
|
24636
|
+
bins.forEach((d) => d.forEach((j) => cumulativeLength.push(j.length)));
|
|
24637
|
+
chartJSON.yMaxLeft = max$2(cumulativeLength);
|
|
24638
|
+
chartJSON.yMinLeft = min$2(cumulativeLength);
|
|
24639
|
+
xScale = linear$1().domain([
|
|
24640
|
+
customXaxisMinValue || customXaxisMinValue == 0 ? customXaxisMinValue : 0,
|
|
24641
|
+
customXaxisMaxValue || customXaxisMaxValue == 0 ? customXaxisMaxValue : chartJSON.yMaxLeft + 0.2 * chartJSON.yMaxLeft
|
|
24642
|
+
]).range([0, innerWidth2]);
|
|
24659
24643
|
};
|
|
24660
24644
|
const initAxis = () => {
|
|
24661
24645
|
getYAxis();
|
|
24662
24646
|
{
|
|
24663
|
-
let
|
|
24664
|
-
|
|
24647
|
+
let responsiveLabelsObj = responsiveYaxisLabel$1(
|
|
24648
|
+
chartJSON.yMaxLeft,
|
|
24665
24649
|
chartJSON.yMinLeft,
|
|
24666
|
-
|
|
24650
|
+
innerWidth2,
|
|
24667
24651
|
formatOptions,
|
|
24668
24652
|
chartJSON,
|
|
24669
24653
|
customYaxisMinValue,
|
|
24670
|
-
customYaxisMaxValue
|
|
24654
|
+
customYaxisMaxValue,
|
|
24655
|
+
false,
|
|
24656
|
+
innerHeight2
|
|
24671
24657
|
);
|
|
24672
|
-
|
|
24658
|
+
xAxis = axisBottom(xScale).tickFormat(
|
|
24673
24659
|
(d) => getNumberWithFormat(
|
|
24674
24660
|
d,
|
|
24675
24661
|
formatOptions.yAxisLabel.yAxisDisplayUnits,
|
|
@@ -24677,116 +24663,53 @@ const HorizontalHistogramChart = ({
|
|
|
24677
24663
|
formatOptions.yAxisLabel.yAxisLabelDecimalPrecision
|
|
24678
24664
|
)
|
|
24679
24665
|
).tickSize(
|
|
24680
|
-
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 +
|
|
24681
|
-
).tickValues(
|
|
24682
|
-
}
|
|
24683
|
-
if (isSecondaryAxisDrawn) {
|
|
24684
|
-
xAxisTop = axisTop(xScaleTop).tickFormat(
|
|
24685
|
-
(d) => getNumberWithFormat(
|
|
24686
|
-
d,
|
|
24687
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisDisplayUnits,
|
|
24688
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
|
|
24689
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
|
|
24690
|
-
)
|
|
24691
|
-
).tickValues(
|
|
24692
|
-
responsiveSecondaryYaxisLabel(
|
|
24693
|
-
secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
|
|
24694
|
-
chartJSON.yMinRight,
|
|
24695
|
-
formatOptions,
|
|
24696
|
-
chartJSON
|
|
24697
|
-
).secondaryYAxisLabelArray
|
|
24698
|
-
).ticks(
|
|
24699
|
-
responsiveSecondaryYaxisLabel(
|
|
24700
|
-
secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
|
|
24701
|
-
chartJSON.yMinRight,
|
|
24702
|
-
formatOptions,
|
|
24703
|
-
chartJSON
|
|
24704
|
-
).secondaryCustomTickValue ?? innerHeight2 / 30
|
|
24705
|
-
).tickSize(
|
|
24706
|
-
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
|
|
24707
|
-
).tickPadding(8).tickSizeOuter(0);
|
|
24666
|
+
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 + 0 : 0 : 0
|
|
24667
|
+
).tickValues(responsiveLabelsObj.autoLabelFlag ? void 0 : responsiveLabelsObj.yAxisLabelArray).ticks(responsiveLabelsObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
24708
24668
|
}
|
|
24709
24669
|
};
|
|
24710
24670
|
const getYAxis = () => {
|
|
24711
|
-
|
|
24712
|
-
|
|
24713
|
-
|
|
24671
|
+
let labelArray = responsiveXaxisLabelForNumericValue(chartJSON.xMax, chartJSON.xMin, innerHeight2, formatOptions, customXaxisMinValue, customXaxisMaxValue, innerWidth2, false).xAxisLabelArray;
|
|
24672
|
+
labelArray.shift();
|
|
24673
|
+
yAxisLeft = axisLeft(yScaleLeft).tickFormat(
|
|
24674
|
+
(d) => getNumberWithFormat(
|
|
24675
|
+
d,
|
|
24676
|
+
formatOptions.xAxisLabel.xAxisDisplayUnits,
|
|
24677
|
+
formatOptions.xAxisLabel.xAxisNumberFormat,
|
|
24678
|
+
formatOptions.xAxisLabel.xAxisLabelDecimalPrecision,
|
|
24679
|
+
false
|
|
24680
|
+
)
|
|
24681
|
+
).tickSize(
|
|
24682
|
+
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerWidth2 : 0 : 0
|
|
24683
|
+
).tickSizeOuter(0);
|
|
24684
|
+
formatOptions.bins.binsCalculation === "Automatic" ? yAxisLeft.ticks(thresholds) : yAxisLeft.tickValues(periods).ticks(innerHeight2 / 50);
|
|
24714
24685
|
};
|
|
24715
24686
|
const getChartType = (lineData) => {
|
|
24716
|
-
|
|
24717
|
-
|
|
24718
|
-
|
|
24719
|
-
|
|
24720
|
-
|
|
24721
|
-
|
|
24722
|
-
|
|
24723
|
-
|
|
24724
|
-
|
|
24725
|
-
|
|
24726
|
-
|
|
24727
|
-
|
|
24728
|
-
|
|
24729
|
-
|
|
24730
|
-
|
|
24731
|
-
|
|
24732
|
-
|
|
24733
|
-
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
|
|
24737
|
-
|
|
24738
|
-
|
|
24739
|
-
(d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`
|
|
24687
|
+
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) => {
|
|
24688
|
+
const y02 = yScaleLeft(d.x0);
|
|
24689
|
+
const y12 = yScaleLeft(d.x1);
|
|
24690
|
+
return Math.min(y02, y12);
|
|
24691
|
+
}).attr("height", (d) => {
|
|
24692
|
+
const y02 = yScaleLeft(d.x0);
|
|
24693
|
+
const y12 = yScaleLeft(d.x1);
|
|
24694
|
+
const gap = parseFloat(formatOptions.bins.binsGapWidth) || 0;
|
|
24695
|
+
return Math.max(1, Math.abs(y12 - y02) - gap);
|
|
24696
|
+
}).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) => {
|
|
24697
|
+
showTooltipOnMouseMove(
|
|
24698
|
+
[
|
|
24699
|
+
{
|
|
24700
|
+
key: formatOptions.yAxisTitle.yAxisTitleText,
|
|
24701
|
+
value: `${d["x0"]}-${d["x1"]}`
|
|
24702
|
+
},
|
|
24703
|
+
{
|
|
24704
|
+
key: formatOptions.xAxisTitle.xAxisTitleText,
|
|
24705
|
+
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)
|
|
24706
|
+
}
|
|
24707
|
+
],
|
|
24708
|
+
formatOptions,
|
|
24709
|
+
event2
|
|
24740
24710
|
);
|
|
24741
|
-
|
|
24742
|
-
|
|
24743
|
-
return d.value > 0 ? requiredXScale(0) : requiredXScale(d.value);
|
|
24744
|
-
}).attr("width", (d) => {
|
|
24745
|
-
const requiredXScale = data2.properties.axis === "Primary" ? xScaleBottom : xScaleTop;
|
|
24746
|
-
const requiredCustomValue = data2.properties.axis === "Primary" ? customYaxisMaxValue : secondaryCustomYaxisMaxValue;
|
|
24747
|
-
return d.value > 0 ? requiredCustomValue && d.value > requiredCustomValue ? requiredXScale(requiredCustomValue) - requiredXScale(0) : requiredXScale(d.value) - requiredXScale(0) : Math.abs(requiredXScale(0) - requiredXScale(d.value));
|
|
24748
|
-
}).attr("fill", data2.properties.color).attr(
|
|
24749
|
-
"stroke-dasharray",
|
|
24750
|
-
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
24751
|
-
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
24752
|
-
"stroke",
|
|
24753
|
-
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
24754
|
-
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
24755
|
-
"visibility",
|
|
24756
|
-
(d) => d.value === 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
24757
|
-
).on("mousemove", (event2, d) => {
|
|
24758
|
-
showTooltipOnMouseMove(
|
|
24759
|
-
[
|
|
24760
|
-
{
|
|
24761
|
-
key: formatOptions.xAxisTitle.xAxisTitleText.includes("~$~") ? formatOptions.xAxisTitle.xAxisTitleText.split("~$~")[1] : formatOptions.xAxisTitle.xAxisTitleText,
|
|
24762
|
-
value: chartJSON.formattedDimensionListMap.get(
|
|
24763
|
-
Array.isArray(d.dimension) ? d.dimension[0] : d.dimension
|
|
24764
|
-
)
|
|
24765
|
-
},
|
|
24766
|
-
{
|
|
24767
|
-
key: formatOptions.yAxisTitle.yAxisTitleText || d.value,
|
|
24768
|
-
value: getNumberWithFormat(
|
|
24769
|
-
[
|
|
24770
|
-
actualChartTypes.stackLine100,
|
|
24771
|
-
actualChartTypes.stackArea100,
|
|
24772
|
-
""
|
|
24773
|
-
].includes(chartType) ? d[1] - d[0] : d.value,
|
|
24774
|
-
formatOptions.toolTip.toolTipDisplayUnits,
|
|
24775
|
-
formatOptions.toolTip.toolTipNumberFormat,
|
|
24776
|
-
formatOptions.toolTip.toolTipDecimalPrecision
|
|
24777
|
-
)
|
|
24778
|
-
},
|
|
24779
|
-
{
|
|
24780
|
-
key: "Legend",
|
|
24781
|
-
value: d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend
|
|
24782
|
-
}
|
|
24783
|
-
],
|
|
24784
|
-
formatOptions,
|
|
24785
|
-
event2
|
|
24786
|
-
);
|
|
24787
|
-
}).on("mouseout", hideTooltipOnMouseOut);
|
|
24788
|
-
columnGroups.exit().remove();
|
|
24789
|
-
});
|
|
24711
|
+
}).on("mouseout", hideTooltipOnMouseOut);
|
|
24712
|
+
gTag.selectAll(".parentGroup").raise();
|
|
24790
24713
|
};
|
|
24791
24714
|
const setSVGContainer = (margin2) => {
|
|
24792
24715
|
innerWidth2 = width - margin2.left - margin2.right;
|
|
@@ -24800,14 +24723,12 @@ const HorizontalHistogramChart = ({
|
|
|
24800
24723
|
scrollPosition,
|
|
24801
24724
|
scrollPosition + visibleBars
|
|
24802
24725
|
);
|
|
24803
|
-
getYScale();
|
|
24804
24726
|
filteredData = JSON.parse(JSON.stringify(seriesData2));
|
|
24805
24727
|
filteredData.forEach(
|
|
24806
24728
|
(data2, i) => filteredData[i].data = data2.data.filter(
|
|
24807
24729
|
(d) => filteredDimension.includes(d.dimension)
|
|
24808
24730
|
)
|
|
24809
24731
|
);
|
|
24810
|
-
getYAxis();
|
|
24811
24732
|
svg2.append("rect").attr("x", margin2.left).attr("y", scrollbarY).attr("width", innerWidth22).attr("height", 8).attr("fill", "#ddd").attr("rx", 4);
|
|
24812
24733
|
const handleWidth = innerWidth22 * visibleBars / chartJSON.dimensionList.length;
|
|
24813
24734
|
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(
|
|
@@ -24824,7 +24745,6 @@ const HorizontalHistogramChart = ({
|
|
|
24824
24745
|
scrollPosition,
|
|
24825
24746
|
scrollPosition + visibleBars
|
|
24826
24747
|
);
|
|
24827
|
-
getYScale();
|
|
24828
24748
|
filteredData = JSON.parse(JSON.stringify(seriesData2));
|
|
24829
24749
|
filteredData.forEach(
|
|
24830
24750
|
(data2, i) => filteredData[i].data = data2.data.filter(
|
|
@@ -24842,7 +24762,6 @@ const HorizontalHistogramChart = ({
|
|
|
24842
24762
|
scrollPosition = Math.max(0, Math.min(scrollPosition, scrollMax));
|
|
24843
24763
|
const x2 = margin2.left + (innerWidth22 - handleWidth) * scrollPosition / scrollMax;
|
|
24844
24764
|
handle.attr("x", x2);
|
|
24845
|
-
getYScale();
|
|
24846
24765
|
filteredData = JSON.parse(JSON.stringify(seriesData2));
|
|
24847
24766
|
filteredData.forEach(
|
|
24848
24767
|
(data2, i) => filteredData[i].data = data2.data.filter(
|
|
@@ -24856,48 +24775,13 @@ const HorizontalHistogramChart = ({
|
|
|
24856
24775
|
drawColumnChart();
|
|
24857
24776
|
};
|
|
24858
24777
|
const drawColumnChart = () => {
|
|
24859
|
-
|
|
24860
|
-
|
|
24861
|
-
formatOptions,
|
|
24862
|
-
gTag,
|
|
24863
|
-
yLabel,
|
|
24864
|
-
innerHeight2,
|
|
24865
|
-
innerWidth2,
|
|
24866
|
-
xAxisBottom
|
|
24867
|
-
);
|
|
24868
|
-
commonAnnotations(
|
|
24869
|
-
filteredData,
|
|
24870
|
-
yScale,
|
|
24871
|
-
xScaleBottom,
|
|
24872
|
-
xScaleTop,
|
|
24873
|
-
// need to pass secondary axis scale if secondary axis is drawn
|
|
24874
|
-
margin,
|
|
24875
|
-
d3Annotation,
|
|
24876
|
-
[],
|
|
24877
|
-
//this.labelExcludeList,
|
|
24878
|
-
[],
|
|
24879
|
-
//this.individualLabelColor,
|
|
24880
|
-
[],
|
|
24881
|
-
//this.attributes.Id ? formatOptions.plotArea.dataLabelsCoordinates : this.parentReference.objService.tempAnnotationArray
|
|
24882
|
-
formatOptions,
|
|
24883
|
-
chartType,
|
|
24884
|
-
height,
|
|
24885
|
-
width,
|
|
24886
|
-
innerWidth2,
|
|
24887
|
-
filteredDimension,
|
|
24888
|
-
innerHeight2,
|
|
24889
|
-
chartId,
|
|
24890
|
-
svg,
|
|
24891
|
-
yScaleLegends,
|
|
24892
|
-
columnWidth,
|
|
24893
|
-
false,
|
|
24894
|
-
barChart
|
|
24895
|
-
);
|
|
24778
|
+
initYaxis$1(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, innerHeight2);
|
|
24779
|
+
getChartType();
|
|
24896
24780
|
};
|
|
24897
24781
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24898
24782
|
"svg",
|
|
24899
24783
|
{
|
|
24900
|
-
className: "
|
|
24784
|
+
className: "className",
|
|
24901
24785
|
ref: svgRef,
|
|
24902
24786
|
id: chartId,
|
|
24903
24787
|
style: { width: "100%", height: "100%" }
|
|
@@ -26715,7 +26599,7 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26715
26599
|
};
|
|
26716
26600
|
const defineChartRadius = () => {
|
|
26717
26601
|
try {
|
|
26718
|
-
radius = Math.min(innerHeight2 * 0.
|
|
26602
|
+
radius = Math.min(innerHeight2 * 0.5, innerWidth2 * 0.5);
|
|
26719
26603
|
outsideDataLabelFlag ? radius = radius * 0.9 : null;
|
|
26720
26604
|
} catch (error) {
|
|
26721
26605
|
logError$2(fileName$8, "defineChartRadius", error);
|
|
@@ -26769,7 +26653,9 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26769
26653
|
},
|
|
26770
26654
|
{ key: "Legend", value: d.currentTarget.__data__.data.legend }
|
|
26771
26655
|
],
|
|
26772
|
-
chartFormatOptions
|
|
26656
|
+
chartFormatOptions,
|
|
26657
|
+
void 0,
|
|
26658
|
+
d.currentTarget.__data__.data.properties
|
|
26773
26659
|
);
|
|
26774
26660
|
}).on("mouseout.text", () => {
|
|
26775
26661
|
hideTooltipOnMouseOut();
|
|
@@ -26789,16 +26675,20 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26789
26675
|
return "";
|
|
26790
26676
|
}
|
|
26791
26677
|
};
|
|
26792
|
-
const getDataLabelTransformString = (d) => {
|
|
26678
|
+
const getDataLabelTransformString = (d, isSingleDataLabel) => {
|
|
26793
26679
|
try {
|
|
26794
|
-
|
|
26795
|
-
|
|
26796
|
-
|
|
26797
|
-
|
|
26798
|
-
|
|
26799
|
-
|
|
26800
|
-
|
|
26801
|
-
|
|
26680
|
+
if (isSingleDataLabel) {
|
|
26681
|
+
return `translate(0 0)`;
|
|
26682
|
+
} else {
|
|
26683
|
+
const midAngle = (d.startAngle + d.endAngle) / 2;
|
|
26684
|
+
const x2 = Math.cos(midAngle - Math.PI / 2) * (radius * 0.65);
|
|
26685
|
+
const y2 = Math.sin(midAngle - Math.PI / 2) * (radius * 0.65);
|
|
26686
|
+
let rotate = midAngle * 180 / Math.PI % 360;
|
|
26687
|
+
let angle = 0;
|
|
26688
|
+
rotate > 180 && rotate < 360 ? angle = 90 : angle = -90;
|
|
26689
|
+
rotate += angle;
|
|
26690
|
+
return `translate(${x2},${y2}) rotate(${rotate})`;
|
|
26691
|
+
}
|
|
26802
26692
|
} catch (error) {
|
|
26803
26693
|
logError$2(fileName$8, "getDataLabelTransformString", error);
|
|
26804
26694
|
return "";
|
|
@@ -26807,6 +26697,7 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26807
26697
|
const drawPieDataLabels = () => {
|
|
26808
26698
|
try {
|
|
26809
26699
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
26700
|
+
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
26810
26701
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
26811
26702
|
pieChartData.filter(
|
|
26812
26703
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
@@ -26825,7 +26716,7 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26825
26716
|
).attr(
|
|
26826
26717
|
"font-family",
|
|
26827
26718
|
(d) => d.data.properties?.labelFont ?? "Helvetica"
|
|
26828
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
26719
|
+
).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) => {
|
|
26829
26720
|
const { plotArea } = chartFormatOptions;
|
|
26830
26721
|
if (plotArea.dataLabelName) {
|
|
26831
26722
|
return d.data.legend;
|
|
@@ -26850,7 +26741,7 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26850
26741
|
).attr(
|
|
26851
26742
|
"font-family",
|
|
26852
26743
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
26853
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
26744
|
+
).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) => {
|
|
26854
26745
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
26855
26746
|
const dataValue = d.data.data[0].value;
|
|
26856
26747
|
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
@@ -27062,7 +26953,7 @@ const DonutChart = ({
|
|
|
27062
26953
|
};
|
|
27063
26954
|
const defineChartRadius = () => {
|
|
27064
26955
|
try {
|
|
27065
|
-
radius = Math.min(innerHeight2 * 0.
|
|
26956
|
+
radius = Math.min(innerHeight2 * 0.5, innerWidth2 * 0.5);
|
|
27066
26957
|
outsideDataLabelFlag ? radius = radius * 0.9 : null;
|
|
27067
26958
|
innerRadius = Math.min(
|
|
27068
26959
|
convertStringToNumber(chartFormatOptions.plotArea.innerRadius) / 100 * radius,
|
|
@@ -27128,7 +27019,9 @@ const DonutChart = ({
|
|
|
27128
27019
|
},
|
|
27129
27020
|
{ key: "Legend", value: d.currentTarget.__data__.data.legend }
|
|
27130
27021
|
],
|
|
27131
|
-
chartFormatOptions
|
|
27022
|
+
chartFormatOptions,
|
|
27023
|
+
void 0,
|
|
27024
|
+
d.currentTarget.__data__.data.properties
|
|
27132
27025
|
);
|
|
27133
27026
|
}).on("mouseout.text", () => hideTooltipOnMouseOut()).on("mouseout.arc", function() {
|
|
27134
27027
|
if (enableTransition) ;
|
|
@@ -27152,17 +27045,21 @@ const DonutChart = ({
|
|
|
27152
27045
|
return "";
|
|
27153
27046
|
}
|
|
27154
27047
|
};
|
|
27155
|
-
const getDataLabelTransformString = (d) => {
|
|
27048
|
+
const getDataLabelTransformString = (d, isSingleDataLabel) => {
|
|
27156
27049
|
try {
|
|
27157
|
-
|
|
27158
|
-
|
|
27159
|
-
|
|
27160
|
-
|
|
27161
|
-
|
|
27162
|
-
|
|
27163
|
-
|
|
27164
|
-
|
|
27165
|
-
|
|
27050
|
+
if (isSingleDataLabel) {
|
|
27051
|
+
return `translate(0 0)`;
|
|
27052
|
+
} else {
|
|
27053
|
+
const midAngle = (d.startAngle + d.endAngle) / 2;
|
|
27054
|
+
const labelRadius = (innerRadius + radius) / 2;
|
|
27055
|
+
const x2 = Math.cos(midAngle - Math.PI / 2) * labelRadius;
|
|
27056
|
+
const y2 = Math.sin(midAngle - Math.PI / 2) * labelRadius;
|
|
27057
|
+
let rotate = midAngle * 180 / Math.PI % 360;
|
|
27058
|
+
let angle = 0;
|
|
27059
|
+
rotate > 180 && rotate < 360 ? angle = 90 : angle = -90;
|
|
27060
|
+
rotate += angle;
|
|
27061
|
+
return `translate(${x2},${y2}) rotate(${rotate})`;
|
|
27062
|
+
}
|
|
27166
27063
|
} catch (error) {
|
|
27167
27064
|
logError$2(fileName$7, "getDataLabelTransformString", error);
|
|
27168
27065
|
return "";
|
|
@@ -27171,6 +27068,7 @@ const DonutChart = ({
|
|
|
27171
27068
|
const drawDonutDataLabels = () => {
|
|
27172
27069
|
try {
|
|
27173
27070
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
27071
|
+
const isSingleDataLabel = pieChartData && pieChartData.length === 1;
|
|
27174
27072
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("transform", `${getPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(
|
|
27175
27073
|
pieChartData.filter(
|
|
27176
27074
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
@@ -27189,7 +27087,7 @@ const DonutChart = ({
|
|
|
27189
27087
|
).attr(
|
|
27190
27088
|
"font-family",
|
|
27191
27089
|
(d) => d.data.properties?.labelFont ?? "Helvetica"
|
|
27192
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
27090
|
+
).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) => {
|
|
27193
27091
|
const { plotArea } = chartFormatOptions;
|
|
27194
27092
|
if (plotArea.dataLabelName) {
|
|
27195
27093
|
return d.data.legend;
|
|
@@ -27200,7 +27098,7 @@ const DonutChart = ({
|
|
|
27200
27098
|
pieChartData.filter(
|
|
27201
27099
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
27202
27100
|
)
|
|
27203
|
-
).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?.
|
|
27101
|
+
).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(
|
|
27204
27102
|
"font-style",
|
|
27205
27103
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27206
27104
|
).attr(
|
|
@@ -27214,7 +27112,7 @@ const DonutChart = ({
|
|
|
27214
27112
|
).attr(
|
|
27215
27113
|
"font-family",
|
|
27216
27114
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
27217
|
-
).attr("transform", (d) => getDataLabelTransformString(d)).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr("dy", chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0").text((d) => {
|
|
27115
|
+
).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) => {
|
|
27218
27116
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
27219
27117
|
const dataValue = d.data.data[0].value;
|
|
27220
27118
|
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
@@ -27281,69 +27179,7 @@ const DonutChart = ({
|
|
|
27281
27179
|
const textWidth = 80;
|
|
27282
27180
|
const xOffset = midangle < Math.PI ? 0 : -textWidth;
|
|
27283
27181
|
return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
|
|
27284
|
-
}).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")
|
|
27285
|
-
try {
|
|
27286
|
-
let value2 = d.data.data[0].value.toString();
|
|
27287
|
-
if (d.data.data[0].value !== void 0) {
|
|
27288
|
-
value2 = chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%" ? (Math.abs(d.data.data[0].value / pieTotalValue) * 100).toFixed(
|
|
27289
|
-
convertStringToNumber(
|
|
27290
|
-
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
27291
|
-
)
|
|
27292
|
-
) + "%" : getNumberWithFormatFunction(
|
|
27293
|
-
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
27294
|
-
chartFormatOptions.plotArea.dataLabelNumberFormat,
|
|
27295
|
-
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
27296
|
-
)(d.data.data[0].value);
|
|
27297
|
-
}
|
|
27298
|
-
let htmlString = "";
|
|
27299
|
-
if (chartFormatOptions.plotArea.dataLabelName) {
|
|
27300
|
-
htmlString += `<span style="
|
|
27301
|
-
font-size: ${d.data.properties.labelFontSize}px;
|
|
27302
|
-
color: ${d.data.properties.labelFontColor};
|
|
27303
|
-
font-style: ${d.data.properties.labelFontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""};
|
|
27304
|
-
text-decoration: ${d.data.properties.labelFontStyle.includes(
|
|
27305
|
-
fontStyleOptions.underline
|
|
27306
|
-
) ? fontStyleOptions.underline : ""};
|
|
27307
|
-
font-weight: ${d.data.properties.labelFontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : ""};
|
|
27308
|
-
font-family: ${d.data.properties.labelFont};
|
|
27309
|
-
display: block; white-space: nowrap; width:80px; overflow:hidden; text-overflow:ellipsis; text-align: center;">
|
|
27310
|
-
${d.data.legend}
|
|
27311
|
-
</span>`;
|
|
27312
|
-
}
|
|
27313
|
-
if (chartFormatOptions.plotArea.dataLabelValue && d.data.data[0].value !== void 0) {
|
|
27314
|
-
htmlString += `<span style="
|
|
27315
|
-
font-size: ${d.data.properties.valueFontSize}px;
|
|
27316
|
-
color: ${d.data.properties.valueFontColor};
|
|
27317
|
-
font-style: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""};
|
|
27318
|
-
text-decoration: ${d.data.properties.valueFontStyle.includes(
|
|
27319
|
-
fontStyleOptions.underline
|
|
27320
|
-
) ? fontStyleOptions.underline : ""};
|
|
27321
|
-
font-weight: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : "300"};
|
|
27322
|
-
font-family: ${d.data.properties.valueFont};
|
|
27323
|
-
display: block;">
|
|
27324
|
-
${value2}
|
|
27325
|
-
</span>`;
|
|
27326
|
-
}
|
|
27327
|
-
if (chartFormatOptions.plotArea.plotAreaAbsoluteValue && d.data[0].value !== void 0) {
|
|
27328
|
-
htmlString += `<span style="
|
|
27329
|
-
font-size: ${d.data.properties.valueFontSize}px;
|
|
27330
|
-
color: ${d.data.properties.valueFontColor};
|
|
27331
|
-
font-style: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""};
|
|
27332
|
-
text-decoration: ${d.data.properties.valueFontStyle.includes(
|
|
27333
|
-
fontStyleOptions.underline
|
|
27334
|
-
) ? fontStyleOptions.underline : ""};
|
|
27335
|
-
font-weight: ${d.data.properties.valueFontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : "300"};
|
|
27336
|
-
font-family: ${d.data.properties.valueFont};
|
|
27337
|
-
display: block;">
|
|
27338
|
-
${format(".2s")(d.data[0].value)}
|
|
27339
|
-
</span>`;
|
|
27340
|
-
}
|
|
27341
|
-
return htmlString;
|
|
27342
|
-
} catch (error) {
|
|
27343
|
-
logError$2(fileName$7, "drawDonutDataLabels", error);
|
|
27344
|
-
return "";
|
|
27345
|
-
}
|
|
27346
|
-
});
|
|
27182
|
+
}).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");
|
|
27347
27183
|
}
|
|
27348
27184
|
} catch (error) {
|
|
27349
27185
|
logError$2(fileName$7, "drawDonutDataLabels", error);
|
|
@@ -27541,7 +27377,9 @@ const Treemap = ({ data, formatOptions, chartId }) => {
|
|
|
27541
27377
|
)(data2.data.data[1].value)
|
|
27542
27378
|
} : ""
|
|
27543
27379
|
],
|
|
27544
|
-
chartFormatOptions
|
|
27380
|
+
chartFormatOptions,
|
|
27381
|
+
void 0,
|
|
27382
|
+
d.currentTarget.__data__.data.properties
|
|
27545
27383
|
);
|
|
27546
27384
|
}).on("mouseout", () => hideTooltipOnMouseOut());
|
|
27547
27385
|
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);
|
|
@@ -27724,7 +27562,9 @@ const PieofPie = ({
|
|
|
27724
27562
|
},
|
|
27725
27563
|
{ key: "Legend", value: d.currentTarget.__data__.data.legend }
|
|
27726
27564
|
],
|
|
27727
|
-
chartFormatOptions
|
|
27565
|
+
chartFormatOptions,
|
|
27566
|
+
void 0,
|
|
27567
|
+
d.currentTarget.__data__.data.properties
|
|
27728
27568
|
);
|
|
27729
27569
|
}).on("mouseout.text", () => {
|
|
27730
27570
|
hideTooltipOnMouseOut();
|
|
@@ -27790,7 +27630,9 @@ const PieofPie = ({
|
|
|
27790
27630
|
},
|
|
27791
27631
|
{ key: "Legend", value: d.currentTarget.__data__.data.legend }
|
|
27792
27632
|
],
|
|
27793
|
-
chartFormatOptions
|
|
27633
|
+
chartFormatOptions,
|
|
27634
|
+
void 0,
|
|
27635
|
+
d.currentTarget.__data__.data.properties
|
|
27794
27636
|
);
|
|
27795
27637
|
}).on("mouseout.text", () => {
|
|
27796
27638
|
hideTooltipOnMouseOut();
|
|
@@ -28126,13 +27968,13 @@ const PyramidChart = ({
|
|
|
28126
27968
|
${centerX + bottomWidth / 2},${yBottom}
|
|
28127
27969
|
${centerX - bottomWidth / 2},${yBottom}
|
|
28128
27970
|
`
|
|
28129
|
-
).attr("fill", d.properties.color || "#4cb2ff").on("mousemove", function() {
|
|
27971
|
+
).attr("fill", d.properties.color || "#4cb2ff").on("mousemove", function(d2) {
|
|
28130
27972
|
try {
|
|
28131
27973
|
showTooltipOnMouseMove(
|
|
28132
27974
|
[
|
|
28133
27975
|
{
|
|
28134
|
-
key:
|
|
28135
|
-
value: chartFormatOptions.toolTip.toolTipNumberFormat == ",.0%" ?
|
|
27976
|
+
key: d2.legend,
|
|
27977
|
+
value: chartFormatOptions.toolTip.toolTipNumberFormat == ",.0%" ? d2.data[0].value ? (Math.abs(d2.data[0].value / pyramidTotalValue) * 100).toFixed(
|
|
28136
27978
|
convertStringToNumber(
|
|
28137
27979
|
chartFormatOptions.toolTip.toolTipDecimalPrecision
|
|
28138
27980
|
)
|
|
@@ -28140,10 +27982,12 @@ const PyramidChart = ({
|
|
|
28140
27982
|
"None",
|
|
28141
27983
|
chartFormatOptions.toolTip.toolTipNumberFormat,
|
|
28142
27984
|
chartFormatOptions.toolTip.toolTipDecimalPrecision
|
|
28143
|
-
)(
|
|
27985
|
+
)(d2.data[0].value)
|
|
28144
27986
|
}
|
|
28145
27987
|
],
|
|
28146
|
-
chartFormatOptions
|
|
27988
|
+
chartFormatOptions,
|
|
27989
|
+
void 0,
|
|
27990
|
+
d2.currentTarget.__data__.data.properties
|
|
28147
27991
|
);
|
|
28148
27992
|
select$2(this).style("opacity", 0.8).style("stroke", chartFormatOptions.chartArea.chartAreaColor).style("stroke-width", "3px");
|
|
28149
27993
|
} catch (error) {
|
|
@@ -28475,7 +28319,9 @@ const ProgressChart = ({
|
|
|
28475
28319
|
)(maxValue)
|
|
28476
28320
|
}
|
|
28477
28321
|
],
|
|
28478
|
-
chartFormatOptions
|
|
28322
|
+
chartFormatOptions,
|
|
28323
|
+
void 0,
|
|
28324
|
+
d.currentTarget.__data__.data.properties
|
|
28479
28325
|
);
|
|
28480
28326
|
} catch (error) {
|
|
28481
28327
|
logError$2(
|
|
@@ -28928,7 +28774,9 @@ const Speedometer = ({
|
|
|
28928
28774
|
)(data[index2].data[0].value)
|
|
28929
28775
|
}
|
|
28930
28776
|
],
|
|
28931
|
-
chartFormatOptions
|
|
28777
|
+
chartFormatOptions,
|
|
28778
|
+
void 0,
|
|
28779
|
+
d.currentTarget.__data__.data.properties
|
|
28932
28780
|
);
|
|
28933
28781
|
}).on("mouseout", () => {
|
|
28934
28782
|
hideTooltipOnMouseOut();
|
|
@@ -29293,7 +29141,9 @@ const RadialBarChart = ({
|
|
|
29293
29141
|
},
|
|
29294
29142
|
{ key: "Legend", value: d.properties.alias }
|
|
29295
29143
|
],
|
|
29296
|
-
chartFormatOptions
|
|
29144
|
+
chartFormatOptions,
|
|
29145
|
+
void 0,
|
|
29146
|
+
d.properties
|
|
29297
29147
|
);
|
|
29298
29148
|
}).on("mouseout", () => {
|
|
29299
29149
|
hideTooltipOnMouseOut();
|
|
@@ -29854,7 +29704,9 @@ const WordCloud = ({ data, formatOptions, chartId }) => {
|
|
|
29854
29704
|
value: totalMeasureValue
|
|
29855
29705
|
}
|
|
29856
29706
|
],
|
|
29857
|
-
chartFormatOptions
|
|
29707
|
+
chartFormatOptions,
|
|
29708
|
+
void 0,
|
|
29709
|
+
d.properties
|
|
29858
29710
|
);
|
|
29859
29711
|
} catch (error) {
|
|
29860
29712
|
logError$2(fileName$2, "draw-mousemove", error);
|
|
@@ -33323,7 +33175,9 @@ const VennChart = ({
|
|
|
33323
33175
|
)(d.size)
|
|
33324
33176
|
}
|
|
33325
33177
|
],
|
|
33326
|
-
chartFormatOptions
|
|
33178
|
+
chartFormatOptions,
|
|
33179
|
+
void 0,
|
|
33180
|
+
d.properties
|
|
33327
33181
|
);
|
|
33328
33182
|
let selection2 = select$2(this).transition("tooltip").duration(10);
|
|
33329
33183
|
selection2.selectAll("path").style("stroke-dasharray", "5,5").style("stroke-opacity", 1).style("stroke", "black");
|
|
@@ -34072,7 +33926,9 @@ const SankeyChart = ({
|
|
|
34072
33926
|
)(d.value)
|
|
34073
33927
|
}
|
|
34074
33928
|
],
|
|
34075
|
-
chartFormatOptions
|
|
33929
|
+
chartFormatOptions,
|
|
33930
|
+
void 0,
|
|
33931
|
+
d.currentTarget.__data__.data.properties
|
|
34076
33932
|
);
|
|
34077
33933
|
}
|
|
34078
33934
|
chartAreaTagG.selectAll(".sankey-nodes").style("fill-opacity", 0.1).style("stroke", "none");
|
|
@@ -34141,7 +33997,7 @@ const SankeyChart = ({
|
|
|
34141
33997
|
showTooltipOnMouseMove(
|
|
34142
33998
|
[
|
|
34143
33999
|
{
|
|
34144
|
-
key: d.source.name + "→" + d.target.name,
|
|
34000
|
+
key: d.source.name.split("~$~")[1] + "→" + d.target.name.split("~$~")[1],
|
|
34145
34001
|
value: getNumberWithFormatFunction(
|
|
34146
34002
|
"None",
|
|
34147
34003
|
chartFormatOptions.toolTip.toolTipNumberFormat,
|
|
@@ -34149,7 +34005,9 @@ const SankeyChart = ({
|
|
|
34149
34005
|
)(d.value)
|
|
34150
34006
|
}
|
|
34151
34007
|
],
|
|
34152
|
-
chartFormatOptions
|
|
34008
|
+
chartFormatOptions,
|
|
34009
|
+
void 0,
|
|
34010
|
+
{ markerColor: d.source.color, markerShape: "circle" }
|
|
34153
34011
|
);
|
|
34154
34012
|
}
|
|
34155
34013
|
} catch (error) {
|
|
@@ -49607,7 +49465,9 @@ const Maps = ({
|
|
|
49607
49465
|
},
|
|
49608
49466
|
...keyValueObject
|
|
49609
49467
|
],
|
|
49610
|
-
chartFormatOptions
|
|
49468
|
+
chartFormatOptions,
|
|
49469
|
+
void 0,
|
|
49470
|
+
d.currentTarget.__data__.data.properties
|
|
49611
49471
|
);
|
|
49612
49472
|
}
|
|
49613
49473
|
}).on("mouseout", (event2, d) => {
|
|
@@ -49717,7 +49577,9 @@ const Maps = ({
|
|
|
49717
49577
|
)(d.properties.data?.data[1]?.value)
|
|
49718
49578
|
}
|
|
49719
49579
|
],
|
|
49720
|
-
chartFormatOptions
|
|
49580
|
+
chartFormatOptions,
|
|
49581
|
+
void 0,
|
|
49582
|
+
d.currentTarget.__data__.data.properties
|
|
49721
49583
|
);
|
|
49722
49584
|
select$2(this).style(
|
|
49723
49585
|
"r",
|
|
@@ -53691,25 +53553,30 @@ const WaterfallChart = ({
|
|
|
53691
53553
|
barGroups = barGroupsEnter.merge(barGroups);
|
|
53692
53554
|
let rects = barGroups.selectAll("rect").data((d) => d, (d) => d.key || d.Key);
|
|
53693
53555
|
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) => {
|
|
53694
|
-
showTooltipOnMouseMove(
|
|
53695
|
-
|
|
53696
|
-
|
|
53697
|
-
|
|
53698
|
-
|
|
53699
|
-
|
|
53700
|
-
|
|
53701
|
-
|
|
53702
|
-
d.key === "
|
|
53703
|
-
|
|
53704
|
-
|
|
53705
|
-
|
|
53706
|
-
|
|
53707
|
-
|
|
53708
|
-
|
|
53709
|
-
|
|
53710
|
-
|
|
53711
|
-
|
|
53712
|
-
|
|
53556
|
+
showTooltipOnMouseMove(
|
|
53557
|
+
[
|
|
53558
|
+
{
|
|
53559
|
+
key: d.key === "dimensionTotal" ? "Dimension" : formatOptions.xAxisTitle.xAxisTitleText,
|
|
53560
|
+
value: chartJSON.formattedDimensionListMap.get(d.data.dimension)
|
|
53561
|
+
},
|
|
53562
|
+
{
|
|
53563
|
+
key: formatOptions.yAxisTitle.yAxisTitleText,
|
|
53564
|
+
value: (d.key === "up" ? "+" : d.key === "down" ? "-" : "") + getNumberWithFormat(
|
|
53565
|
+
d.key === "dimensionTotal" ? d.data.dimensionTotal : d[1] - d[0],
|
|
53566
|
+
formatOptions.toolTip.toolTipDisplayUnits,
|
|
53567
|
+
formatOptions.toolTip.toolTipNumberFormat,
|
|
53568
|
+
formatOptions.toolTip.toolTipDecimalPrecision
|
|
53569
|
+
)
|
|
53570
|
+
},
|
|
53571
|
+
{
|
|
53572
|
+
key: "Legend",
|
|
53573
|
+
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"
|
|
53574
|
+
}
|
|
53575
|
+
],
|
|
53576
|
+
formatOptions,
|
|
53577
|
+
void 0,
|
|
53578
|
+
d.currentTarget.__data__.data.properties
|
|
53579
|
+
);
|
|
53713
53580
|
}).on("mouseout", () => {
|
|
53714
53581
|
hideTooltipOnMouseOut();
|
|
53715
53582
|
});
|
|
@@ -54274,14 +54141,19 @@ const TornadoChart = ({
|
|
|
54274
54141
|
...child,
|
|
54275
54142
|
parentProperties: d.properties
|
|
54276
54143
|
}))).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) => {
|
|
54277
|
-
showTooltipOnMouseMove(
|
|
54278
|
-
|
|
54279
|
-
|
|
54280
|
-
|
|
54281
|
-
|
|
54282
|
-
|
|
54283
|
-
|
|
54284
|
-
|
|
54144
|
+
showTooltipOnMouseMove(
|
|
54145
|
+
[
|
|
54146
|
+
{ key: "Measure", value: d.legend },
|
|
54147
|
+
{ key: "Legend", value: d.dimension },
|
|
54148
|
+
{
|
|
54149
|
+
key: "Value",
|
|
54150
|
+
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)
|
|
54151
|
+
}
|
|
54152
|
+
],
|
|
54153
|
+
formatOptions,
|
|
54154
|
+
void 0,
|
|
54155
|
+
d.currentTarget.__data__.data.properties
|
|
54156
|
+
);
|
|
54285
54157
|
}).on("mouseout", () => {
|
|
54286
54158
|
hideTooltipOnMouseOut();
|
|
54287
54159
|
});
|