@fluentui/react-charting 5.24.6 → 5.24.7
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/CHANGELOG.json +28 -1
- package/CHANGELOG.md +13 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.d.ts +3 -2
- package/lib/components/CommonComponents/CartesianChart.base.js +118 -102
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +13 -10
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +15 -24
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +14 -12
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +13 -17
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/utilities/utilities.d.ts +3 -0
- package/lib/utilities/utilities.js +25 -38
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/utilities/vbc-utils.d.ts +18 -0
- package/lib/utilities/vbc-utils.js +29 -0
- package/lib/utilities/vbc-utils.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +3 -2
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +117 -101
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +13 -10
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +14 -23
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +13 -11
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +12 -16
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +3 -0
- package/lib-amd/utilities/utilities.js +26 -39
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-amd/utilities/vbc-utils.d.ts +18 -0
- package/lib-amd/utilities/vbc-utils.js +34 -1
- package/lib-amd/utilities/vbc-utils.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +3 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +117 -101
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +13 -10
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +14 -23
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +13 -11
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +12 -16
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +3 -0
- package/lib-commonjs/utilities/utilities.js +27 -40
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/lib-commonjs/utilities/vbc-utils.d.ts +18 -0
- package/lib-commonjs/utilities/vbc-utils.js +34 -1
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
2
2
|
"use strict";
|
|
3
3
|
var _a;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.sortAxisCategories = exports.truncateString = exports.domainRangeOfNumericForScatterChart = exports.domainRangeOfDateForScatterChart = exports.getCurveFactory = exports.createMeasurementSpan = exports.copyStyle = exports.resolveCSSVariables = exports.areArraysEqual = exports.getSecureProps = exports.isScalePaddingDefined = exports.getScalePadding = exports.getBarWidth = exports.formatScientificLimitWidth = exports.wrapTextInsideDonut = exports.rotateXAxisLabels = exports.getAccessibleDataObject = exports.pointTypes = exports.CustomPoints = exports.Points = exports.getTypeOfAxis = exports.findHBCWANumericMinMaxOfY = exports.findVerticalNumericMinMaxOfY = exports.findVSBCNumericMinMaxOfY = exports.findNumericMinMaxOfY = exports.domainRageOfVerticalNumeric = exports.domainRangeOfDateForAreaLineVerticalBarChart = exports.domainRangeOfVSBCNumeric = exports.domainRangeOfXStringAxis = exports.domainRangeOfNumericForHorizontalBarChartWithAxis = exports.computeLongestBars = exports.groupChartDataByYValue = exports.domainRangeOfNumericForAreaChart = exports.getXAxisType = exports.tooltipOfAxislabels = exports.calculateLongestLabelWidth = exports.wrapContent = exports.createYAxisLabels = exports.createWrapOfXLabels = exports.silceOrAppendToArray = exports.getUnique = exports.calloutData = exports.createStringYAxis = exports.createStringYAxisForHorizontalBarChartWithAxis = exports.createNumericYAxis = exports.createYAxisForHorizontalBarChartWithAxis = exports.prepareDatapoints = exports.createStringXAxis = exports.createDateXAxis = exports.createNumericXAxis = exports.defaultYAxisTickFormatter = exports.YAxisType = exports.XAxisTypes = exports.ChartTypes = exports.MIN_DONUT_RADIUS = exports.MIN_DOMAIN_MARGIN = void 0;
|
|
5
|
+
exports.sortAxisCategories = exports.truncateString = exports.domainRangeOfNumericForScatterChart = exports.domainRangeOfDateForScatterChart = exports.getCurveFactory = exports.createMeasurementSpan = exports.copyStyle = exports.resolveCSSVariables = exports.areArraysEqual = exports.getSecureProps = exports.isScalePaddingDefined = exports.getScalePadding = exports.getBarWidth = exports.formatScientificLimitWidth = exports.wrapTextInsideDonut = exports.rotateXAxisLabels = exports.getAccessibleDataObject = exports.pointTypes = exports.CustomPoints = exports.Points = exports.getTypeOfAxis = exports.findHBCWANumericMinMaxOfY = exports.findVerticalNumericMinMaxOfY = exports.findVSBCNumericMinMaxOfY = exports.findNumericMinMaxOfY = exports.domainRageOfVerticalNumeric = exports.domainRangeOfDateForAreaLineVerticalBarChart = exports.domainRangeOfVSBCNumeric = exports.domainRangeOfXStringAxis = exports.domainRangeOfNumericForHorizontalBarChartWithAxis = exports.computeLongestBars = exports.groupChartDataByYValue = exports.domainRangeOfNumericForAreaChart = exports.getXAxisType = exports.tooltipOfAxislabels = exports.calculateLongestLabelWidth = exports.wrapContent = exports.createYAxisLabels = exports.createWrapOfXLabels = exports.DEFAULT_WRAP_WIDTH = exports.silceOrAppendToArray = exports.getUnique = exports.calloutData = exports.createStringYAxis = exports.createStringYAxisForHorizontalBarChartWithAxis = exports.createNumericYAxis = exports.createYAxisForHorizontalBarChartWithAxis = exports.prepareDatapoints = exports.createStringXAxis = exports.createDateXAxis = exports.createNumericXAxis = exports.defaultYAxisTickFormatter = exports.YAxisType = exports.XAxisTypes = exports.ChartTypes = exports.MIN_DONUT_RADIUS = exports.MIN_DOMAIN_MARGIN = void 0;
|
|
6
6
|
exports.MIN_DOMAIN_MARGIN = 8;
|
|
7
7
|
exports.MIN_DONUT_RADIUS = 1;
|
|
8
8
|
var ChartTypes;
|
|
@@ -63,7 +63,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
63
63
|
*/
|
|
64
64
|
function createNumericXAxis(xAxisParams, tickParams, chartType, culture) {
|
|
65
65
|
var _a;
|
|
66
|
-
var domainNRangeValues = xAxisParams.domainNRangeValues, _b = xAxisParams.showRoundOffXTickValues, showRoundOffXTickValues = _b === void 0 ? true : _b, _c = xAxisParams.xAxistickSize, xAxistickSize = _c === void 0 ? 6 : _c, _d = xAxisParams.tickPadding, tickPadding = _d === void 0 ? 10 : _d, xAxisCount = xAxisParams.xAxisCount, xAxisElement = xAxisParams.xAxisElement, hideTickOverlap = xAxisParams.hideTickOverlap;
|
|
66
|
+
var domainNRangeValues = xAxisParams.domainNRangeValues, _b = xAxisParams.showRoundOffXTickValues, showRoundOffXTickValues = _b === void 0 ? true : _b, _c = xAxisParams.xAxistickSize, xAxistickSize = _c === void 0 ? 6 : _c, _d = xAxisParams.tickPadding, tickPadding = _d === void 0 ? 10 : _d, xAxisCount = xAxisParams.xAxisCount, xAxisElement = xAxisParams.xAxisElement, hideTickOverlap = xAxisParams.hideTickOverlap, calcMaxLabelWidth = xAxisParams.calcMaxLabelWidth;
|
|
67
67
|
var xAxisScale = (0, d3_scale_1.scaleLinear)()
|
|
68
68
|
.domain([domainNRangeValues.dStartValue, domainNRangeValues.dEndValue])
|
|
69
69
|
.range([domainNRangeValues.rStartValue, domainNRangeValues.rEndValue]);
|
|
@@ -77,7 +77,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
77
77
|
return (0, chart_utilities_1.formatToLocaleString)(xAxisValue, culture);
|
|
78
78
|
};
|
|
79
79
|
if (hideTickOverlap && typeof xAxisCount === 'undefined') {
|
|
80
|
-
var longestLabelWidth = (
|
|
80
|
+
var longestLabelWidth = calcMaxLabelWidth(xAxisScale.ticks().map(tickFormat)) + 20;
|
|
81
81
|
var _e = xAxisScale.range(), start = _e[0], end = _e[1];
|
|
82
82
|
tickCount = Math.min(Math.max(1, Math.floor(Math.abs(end - start) / longestLabelWidth)), 10);
|
|
83
83
|
}
|
|
@@ -203,7 +203,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
203
203
|
*/
|
|
204
204
|
function createDateXAxis(xAxisParams, tickParams, culture, options, timeFormatLocale, customDateTimeFormatter, useUTC) {
|
|
205
205
|
var _a;
|
|
206
|
-
var domainNRangeValues = xAxisParams.domainNRangeValues, xAxisElement = xAxisParams.xAxisElement, _b = xAxisParams.tickPadding, tickPadding = _b === void 0 ? 6 : _b, _c = xAxisParams.xAxistickSize, xAxistickSize = _c === void 0 ? 6 : _c, xAxisCount = xAxisParams.xAxisCount;
|
|
206
|
+
var domainNRangeValues = xAxisParams.domainNRangeValues, xAxisElement = xAxisParams.xAxisElement, _b = xAxisParams.tickPadding, tickPadding = _b === void 0 ? 6 : _b, _c = xAxisParams.xAxistickSize, xAxistickSize = _c === void 0 ? 6 : _c, xAxisCount = xAxisParams.xAxisCount, calcMaxLabelWidth = xAxisParams.calcMaxLabelWidth;
|
|
207
207
|
var xAxisScale = useUTC ? (0, d3_scale_1.scaleUtc)() : (0, d3_scale_1.scaleTime)();
|
|
208
208
|
xAxisScale
|
|
209
209
|
.domain([domainNRangeValues.dStartValue, domainNRangeValues.dEndValue])
|
|
@@ -241,7 +241,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
241
241
|
}
|
|
242
242
|
return (0, chart_utilities_1.formatDateToLocaleString)(domainValue, culture, useUTC, false, formatOptions);
|
|
243
243
|
};
|
|
244
|
-
var longestLabelWidth = (
|
|
244
|
+
var longestLabelWidth = calcMaxLabelWidth(xAxisScale.ticks().map(tickFormat)) + 40;
|
|
245
245
|
var _d = xAxisScale.range(), start = _d[0], end = _d[1];
|
|
246
246
|
var maxPossibleTickCount = Math.min(Math.max(1, Math.floor(Math.abs(end - start) / longestLabelWidth)), 10);
|
|
247
247
|
tickCount = Math.min(maxPossibleTickCount, xAxisCount !== null && xAxisCount !== void 0 ? xAxisCount : tickCount);
|
|
@@ -269,7 +269,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
269
269
|
*/
|
|
270
270
|
function createStringXAxis(xAxisParams, tickParams, dataset, culture) {
|
|
271
271
|
var _a;
|
|
272
|
-
var domainNRangeValues = xAxisParams.domainNRangeValues, _b = xAxisParams.xAxistickSize, xAxistickSize = _b === void 0 ? 6 : _b, _c = xAxisParams.tickPadding, tickPadding = _c === void 0 ? 10 : _c, _d = xAxisParams.xAxisPadding, xAxisPadding = _d === void 0 ? 0.1 : _d, xAxisInnerPadding = xAxisParams.xAxisInnerPadding, xAxisOuterPadding = xAxisParams.xAxisOuterPadding, containerWidth = xAxisParams.containerWidth, hideTickOverlap = xAxisParams.hideTickOverlap;
|
|
272
|
+
var domainNRangeValues = xAxisParams.domainNRangeValues, _b = xAxisParams.xAxistickSize, xAxistickSize = _b === void 0 ? 6 : _b, _c = xAxisParams.tickPadding, tickPadding = _c === void 0 ? 10 : _c, _d = xAxisParams.xAxisPadding, xAxisPadding = _d === void 0 ? 0.1 : _d, xAxisInnerPadding = xAxisParams.xAxisInnerPadding, xAxisOuterPadding = xAxisParams.xAxisOuterPadding, containerWidth = xAxisParams.containerWidth, hideTickOverlap = xAxisParams.hideTickOverlap, calcMaxLabelWidth = xAxisParams.calcMaxLabelWidth;
|
|
273
273
|
var xAxisScale = (0, d3_scale_1.scaleBand)()
|
|
274
274
|
.domain(dataset)
|
|
275
275
|
.range([domainNRangeValues.rStartValue, domainNRangeValues.rEndValue])
|
|
@@ -281,7 +281,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
281
281
|
// Here, we need the width of each individual label to detect overlaps,
|
|
282
282
|
// but calculateLongestLabelWidth returns the maximum pixel width from an array of labels.
|
|
283
283
|
// So call this function separately for each label, instead of the entire array.
|
|
284
|
-
var tickSizes = tickValues.map(function (value) { return (
|
|
284
|
+
var tickSizes = tickValues.map(function (value) { return calcMaxLabelWidth([value]); });
|
|
285
285
|
// for LTR
|
|
286
286
|
var start = 0;
|
|
287
287
|
var end = containerWidth;
|
|
@@ -395,10 +395,10 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
395
395
|
if (roundedTicks === void 0) { roundedTicks = false; }
|
|
396
396
|
var _a = yAxisParams.yMinMaxValues, yMinMaxValues = _a === void 0 ? { startValue: 0, endValue: 0 } : _a, _b = yAxisParams.yAxisElement, yAxisElement = _b === void 0 ? null : _b, _c = yAxisParams.yMaxValue, yMaxValue = _c === void 0 ? 0 : _c, _d = yAxisParams.yMinValue, yMinValue = _d === void 0 ? 0 : _d, containerHeight = yAxisParams.containerHeight, containerWidth = yAxisParams.containerWidth, margins = yAxisParams.margins, _e = yAxisParams.tickPadding, tickPadding = _e === void 0 ? 12 : _e, _f = yAxisParams.maxOfYVal, maxOfYVal = _f === void 0 ? 0 : _f, yAxisTickFormat = yAxisParams.yAxisTickFormat, _g = yAxisParams.yAxisTickCount, yAxisTickCount = _g === void 0 ? 4 : _g, eventAnnotationProps = yAxisParams.eventAnnotationProps, eventLabelHeight = yAxisParams.eventLabelHeight;
|
|
397
397
|
// maxOfYVal coming from only area chart and Grouped vertical bar chart(Calculation done at base file)
|
|
398
|
-
var tempVal = maxOfYVal || yMinMaxValues.endValue;
|
|
398
|
+
var tempVal = maxOfYVal || yMinMaxValues.endValue || 0;
|
|
399
399
|
var finalYmax = tempVal > yMaxValue ? tempVal : yMaxValue;
|
|
400
400
|
var finalYmin = supportNegativeData
|
|
401
|
-
? Math.min(yMinMaxValues.startValue, yMinValue || 0)
|
|
401
|
+
? Math.min(yMinMaxValues.startValue || 0, yMinValue || 0)
|
|
402
402
|
: yMinMaxValues.startValue < yMinValue
|
|
403
403
|
? 0
|
|
404
404
|
: yMinValue;
|
|
@@ -554,6 +554,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
exports.silceOrAppendToArray = silceOrAppendToArray;
|
|
557
|
+
exports.DEFAULT_WRAP_WIDTH = 10;
|
|
557
558
|
/**
|
|
558
559
|
* This method used for wrapping of x axis labels (tick values).
|
|
559
560
|
* It breaks down given text value by space separated and calculates the total height needed to display all the words.
|
|
@@ -564,21 +565,19 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
564
565
|
* @returns
|
|
565
566
|
*/
|
|
566
567
|
function createWrapOfXLabels(wrapLabelProps) {
|
|
567
|
-
var node = wrapLabelProps.node, xAxis = wrapLabelProps.xAxis, noOfCharsToTruncate = wrapLabelProps.noOfCharsToTruncate, showXAxisLablesTooltip = wrapLabelProps.showXAxisLablesTooltip;
|
|
568
|
+
var node = wrapLabelProps.node, xAxis = wrapLabelProps.xAxis, noOfCharsToTruncate = wrapLabelProps.noOfCharsToTruncate, showXAxisLablesTooltip = wrapLabelProps.showXAxisLablesTooltip, _a = wrapLabelProps.width, width = _a === void 0 ? exports.DEFAULT_WRAP_WIDTH : _a;
|
|
568
569
|
if (node === null) {
|
|
569
570
|
return;
|
|
570
571
|
}
|
|
571
572
|
var axisNode = (0, d3_selection_1.select)(node).call(xAxis);
|
|
572
573
|
var removeVal = 0;
|
|
573
|
-
var
|
|
574
|
-
var arr = [];
|
|
574
|
+
var maxLines = 1;
|
|
575
575
|
axisNode.selectAll('.tick text').each(function () {
|
|
576
576
|
var text = (0, d3_selection_1.select)(this);
|
|
577
577
|
var totalWord = text.text();
|
|
578
578
|
var truncatedWord = "".concat(text.text().slice(0, noOfCharsToTruncate), "...");
|
|
579
579
|
var totalWordLength = text.text().length;
|
|
580
580
|
var words = text.text().split(/\s+/).reverse();
|
|
581
|
-
arr.push(words.length);
|
|
582
581
|
var word = '';
|
|
583
582
|
var line = [];
|
|
584
583
|
var lineNumber = 0;
|
|
@@ -599,7 +598,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
599
598
|
.attr('id', 'showDots')
|
|
600
599
|
.attr('x', 0)
|
|
601
600
|
.attr('y', y)
|
|
602
|
-
.attr('dy',
|
|
601
|
+
.attr('dy', dy + 'em')
|
|
603
602
|
.text(truncatedWord);
|
|
604
603
|
}
|
|
605
604
|
else if (showXAxisLablesTooltip && totalWordLength <= noOfCharsToTruncate) {
|
|
@@ -608,7 +607,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
608
607
|
.attr('id', 'LessLength')
|
|
609
608
|
.attr('x', 0)
|
|
610
609
|
.attr('y', y)
|
|
611
|
-
.attr('dy',
|
|
610
|
+
.attr('dy', dy + 'em')
|
|
612
611
|
.text(totalWord);
|
|
613
612
|
}
|
|
614
613
|
else {
|
|
@@ -628,32 +627,20 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
628
627
|
.text(word);
|
|
629
628
|
}
|
|
630
629
|
}
|
|
631
|
-
var maxDigit = Math.max.apply(Math, arr);
|
|
632
|
-
var maxHeight_1 = 12; // intial value to render corretly first time
|
|
633
|
-
axisNode.selectAll('text').each(function () {
|
|
634
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
635
|
-
var outerHTMLElement = document.getElementById('WordBreakId');
|
|
636
|
-
var BoxCordinates = outerHTMLElement && outerHTMLElement.getBoundingClientRect();
|
|
637
|
-
var boxHeight = BoxCordinates && BoxCordinates.height;
|
|
638
|
-
if (boxHeight > maxHeight_1) {
|
|
639
|
-
maxHeight_1 = boxHeight;
|
|
640
|
-
}
|
|
641
|
-
});
|
|
642
|
-
// If we take directly maxDigit * maxheight, then it will show more height between x axis tick values and bottom.
|
|
643
|
-
// To avoid this, reducing maxDigit value by removing some digit based on legth of word.
|
|
644
|
-
var removeDigit = 4;
|
|
645
|
-
if (maxDigit <= 2) {
|
|
646
|
-
removeDigit = 1;
|
|
647
|
-
}
|
|
648
|
-
else if (maxDigit > 2 && maxDigit <= 6) {
|
|
649
|
-
removeDigit = 2;
|
|
650
|
-
}
|
|
651
|
-
else if (maxDigit > 6 && maxDigit <= 9) {
|
|
652
|
-
removeDigit = 3;
|
|
653
|
-
}
|
|
654
|
-
removeVal = (maxDigit - removeDigit) * maxHeight_1;
|
|
655
630
|
}
|
|
631
|
+
maxLines = Math.max(maxLines, lineNumber + 1);
|
|
656
632
|
});
|
|
633
|
+
if (!showXAxisLablesTooltip) {
|
|
634
|
+
var maxHeight = 12; // intial value to render corretly first time
|
|
635
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
636
|
+
var outerHTMLElement = document.getElementById('WordBreakId');
|
|
637
|
+
var BoxCordinates = outerHTMLElement && outerHTMLElement.getBoundingClientRect();
|
|
638
|
+
var boxHeight = BoxCordinates && BoxCordinates.height;
|
|
639
|
+
if (boxHeight > maxHeight) {
|
|
640
|
+
maxHeight = boxHeight;
|
|
641
|
+
}
|
|
642
|
+
removeVal = (maxLines - 1) * maxHeight;
|
|
643
|
+
}
|
|
657
644
|
return removeVal > 0 ? removeVal : 0;
|
|
658
645
|
}
|
|
659
646
|
exports.createWrapOfXLabels = createWrapOfXLabels;
|