@fluentui/react-charts 0.0.0-nightly-20250815-0407.1 → 0.0.0-nightly-20250819-0407.1
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.md +15 -15
- package/dist/index.d.ts +56 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js +16 -8
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +69 -48
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +30 -9
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +8 -2
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js +12 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +7 -7
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/utilities.js +33 -1
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +16 -8
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +69 -48
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +30 -9
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +10 -2
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +12 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +7 -7
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +33 -0
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +13 -13
|
@@ -442,7 +442,8 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
442
442
|
const circleId = `${_circleId}_${i}`;
|
|
443
443
|
const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
|
|
444
444
|
const currentMarkerSize = _points[i].data[0].markerSize;
|
|
445
|
-
|
|
445
|
+
var _points_i_data__text;
|
|
446
|
+
pointsForLine.push(/*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("circle", {
|
|
446
447
|
id: circleId,
|
|
447
448
|
key: circleId,
|
|
448
449
|
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : activePoint === circleId ? 5.5 : 3.5,
|
|
@@ -457,7 +458,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
457
458
|
strokeWidth: activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0,
|
|
458
459
|
stroke: activePoint === circleId ? lineColor : '',
|
|
459
460
|
role: "img",
|
|
460
|
-
"aria-label": _getAriaLabel(i, 0),
|
|
461
|
+
"aria-label": (_points_i_data__text = _points[i].data[0].text) !== null && _points_i_data__text !== void 0 ? _points_i_data__text : _getAriaLabel(i, 0),
|
|
461
462
|
"data-is-focusable": isLegendSelected,
|
|
462
463
|
ref: (e)=>{
|
|
463
464
|
_refCallback(e, circleId);
|
|
@@ -465,7 +466,13 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
465
466
|
onFocus: (event)=>_handleFocus(event, circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
|
|
466
467
|
onBlur: _handleMouseOut,
|
|
467
468
|
..._getClickHandler(_points[i].data[0].onDataPointClick)
|
|
468
|
-
})
|
|
469
|
+
}), _points[i].data[0].text && /*#__PURE__*/ _react.createElement("text", {
|
|
470
|
+
key: `${circleId}-label`,
|
|
471
|
+
x: _xAxisScale(x1),
|
|
472
|
+
y: yScale(y1) + Math.max(currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 3.5, 4) + 12,
|
|
473
|
+
className: classes.markerLabel,
|
|
474
|
+
opacity: isLegendSelected ? 1 : 0.1
|
|
475
|
+
}, _points[i].data[0].text)));
|
|
469
476
|
}
|
|
470
477
|
let gapIndex = 0;
|
|
471
478
|
var _points_i_gaps_sort;
|
|
@@ -567,7 +574,8 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
567
574
|
const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
|
|
568
575
|
const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;
|
|
569
576
|
let currentMarkerSize = _points[i].data[j - 1].markerSize;
|
|
570
|
-
|
|
577
|
+
var _points_i_data__text1;
|
|
578
|
+
pointsForLine.push(((_points_i_lineOptions8 = _points[i].lineOptions) === null || _points_i_lineOptions8 === void 0 ? void 0 : (_points_i_lineOptions_mode = _points_i_lineOptions8.mode) === null || _points_i_lineOptions_mode === void 0 ? void 0 : _points_i_lineOptions_mode.includes('markers')) ? /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("circle", {
|
|
571
579
|
id: circleId,
|
|
572
580
|
key: circleId,
|
|
573
581
|
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4,
|
|
@@ -585,8 +593,14 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
585
593
|
stroke: lineColor,
|
|
586
594
|
strokeWidth: strokeWidth,
|
|
587
595
|
role: "img",
|
|
588
|
-
"aria-label": _getAriaLabel(i, j - 1)
|
|
589
|
-
})
|
|
596
|
+
"aria-label": (_points_i_data__text1 = _points[i].data[j - 1].text) !== null && _points_i_data__text1 !== void 0 ? _points_i_data__text1 : _getAriaLabel(i, j - 1)
|
|
597
|
+
}), _points[i].data[j - 1].text && /*#__PURE__*/ _react.createElement("text", {
|
|
598
|
+
key: `${circleId}-label`,
|
|
599
|
+
x: _xAxisScale(x1),
|
|
600
|
+
y: yScale(y1) + 12,
|
|
601
|
+
fontSize: 12,
|
|
602
|
+
className: classes.markerLabel
|
|
603
|
+
}, _points[i].data[j - 1].text)) : /*#__PURE__*/ _react.createElement("path", {
|
|
590
604
|
id: circleId,
|
|
591
605
|
key: circleId,
|
|
592
606
|
d: path,
|
|
@@ -614,9 +628,10 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
614
628
|
path = _getPath(_xAxisScale(x2), yScale(y2), lastCircleId, j, true, _points[i].index);
|
|
615
629
|
const { xAxisCalloutData: lastCirlceXCallout, xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData } = _points[i].data[j];
|
|
616
630
|
currentMarkerSize = _points[i].data[j].markerSize;
|
|
631
|
+
var _points_i_data_j_text;
|
|
617
632
|
pointsForLine.push(/*#__PURE__*/ _react.createElement(_react.Fragment, {
|
|
618
633
|
key: `${lastCircleId}_container`
|
|
619
|
-
}, ((_points_i_lineOptions10 = _points[i].lineOptions) === null || _points_i_lineOptions10 === void 0 ? void 0 : (_points_i_lineOptions_mode2 = _points_i_lineOptions10.mode) === null || _points_i_lineOptions_mode2 === void 0 ? void 0 : _points_i_lineOptions_mode2.includes('markers')) ? /*#__PURE__*/ _react.createElement("circle", {
|
|
634
|
+
}, ((_points_i_lineOptions10 = _points[i].lineOptions) === null || _points_i_lineOptions10 === void 0 ? void 0 : (_points_i_lineOptions_mode2 = _points_i_lineOptions10.mode) === null || _points_i_lineOptions_mode2 === void 0 ? void 0 : _points_i_lineOptions_mode2.includes('markers')) ? /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("circle", {
|
|
620
635
|
id: lastCircleId,
|
|
621
636
|
key: lastCircleId,
|
|
622
637
|
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4,
|
|
@@ -634,8 +649,14 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
634
649
|
stroke: lineColor,
|
|
635
650
|
strokeWidth: strokeWidth,
|
|
636
651
|
role: "img",
|
|
637
|
-
"aria-label": _getAriaLabel(i, j)
|
|
638
|
-
})
|
|
652
|
+
"aria-label": (_points_i_data_j_text = _points[i].data[j].text) !== null && _points_i_data_j_text !== void 0 ? _points_i_data_j_text : _getAriaLabel(i, j)
|
|
653
|
+
}), _points[i].data[j].text && /*#__PURE__*/ _react.createElement("text", {
|
|
654
|
+
key: `${lastCircleId}-label`,
|
|
655
|
+
x: _xAxisScale(x2),
|
|
656
|
+
y: yScale(y2) + 12,
|
|
657
|
+
fontSize: 12,
|
|
658
|
+
className: classes.markerLabel
|
|
659
|
+
}, _points[i].data[j].text)) : /*#__PURE__*/ _react.createElement("path", {
|
|
639
660
|
id: lastCircleId,
|
|
640
661
|
key: lastCircleId,
|
|
641
662
|
d: path,
|