@fluentui/react-charting 5.24.22 → 5.24.24
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 +37 -1
- package/CHANGELOG.md +21 -2
- package/dist/react-charting.d.ts +6 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +3 -2
- package/lib/components/CommonComponents/CartesianChart.base.js +1 -0
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +2 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +2 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.d.ts +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.styles.js +1 -8
- package/lib/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.types.d.ts +2 -2
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.js +66 -13
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.d.ts +4 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/utilities/utilities.d.ts +10 -10
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +1 -0
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +2 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +4 -3
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/FunnelChart/funnelGeometry.js +5 -6
- package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.d.ts +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js +1 -8
- package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +2 -2
- package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib-amd/components/ResponsiveContainer/withResponsiveContainer.js +1 -2
- package/lib-amd/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.base.js +4 -4
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +64 -11
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +4 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-amd/utilities/image-export-utils.js +2 -3
- package/lib-amd/utilities/image-export-utils.js.map +1 -1
- package/lib-amd/utilities/scatterpolar-utils.js +2 -3
- package/lib-amd/utilities/scatterpolar-utils.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +10 -10
- package/lib-amd/utilities/utilities.js +39 -39
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +2 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +4 -3
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js +5 -6
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.d.ts +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.styles.js +1 -8
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.d.ts +2 -2
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +1 -2
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +4 -4
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +64 -11
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +4 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +2 -3
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/scatterpolar-utils.js +2 -3
- package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +10 -10
- package/lib-commonjs/utilities/utilities.js +39 -40
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
- package/src/components/HeatMapChart/HeatMapChart.types.ts +2 -2
- package/src/components/ScatterChart/ScatterChart.types.ts +5 -0
|
@@ -2,7 +2,45 @@ 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.getRangeForScatterMarkerSize = exports.getScatterXDomainExtent = exports.isPlottable = exports.isValidDomainValue = exports.getDomainPaddingForMarkers = exports.
|
|
5
|
+
exports.getRangeForScatterMarkerSize = exports.getScatterXDomainExtent = exports.isPlottable = exports.isValidDomainValue = exports.getDomainPaddingForMarkers = exports.getInvertedTextColor = exports.sortAxisCategories = exports.truncateString = exports.createMeasurementSpan = exports.isScalePaddingDefined = exports.getScalePadding = exports.getBarWidth = exports.getAccessibleDataObject = exports.pointTypes = exports.CustomPoints = exports.Points = exports.getTypeOfAxis = exports.calculateLongestLabelWidth = exports.wrapContent = exports.DEFAULT_WRAP_WIDTH = exports.createStringYAxis = exports.createStringYAxisForHorizontalBarChartWithAxis = exports.YAxisType = exports.XAxisTypes = exports.ChartTypes = exports.MIN_DONUT_RADIUS = exports.MIN_DOMAIN_MARGIN = void 0;
|
|
6
|
+
exports.defaultYAxisTickFormatter = defaultYAxisTickFormatter;
|
|
7
|
+
exports.createNumericXAxis = createNumericXAxis;
|
|
8
|
+
exports.getDateFormatLevel = getDateFormatLevel;
|
|
9
|
+
exports.createDateXAxis = createDateXAxis;
|
|
10
|
+
exports.createStringXAxis = createStringXAxis;
|
|
11
|
+
exports.prepareDatapoints = prepareDatapoints;
|
|
12
|
+
exports.createYAxisForHorizontalBarChartWithAxis = createYAxisForHorizontalBarChartWithAxis;
|
|
13
|
+
exports.createNumericYAxis = createNumericYAxis;
|
|
14
|
+
exports.calloutData = calloutData;
|
|
15
|
+
exports.getUnique = getUnique;
|
|
16
|
+
exports.silceOrAppendToArray = silceOrAppendToArray;
|
|
17
|
+
exports.createWrapOfXLabels = createWrapOfXLabels;
|
|
18
|
+
exports.createYAxisLabels = createYAxisLabels;
|
|
19
|
+
exports.tooltipOfAxislabels = tooltipOfAxislabels;
|
|
20
|
+
exports.getXAxisType = getXAxisType;
|
|
21
|
+
exports.domainRangeOfNumericForAreaLineScatterCharts = domainRangeOfNumericForAreaLineScatterCharts;
|
|
22
|
+
exports.groupChartDataByYValue = groupChartDataByYValue;
|
|
23
|
+
exports.computeLongestBars = computeLongestBars;
|
|
24
|
+
exports.domainRangeOfNumericForHorizontalBarChartWithAxis = domainRangeOfNumericForHorizontalBarChartWithAxis;
|
|
25
|
+
exports.domainRangeOfXStringAxis = domainRangeOfXStringAxis;
|
|
26
|
+
exports.domainRangeOfVSBCNumeric = domainRangeOfVSBCNumeric;
|
|
27
|
+
exports.domainRangeOfDateForAreaLineScatterVerticalBarCharts = domainRangeOfDateForAreaLineScatterVerticalBarCharts;
|
|
28
|
+
exports.domainRageOfVerticalNumeric = domainRageOfVerticalNumeric;
|
|
29
|
+
exports.findNumericMinMaxOfY = findNumericMinMaxOfY;
|
|
30
|
+
exports.findVSBCNumericMinMaxOfY = findVSBCNumericMinMaxOfY;
|
|
31
|
+
exports.findVerticalNumericMinMaxOfY = findVerticalNumericMinMaxOfY;
|
|
32
|
+
exports.findHBCWANumericMinMaxOfY = findHBCWANumericMinMaxOfY;
|
|
33
|
+
exports.rotateXAxisLabels = rotateXAxisLabels;
|
|
34
|
+
exports.wrapTextInsideDonut = wrapTextInsideDonut;
|
|
35
|
+
exports.formatScientificLimitWidth = formatScientificLimitWidth;
|
|
36
|
+
exports.getSecureProps = getSecureProps;
|
|
37
|
+
exports.areArraysEqual = areArraysEqual;
|
|
38
|
+
exports.resolveCSSVariables = resolveCSSVariables;
|
|
39
|
+
exports.copyStyle = copyStyle;
|
|
40
|
+
exports.getCurveFactory = getCurveFactory;
|
|
41
|
+
exports.getContrastTextColor = getContrastTextColor;
|
|
42
|
+
exports.isScatterPolarSeries = isScatterPolarSeries;
|
|
43
|
+
exports.isTextMode = isTextMode;
|
|
6
44
|
exports.MIN_DOMAIN_MARGIN = 8;
|
|
7
45
|
exports.MIN_DONUT_RADIUS = 1;
|
|
8
46
|
var ChartTypes;
|
|
@@ -56,7 +94,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
56
94
|
function defaultYAxisTickFormatter(value) {
|
|
57
95
|
return yAxisTickFormatterInternal(value);
|
|
58
96
|
}
|
|
59
|
-
exports.defaultYAxisTickFormatter = defaultYAxisTickFormatter;
|
|
60
97
|
/**
|
|
61
98
|
* Create Numeric X axis
|
|
62
99
|
* @export
|
|
@@ -99,7 +136,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
99
136
|
var tickValues = ((_a = tickParams.tickValues) !== null && _a !== void 0 ? _a : xAxisScale.ticks(tickCount)).map(xAxis.tickFormat());
|
|
100
137
|
return { xScale: xAxisScale, tickValues: tickValues };
|
|
101
138
|
}
|
|
102
|
-
exports.createNumericXAxis = createNumericXAxis;
|
|
103
139
|
/**
|
|
104
140
|
* This function returns a multilevel formatter for a given date range.
|
|
105
141
|
* It determines the appropriate date format to accommodate each tick value.
|
|
@@ -192,7 +228,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
192
228
|
});
|
|
193
229
|
return (_a = matchedFormat === null || matchedFormat === void 0 ? void 0 : matchedFormat.formatLevel) !== null && _a !== void 0 ? _a : 7;
|
|
194
230
|
}
|
|
195
|
-
exports.getDateFormatLevel = getDateFormatLevel;
|
|
196
231
|
function isPowerOf10(num) {
|
|
197
232
|
var roundedfinalYMax = (0, chart_utilities_1.handleFloatingPointPrecisionError)(num);
|
|
198
233
|
return Math.log10(roundedfinalYMax) % 1 === 0;
|
|
@@ -262,7 +297,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
262
297
|
var tickValues = ((_a = tickParams.tickValues) !== null && _a !== void 0 ? _a : xAxisScale.ticks(tickCount)).map(xAxis.tickFormat());
|
|
263
298
|
return { xScale: xAxisScale, tickValues: tickValues };
|
|
264
299
|
}
|
|
265
|
-
exports.createDateXAxis = createDateXAxis;
|
|
266
300
|
/**
|
|
267
301
|
* Create String X axis
|
|
268
302
|
* Currently using for only Vetical stacked bar chart and grouped vertical bar chart
|
|
@@ -315,7 +349,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
315
349
|
}
|
|
316
350
|
return { xScale: xAxisScale, tickValues: tickValues };
|
|
317
351
|
}
|
|
318
|
-
exports.createStringXAxis = createStringXAxis;
|
|
319
352
|
/**
|
|
320
353
|
* This method is used to calculate the rounded tick values for the y-axis
|
|
321
354
|
* @param {number} minVal
|
|
@@ -377,7 +410,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
377
410
|
}
|
|
378
411
|
return dataPointsArray;
|
|
379
412
|
}
|
|
380
|
-
exports.prepareDatapoints = prepareDatapoints;
|
|
381
413
|
function createYAxisForHorizontalBarChartWithAxis(yAxisParams, isRtl) {
|
|
382
414
|
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, 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;
|
|
383
415
|
// maxOfYVal coming from horizontal bar chart with axis (Calculation done at base file)
|
|
@@ -393,7 +425,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
393
425
|
yAxisElement ? (0, d3_selection_1.select)(yAxisElement).call(yAxis).selectAll('text').attr('aria-hidden', 'true') : '';
|
|
394
426
|
return yAxisScale;
|
|
395
427
|
}
|
|
396
|
-
exports.createYAxisForHorizontalBarChartWithAxis = createYAxisForHorizontalBarChartWithAxis;
|
|
397
428
|
function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDataset, useSecondaryYScale, supportNegativeData, roundedTicks, scaleType) {
|
|
398
429
|
if (useSecondaryYScale === void 0) { useSecondaryYScale = false; }
|
|
399
430
|
if (supportNegativeData === void 0) { supportNegativeData = false; }
|
|
@@ -439,7 +470,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
439
470
|
axisData.yAxisDomainValues = domainValues;
|
|
440
471
|
return yAxisScale;
|
|
441
472
|
}
|
|
442
|
-
exports.createNumericYAxis = createNumericYAxis;
|
|
443
473
|
/**
|
|
444
474
|
* Creating String Y axis of the chart for Horizontal Bar Chart With Axis
|
|
445
475
|
* @param yAxisParams
|
|
@@ -542,7 +572,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
542
572
|
});
|
|
543
573
|
return result;
|
|
544
574
|
}
|
|
545
|
-
exports.calloutData = calloutData;
|
|
546
575
|
function getUnique(arr, comp) {
|
|
547
576
|
var unique = arr
|
|
548
577
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -554,7 +583,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
554
583
|
.map(function (e) { return arr[e]; });
|
|
555
584
|
return unique;
|
|
556
585
|
}
|
|
557
|
-
exports.getUnique = getUnique;
|
|
558
586
|
/**
|
|
559
587
|
* This function takes two paramerter
|
|
560
588
|
* 1. an array of strings
|
|
@@ -576,7 +604,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
576
604
|
return array.slice(0, pos).concat(array.slice(pos + 1));
|
|
577
605
|
}
|
|
578
606
|
}
|
|
579
|
-
exports.silceOrAppendToArray = silceOrAppendToArray;
|
|
580
607
|
exports.DEFAULT_WRAP_WIDTH = 10;
|
|
581
608
|
/**
|
|
582
609
|
* This method used for wrapping of x axis labels (tick values).
|
|
@@ -666,7 +693,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
666
693
|
}
|
|
667
694
|
return removeVal > 0 ? removeVal : 0;
|
|
668
695
|
}
|
|
669
|
-
exports.createWrapOfXLabels = createWrapOfXLabels;
|
|
670
696
|
/**
|
|
671
697
|
* This method used for wrapping of y axis labels (tick values).
|
|
672
698
|
*/
|
|
@@ -719,7 +745,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
719
745
|
}
|
|
720
746
|
});
|
|
721
747
|
}
|
|
722
|
-
exports.createYAxisLabels = createYAxisLabels;
|
|
723
748
|
var wrapContent = function (content, id, maxWidth) {
|
|
724
749
|
var textElement = (0, d3_selection_1.select)("#".concat(id));
|
|
725
750
|
textElement.text(content);
|
|
@@ -804,7 +829,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
804
829
|
_loop_1(i);
|
|
805
830
|
}
|
|
806
831
|
}
|
|
807
|
-
exports.tooltipOfAxislabels = tooltipOfAxislabels;
|
|
808
832
|
/**
|
|
809
833
|
* Find the axis type of line chart and area chart from given data
|
|
810
834
|
* @param points
|
|
@@ -821,7 +845,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
821
845
|
}
|
|
822
846
|
return isXAxisDateType;
|
|
823
847
|
}
|
|
824
|
-
exports.getXAxisType = getXAxisType;
|
|
825
848
|
/**
|
|
826
849
|
* Calculates Domain and range values for Numeric X axis.
|
|
827
850
|
* This method calculates Area cart and line chart.
|
|
@@ -846,7 +869,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
846
869
|
? { dStartValue: isScatterPolar ? 1 : xMax, dEndValue: isScatterPolar ? -1 : xMin, rStartValue: rStartValue, rEndValue: rEndValue }
|
|
847
870
|
: { dStartValue: isScatterPolar ? -1 : xMin, dEndValue: isScatterPolar ? 1 : xMax, rStartValue: rStartValue, rEndValue: rEndValue };
|
|
848
871
|
}
|
|
849
|
-
exports.domainRangeOfNumericForAreaLineScatterCharts = domainRangeOfNumericForAreaLineScatterCharts;
|
|
850
872
|
/**
|
|
851
873
|
* Groups HorizontalBarChart With Axis data based on YValue
|
|
852
874
|
* Used for stacked case
|
|
@@ -864,7 +886,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
864
886
|
});
|
|
865
887
|
return Object.values(map);
|
|
866
888
|
}
|
|
867
|
-
exports.groupChartDataByYValue = groupChartDataByYValue;
|
|
868
889
|
/**
|
|
869
890
|
* Calculates maximum domain values for Numeric x axis for both positive and negative values
|
|
870
891
|
* works for Horizontal Bar Chart With axis
|
|
@@ -882,7 +903,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
882
903
|
});
|
|
883
904
|
return { longestPositiveBar: longestPositiveBar, longestNegativeBar: longestNegativeBar };
|
|
884
905
|
}
|
|
885
|
-
exports.computeLongestBars = computeLongestBars;
|
|
886
906
|
/**
|
|
887
907
|
* Calculates Domain and range values for Numeric X axis.
|
|
888
908
|
* This method calculates Horizontal Chart with Axis
|
|
@@ -903,7 +923,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
903
923
|
? { dStartValue: xMax, dEndValue: Math.min(xMin, X_ORIGIN), rStartValue: rMin, rEndValue: rMax }
|
|
904
924
|
: { dStartValue: Math.min(xMin, X_ORIGIN), dEndValue: xMax, rStartValue: rMin, rEndValue: rMax };
|
|
905
925
|
}
|
|
906
|
-
exports.domainRangeOfNumericForHorizontalBarChartWithAxis = domainRangeOfNumericForHorizontalBarChartWithAxis;
|
|
907
926
|
/**
|
|
908
927
|
* Calculates Range values of x Axis string axis
|
|
909
928
|
* For String axis, we need to give domain values (Not start and end array values)
|
|
@@ -922,7 +941,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
922
941
|
? { dStartValue: 0, dEndValue: 0, rStartValue: rMax, rEndValue: rMin }
|
|
923
942
|
: { dStartValue: 0, dEndValue: 0, rStartValue: rMin, rEndValue: rMax };
|
|
924
943
|
}
|
|
925
|
-
exports.domainRangeOfXStringAxis = domainRangeOfXStringAxis;
|
|
926
944
|
/**
|
|
927
945
|
* Calculate domain and range values to the Vertical stacked bar chart - For Numeric axis
|
|
928
946
|
* @export
|
|
@@ -942,7 +960,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
942
960
|
? { dStartValue: xMax, dEndValue: xMin, rStartValue: rMax, rEndValue: rMin }
|
|
943
961
|
: { dStartValue: xMin, dEndValue: xMax, rStartValue: rMax, rEndValue: rMin };
|
|
944
962
|
}
|
|
945
|
-
exports.domainRangeOfVSBCNumeric = domainRangeOfVSBCNumeric;
|
|
946
963
|
/**
|
|
947
964
|
* Calculates Domain and range values for Date X axis.
|
|
948
965
|
* This method calculates Bar chart.
|
|
@@ -985,7 +1002,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
985
1002
|
? { dStartValue: lDate, dEndValue: sDate, rStartValue: rStartValue, rEndValue: rEndValue }
|
|
986
1003
|
: { dStartValue: sDate, dEndValue: lDate, rStartValue: rStartValue, rEndValue: rEndValue };
|
|
987
1004
|
}
|
|
988
|
-
exports.domainRangeOfDateForAreaLineScatterVerticalBarCharts = domainRangeOfDateForAreaLineScatterVerticalBarCharts;
|
|
989
1005
|
/**
|
|
990
1006
|
* Calculate domain and range values to the Vertical bar chart - For Numeric axis
|
|
991
1007
|
* @export
|
|
@@ -1005,7 +1021,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1005
1021
|
? { dStartValue: xMax, dEndValue: xMin, rStartValue: rMin, rEndValue: rMax }
|
|
1006
1022
|
: { dStartValue: xMin, dEndValue: xMax, rStartValue: rMin, rEndValue: rMax };
|
|
1007
1023
|
}
|
|
1008
|
-
exports.domainRageOfVerticalNumeric = domainRageOfVerticalNumeric;
|
|
1009
1024
|
/**
|
|
1010
1025
|
* Calculating start and ending values of the Area chart and LineChart
|
|
1011
1026
|
* @export
|
|
@@ -1028,7 +1043,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1028
1043
|
endValue: (0, d3_array_1.max)(values),
|
|
1029
1044
|
};
|
|
1030
1045
|
}
|
|
1031
|
-
exports.findNumericMinMaxOfY = findNumericMinMaxOfY;
|
|
1032
1046
|
/**
|
|
1033
1047
|
* Find the minimum and maximum values of the vertical stacked bar chart y axis data point. Used for create y axis.
|
|
1034
1048
|
* @export
|
|
@@ -1040,7 +1054,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1040
1054
|
var yMin = (0, d3_array_1.min)(dataset, function (point) { return point.y; });
|
|
1041
1055
|
return { startValue: yMin, endValue: yMax };
|
|
1042
1056
|
}
|
|
1043
|
-
exports.findVSBCNumericMinMaxOfY = findVSBCNumericMinMaxOfY;
|
|
1044
1057
|
/**
|
|
1045
1058
|
* Fins the min and max values of the vertical bar chart y axis data point.
|
|
1046
1059
|
* @export
|
|
@@ -1061,7 +1074,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1061
1074
|
});
|
|
1062
1075
|
return { startValue: (0, d3_array_1.min)(values), endValue: (0, d3_array_1.max)(values) };
|
|
1063
1076
|
}
|
|
1064
|
-
exports.findVerticalNumericMinMaxOfY = findVerticalNumericMinMaxOfY;
|
|
1065
1077
|
/**
|
|
1066
1078
|
* Fins the min and max values of the horizontal bar chart y axis data point.
|
|
1067
1079
|
* @export
|
|
@@ -1076,7 +1088,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1076
1088
|
}
|
|
1077
1089
|
return { startValue: 0, endValue: 0 };
|
|
1078
1090
|
}
|
|
1079
|
-
exports.findHBCWANumericMinMaxOfY = findHBCWANumericMinMaxOfY;
|
|
1080
1091
|
/**
|
|
1081
1092
|
* @param p string or number or Date
|
|
1082
1093
|
*
|
|
@@ -1213,7 +1224,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1213
1224
|
});
|
|
1214
1225
|
return Math.floor(maxHeight / 1.414); // Compute maxHeight/tanInverse(45) to get the vertical height of labels.
|
|
1215
1226
|
}
|
|
1216
|
-
exports.rotateXAxisLabels = rotateXAxisLabels;
|
|
1217
1227
|
function wrapTextInsideDonut(selectorClass, maxWidth) {
|
|
1218
1228
|
var idx = 0;
|
|
1219
1229
|
(0, d3_selection_1.selectAll)(".".concat(selectorClass)).each(function () {
|
|
@@ -1250,11 +1260,9 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1250
1260
|
idx += 1;
|
|
1251
1261
|
});
|
|
1252
1262
|
}
|
|
1253
|
-
exports.wrapTextInsideDonut = wrapTextInsideDonut;
|
|
1254
1263
|
function formatScientificLimitWidth(value) {
|
|
1255
1264
|
return yAxisTickFormatterInternal(value, true);
|
|
1256
1265
|
}
|
|
1257
|
-
exports.formatScientificLimitWidth = formatScientificLimitWidth;
|
|
1258
1266
|
var DEFAULT_BAR_WIDTH = 16;
|
|
1259
1267
|
var MIN_BAR_WIDTH = 1;
|
|
1260
1268
|
var getBarWidth = function (barWidthProp, maxBarWidthProp, adjustedValue, modeProp) {
|
|
@@ -1293,7 +1301,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1293
1301
|
var dangerouslySetInnerHTML = props.dangerouslySetInnerHTML, result = tslib_1.__rest(props, ["dangerouslySetInnerHTML"]);
|
|
1294
1302
|
return result;
|
|
1295
1303
|
}
|
|
1296
|
-
exports.getSecureProps = getSecureProps;
|
|
1297
1304
|
function areArraysEqual(arr1, arr2) {
|
|
1298
1305
|
if (arr1 === arr2) {
|
|
1299
1306
|
return true;
|
|
@@ -1311,7 +1318,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1311
1318
|
}
|
|
1312
1319
|
return true;
|
|
1313
1320
|
}
|
|
1314
|
-
exports.areArraysEqual = areArraysEqual;
|
|
1315
1321
|
var cssVarRegExp = /var\((--[a-zA-Z0-9\-]+)\)/g;
|
|
1316
1322
|
function resolveCSSVariables(chartContainer, styleRules) {
|
|
1317
1323
|
var containerStyles = getComputedStyle(chartContainer);
|
|
@@ -1319,7 +1325,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1319
1325
|
return containerStyles.getPropertyValue(group1);
|
|
1320
1326
|
});
|
|
1321
1327
|
}
|
|
1322
|
-
exports.resolveCSSVariables = resolveCSSVariables;
|
|
1323
1328
|
function copyStyle(properties, fromEl, toEl) {
|
|
1324
1329
|
var styles = getComputedStyle(fromEl);
|
|
1325
1330
|
if (Array.isArray(properties)) {
|
|
@@ -1334,7 +1339,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1334
1339
|
});
|
|
1335
1340
|
}
|
|
1336
1341
|
}
|
|
1337
|
-
exports.copyStyle = copyStyle;
|
|
1338
1342
|
var MEASUREMENT_SPAN_STYLE = {
|
|
1339
1343
|
position: 'absolute',
|
|
1340
1344
|
visibility: 'hidden',
|
|
@@ -1385,7 +1389,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1385
1389
|
return defaultFactory;
|
|
1386
1390
|
}
|
|
1387
1391
|
}
|
|
1388
|
-
exports.getCurveFactory = getCurveFactory;
|
|
1389
1392
|
var truncateString = function (str, maxLength, ellipsis) {
|
|
1390
1393
|
if (ellipsis === void 0) { ellipsis = '...'; }
|
|
1391
1394
|
if (str.length <= maxLength) {
|
|
@@ -1466,7 +1469,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1466
1469
|
}
|
|
1467
1470
|
return textColor;
|
|
1468
1471
|
}
|
|
1469
|
-
exports.getContrastTextColor = getContrastTextColor;
|
|
1470
1472
|
/**
|
|
1471
1473
|
* Utility function to check if an array of points is scatterpolar
|
|
1472
1474
|
* @param points - Array of chart points
|
|
@@ -1477,7 +1479,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1477
1479
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1478
1480
|
function (item) { var _a; return typeof ((_a = item.lineOptions) === null || _a === void 0 ? void 0 : _a.mode) === 'string' && item.lineOptions.mode === 'scatterpolar'; });
|
|
1479
1481
|
}
|
|
1480
|
-
exports.isScatterPolarSeries = isScatterPolarSeries;
|
|
1481
1482
|
/**
|
|
1482
1483
|
* Utility function to check if an array of points contains mode as 'text' only
|
|
1483
1484
|
* @param points - Array of chart points
|
|
@@ -1488,7 +1489,6 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1488
1489
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1489
1490
|
function (item) { var _a; return typeof ((_a = item.lineOptions) === null || _a === void 0 ? void 0 : _a.mode) === 'string' && item.lineOptions.mode === 'text'; });
|
|
1490
1491
|
}
|
|
1491
|
-
exports.isTextMode = isTextMode;
|
|
1492
1492
|
// TODO: Refactor to encapsulate the complete numeric scale creation logic here, including setting domain and range.
|
|
1493
1493
|
var createNumericScale = function (scaleType) {
|
|
1494
1494
|
if (scaleType === 'log') {
|