@fluentui/react-charting 5.24.2 → 5.24.3
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 +34 -1
- package/CHANGELOG.md +14 -2
- package/dist/react-charting.d.ts +170 -37
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +58 -11
- package/lib/ScatterChart.d.ts +1 -0
- package/lib/ScatterChart.js +2 -0
- package/lib/ScatterChart.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.base.js +45 -9
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +21 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +252 -62
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.base.js +453 -0
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.js +10 -0
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js +7 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.types.d.ts +42 -0
- package/lib/components/ScatterChart/ScatterChart.types.js +2 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib/components/ScatterChart/index.d.ts +2 -0
- package/lib/components/ScatterChart/index.js +3 -0
- package/lib/components/ScatterChart/index.js.map +1 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +73 -11
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/SVGTooltipText.d.ts +4 -0
- package/lib/utilities/SVGTooltipText.js +1 -2
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/utilities.d.ts +27 -3
- package/lib/utilities/utilities.js +102 -1
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/ScatterChart.d.ts +1 -0
- package/lib-amd/ScatterChart.js +6 -0
- package/lib-amd/ScatterChart.js.map +1 -0
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +45 -9
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +21 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +155 -78
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +264 -71
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +447 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js +12 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js +12 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +42 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js +5 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-amd/components/ScatterChart/index.d.ts +2 -0
- package/lib-amd/components/ScatterChart/index.js +7 -0
- package/lib-amd/components/ScatterChart/index.js.map +1 -0
- package/lib-amd/index.d.ts +3 -1
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +73 -11
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-amd/utilities/SVGTooltipText.js +1 -2
- package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +27 -3
- package/lib-amd/utilities/utilities.js +106 -2
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/ScatterChart.d.ts +1 -0
- package/lib-commonjs/ScatterChart.js +5 -0
- package/lib-commonjs/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +45 -9
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +21 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +263 -71
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +456 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +13 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js +11 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +42 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +3 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/index.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/index.js +6 -0
- package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
- package/lib-commonjs/index.d.ts +3 -1
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +73 -11
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-commonjs/utilities/SVGTooltipText.js +1 -2
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +27 -3
- package/lib-commonjs/utilities/utilities.js +106 -2
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CommonComponents/CartesianChart.types.ts +25 -1
- package/src/components/ScatterChart/ScatterChart.types.ts +61 -0
|
@@ -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.truncateString = 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.truncateString = exports.createYAxisForScatterChart = 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;
|
|
6
6
|
exports.MIN_DOMAIN_MARGIN = 8;
|
|
7
7
|
exports.MIN_DONUT_RADIUS = 1;
|
|
8
8
|
var ChartTypes;
|
|
@@ -14,6 +14,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
14
14
|
ChartTypes[ChartTypes["GroupedVerticalBarChart"] = 4] = "GroupedVerticalBarChart";
|
|
15
15
|
ChartTypes[ChartTypes["HeatMapChart"] = 5] = "HeatMapChart";
|
|
16
16
|
ChartTypes[ChartTypes["HorizontalBarChartWithAxis"] = 6] = "HorizontalBarChartWithAxis";
|
|
17
|
+
ChartTypes[ChartTypes["ScatterChart"] = 7] = "ScatterChart";
|
|
17
18
|
})(ChartTypes || (exports.ChartTypes = ChartTypes = {}));
|
|
18
19
|
var XAxisTypes;
|
|
19
20
|
(function (XAxisTypes) {
|
|
@@ -471,6 +472,8 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
471
472
|
* This methos creates an object for those 2 charts.
|
|
472
473
|
* @param values
|
|
473
474
|
*/
|
|
475
|
+
// changing the type to any as it is used by multiple charts with different data types
|
|
476
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
474
477
|
function calloutData(values) {
|
|
475
478
|
var combinedResult = [];
|
|
476
479
|
values.forEach(function (line) {
|
|
@@ -482,6 +485,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
482
485
|
combinedResult = combinedResult.concat(elements);
|
|
483
486
|
});
|
|
484
487
|
var xValToDataPoints = {};
|
|
488
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
485
489
|
combinedResult.forEach(function (ele) {
|
|
486
490
|
var xValue = ele.x instanceof Date ? ele.x.getTime() : ele.x;
|
|
487
491
|
if (xValue in xValToDataPoints) {
|
|
@@ -510,7 +514,8 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
510
514
|
}
|
|
511
515
|
});
|
|
512
516
|
var result = Object.keys(xValToDataPoints).map(function (xValue) {
|
|
513
|
-
|
|
517
|
+
var originalXValue = isNaN(Number(xValue)) ? xValue : Number(xValue);
|
|
518
|
+
return { x: originalXValue, values: xValToDataPoints[xValue] };
|
|
514
519
|
});
|
|
515
520
|
return result;
|
|
516
521
|
}
|
|
@@ -1375,6 +1380,105 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1375
1380
|
}
|
|
1376
1381
|
}
|
|
1377
1382
|
exports.getCurveFactory = getCurveFactory;
|
|
1383
|
+
/**
|
|
1384
|
+
* Calculates Domain and range values for Date X axis for scatter chart.
|
|
1385
|
+
* @export
|
|
1386
|
+
* @param {LineChartPoints[]} points
|
|
1387
|
+
* @param {IMargins} margins
|
|
1388
|
+
* @param {number} width
|
|
1389
|
+
* @param {boolean} isRTL
|
|
1390
|
+
* @param {Date[] | number[]} tickValues
|
|
1391
|
+
* @returns {IDomainNRange}
|
|
1392
|
+
*/
|
|
1393
|
+
function domainRangeOfDateForScatterChart(points, margins, width, isRTL, tickValues) {
|
|
1394
|
+
if (tickValues === void 0) { tickValues = []; }
|
|
1395
|
+
var sDate;
|
|
1396
|
+
var lDate;
|
|
1397
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1398
|
+
sDate = (0, d3_array_1.min)(points, function (point) {
|
|
1399
|
+
return (0, d3_array_1.min)(point.data, function (item) {
|
|
1400
|
+
return item.x;
|
|
1401
|
+
});
|
|
1402
|
+
});
|
|
1403
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1404
|
+
lDate = (0, d3_array_1.max)(points, function (point) {
|
|
1405
|
+
return (0, d3_array_1.max)(point.data, function (item) {
|
|
1406
|
+
return item.x;
|
|
1407
|
+
});
|
|
1408
|
+
});
|
|
1409
|
+
var xPadding = (lDate.getTime() - sDate.getTime()) * 0.1;
|
|
1410
|
+
sDate = new Date(sDate.getTime() - xPadding);
|
|
1411
|
+
lDate = new Date(lDate.getTime() + xPadding);
|
|
1412
|
+
// Need to draw graph with given small and large date
|
|
1413
|
+
// (Which Involves customization of date axis tick values)
|
|
1414
|
+
// That may be Either from given graph data or from prop 'tickValues' date values.
|
|
1415
|
+
// So, Finding smallest and largest dates
|
|
1416
|
+
sDate = (0, d3_array_1.min)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [sDate], false));
|
|
1417
|
+
lDate = (0, d3_array_1.max)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [lDate], false));
|
|
1418
|
+
var rStartValue = margins.left;
|
|
1419
|
+
var rEndValue = width - margins.right;
|
|
1420
|
+
return isRTL
|
|
1421
|
+
? { dStartValue: lDate, dEndValue: sDate, rStartValue: rStartValue, rEndValue: rEndValue }
|
|
1422
|
+
: { dStartValue: sDate, dEndValue: lDate, rStartValue: rStartValue, rEndValue: rEndValue };
|
|
1423
|
+
}
|
|
1424
|
+
exports.domainRangeOfDateForScatterChart = domainRangeOfDateForScatterChart;
|
|
1425
|
+
/**
|
|
1426
|
+
* Calculates Domain and range values for Numeric X axis for scatter chart.
|
|
1427
|
+
* @export
|
|
1428
|
+
* @param {LineChartPoints[]} points
|
|
1429
|
+
* @param {IMargins} margins
|
|
1430
|
+
* @param {number} width
|
|
1431
|
+
* @param {boolean} isRTL
|
|
1432
|
+
* @returns {IDomainNRange}
|
|
1433
|
+
*/
|
|
1434
|
+
function domainRangeOfNumericForScatterChart(points, margins, width, isRTL) {
|
|
1435
|
+
var xMin = (0, d3_array_1.min)(points, function (point) {
|
|
1436
|
+
return (0, d3_array_1.min)(point.data, function (item) { return item.x; });
|
|
1437
|
+
});
|
|
1438
|
+
var xMax = (0, d3_array_1.max)(points, function (point) {
|
|
1439
|
+
return (0, d3_array_1.max)(point.data, function (item) {
|
|
1440
|
+
return item.x;
|
|
1441
|
+
});
|
|
1442
|
+
});
|
|
1443
|
+
var xPadding = (xMax - xMin) * 0.1;
|
|
1444
|
+
xMin = xMin - xPadding;
|
|
1445
|
+
xMax = xMax + xPadding;
|
|
1446
|
+
var rStartValue = margins.left;
|
|
1447
|
+
var rEndValue = width - margins.right;
|
|
1448
|
+
return isRTL
|
|
1449
|
+
? { dStartValue: xMax, dEndValue: xMin, rStartValue: rStartValue, rEndValue: rEndValue }
|
|
1450
|
+
: { dStartValue: xMin, dEndValue: xMax, rStartValue: rStartValue, rEndValue: rEndValue };
|
|
1451
|
+
}
|
|
1452
|
+
exports.domainRangeOfNumericForScatterChart = domainRangeOfNumericForScatterChart;
|
|
1453
|
+
function createYAxisForScatterChart(yAxisParams, isRtl, axisData, isIntegralDataset, useSecondaryYScale, _supportNegativeData, roundedTicks) {
|
|
1454
|
+
if (useSecondaryYScale === void 0) { useSecondaryYScale = false; }
|
|
1455
|
+
if (_supportNegativeData === void 0) { _supportNegativeData = false; }
|
|
1456
|
+
if (roundedTicks === void 0) { roundedTicks = false; }
|
|
1457
|
+
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;
|
|
1458
|
+
// maxOfYVal coming from only area chart and Grouped vertical bar chart(Calculation done at base file)
|
|
1459
|
+
var tempVal = maxOfYVal || yMinMaxValues.endValue;
|
|
1460
|
+
var finalYmax = tempVal > yMaxValue ? tempVal : yMaxValue;
|
|
1461
|
+
var finalYmin = Math.min(yMinMaxValues.startValue, yMinValue || 0);
|
|
1462
|
+
var domainValues = prepareDatapoints(finalYmax, finalYmin, yAxisTickCount, isIntegralDataset, roundedTicks);
|
|
1463
|
+
var yMin = finalYmin;
|
|
1464
|
+
var yMax = domainValues[domainValues.length - 1];
|
|
1465
|
+
var yPadding = (yMax - yMin) * 0.1;
|
|
1466
|
+
yMin = yMin - yPadding;
|
|
1467
|
+
yMax = yMax + yPadding;
|
|
1468
|
+
var yAxisScale = (0, d3_scale_1.scaleLinear)()
|
|
1469
|
+
.domain([domainValues[0], yMax])
|
|
1470
|
+
.range([containerHeight - margins.bottom, margins.top + (eventAnnotationProps ? eventLabelHeight : 0)]);
|
|
1471
|
+
var axis = (!isRtl && useSecondaryYScale) || (isRtl && !useSecondaryYScale) ? (0, d3_axis_1.axisRight)(yAxisScale) : (0, d3_axis_1.axisLeft)(yAxisScale);
|
|
1472
|
+
var yAxis = axis
|
|
1473
|
+
.tickPadding(tickPadding)
|
|
1474
|
+
.tickValues(domainValues)
|
|
1475
|
+
.tickSizeInner(-(containerWidth - margins.left - margins.right));
|
|
1476
|
+
yAxisTickFormat ? yAxis.tickFormat(yAxisTickFormat) : yAxis.tickFormat((0, d3_format_1.format)('.2~s'));
|
|
1477
|
+
yAxisElement ? (0, d3_selection_1.select)(yAxisElement).call(yAxis).selectAll('text').attr('aria-hidden', 'true') : '';
|
|
1478
|
+
axisData.yAxisDomainValues = domainValues;
|
|
1479
|
+
return yAxisScale;
|
|
1480
|
+
}
|
|
1481
|
+
exports.createYAxisForScatterChart = createYAxisForScatterChart;
|
|
1378
1482
|
var truncateString = function (str, maxLength, ellipsis) {
|
|
1379
1483
|
if (ellipsis === void 0) { ellipsis = '...'; }
|
|
1380
1484
|
if (str.length <= maxLength) {
|