@fluentui/react-charts 0.0.0-nightly-20250911-0406.1 → 0.0.0-nightly-20250912-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/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +6 -4
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +34 -32
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +6 -3
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +17 -15
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +6 -4
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +34 -32
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +6 -3
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +17 -15
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/package.json +13 -13
|
@@ -512,19 +512,19 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
512
512
|
]);
|
|
513
513
|
}
|
|
514
514
|
if (isLegendSelected) {
|
|
515
|
-
var _points_i_lineOptions3, _points_i_lineOptions4;
|
|
515
|
+
var _points_i_lineOptions3, _points_i_lineOptions4, _points_i_lineOptions5;
|
|
516
516
|
const lineBorderWidth = ((_points_i_lineOptions3 = _points[i].lineOptions) === null || _points_i_lineOptions3 === void 0 ? void 0 : _points_i_lineOptions3.lineBorderWidth) ? Number.parseFloat(_points[i].lineOptions.lineBorderWidth.toString()) : 0;
|
|
517
517
|
if (lineBorderWidth > 0) {
|
|
518
|
-
var
|
|
518
|
+
var _points_i_lineOptions6, _points_i_lineOptions7;
|
|
519
519
|
var _points_i_lineOptions_strokeLinecap;
|
|
520
520
|
bordersForLine.push(/*#__PURE__*/ _react.createElement("path", {
|
|
521
521
|
id: borderId,
|
|
522
522
|
key: borderId,
|
|
523
523
|
d: line(lineData),
|
|
524
524
|
fill: "transparent",
|
|
525
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap = (
|
|
525
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap = (_points_i_lineOptions6 = _points[i].lineOptions) === null || _points_i_lineOptions6 === void 0 ? void 0 : _points_i_lineOptions6.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap !== void 0 ? _points_i_lineOptions_strokeLinecap : 'round',
|
|
526
526
|
strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
|
|
527
|
-
stroke: ((
|
|
527
|
+
stroke: ((_points_i_lineOptions7 = _points[i].lineOptions) === null || _points_i_lineOptions7 === void 0 ? void 0 : _points_i_lineOptions7.lineBorderColor) || _reacttheme.tokens.colorNeutralBackground1,
|
|
528
528
|
opacity: 1
|
|
529
529
|
}));
|
|
530
530
|
}
|
|
@@ -538,15 +538,16 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
538
538
|
stroke: lineColor,
|
|
539
539
|
strokeWidth: strokeWidth,
|
|
540
540
|
strokeLinecap: (_points_i_lineOptions_strokeLinecap1 = (_points_i_lineOptions4 = _points[i].lineOptions) === null || _points_i_lineOptions4 === void 0 ? void 0 : _points_i_lineOptions4.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap1 !== void 0 ? _points_i_lineOptions_strokeLinecap1 : 'round',
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
strokeDasharray: (_points_i_lineOptions5 = _points[i].lineOptions) === null || _points_i_lineOptions5 === void 0 ? void 0 : _points_i_lineOptions5.strokeDasharray,
|
|
542
|
+
onMouseMove: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
543
|
+
onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
543
544
|
onMouseOut: _handleMouseOut,
|
|
544
545
|
..._getClickHandler(_points[i].onLineClick),
|
|
545
546
|
opacity: 1,
|
|
546
547
|
tabIndex: isLegendSelected ? 0 : undefined
|
|
547
548
|
}));
|
|
548
549
|
} else {
|
|
549
|
-
var
|
|
550
|
+
var _points_i_lineOptions8, _points_i_lineOptions9;
|
|
550
551
|
var _points_i_lineOptions_strokeLinecap2;
|
|
551
552
|
linesForLine.push(/*#__PURE__*/ _react.createElement("path", {
|
|
552
553
|
id: lineId,
|
|
@@ -556,7 +557,8 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
556
557
|
"data-is-focusable": false,
|
|
557
558
|
stroke: lineColor,
|
|
558
559
|
strokeWidth: strokeWidth,
|
|
559
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap2 = (
|
|
560
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap2 = (_points_i_lineOptions8 = _points[i].lineOptions) === null || _points_i_lineOptions8 === void 0 ? void 0 : _points_i_lineOptions8.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap2 !== void 0 ? _points_i_lineOptions_strokeLinecap2 : 'round',
|
|
561
|
+
strokeDasharray: (_points_i_lineOptions9 = _points[i].lineOptions) === null || _points_i_lineOptions9 === void 0 ? void 0 : _points_i_lineOptions9.strokeDasharray,
|
|
560
562
|
opacity: 0.1
|
|
561
563
|
}));
|
|
562
564
|
}
|
|
@@ -570,13 +572,13 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
570
572
|
strokeWidth: DEFAULT_LINE_STROKE_SIZE,
|
|
571
573
|
stroke: lineColor,
|
|
572
574
|
visibility: 'hidden',
|
|
573
|
-
onMouseMove: (event)=>_onMouseOverLargeDataset
|
|
574
|
-
onMouseOver: (event)=>_onMouseOverLargeDataset
|
|
575
|
+
onMouseMove: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
576
|
+
onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
575
577
|
onMouseOut: _handleMouseOut
|
|
576
578
|
}));
|
|
577
579
|
} else if (!props.optimizeLargeData) {
|
|
578
580
|
for(let j = 1; j < _points[i].data.length; j++){
|
|
579
|
-
var
|
|
581
|
+
var _points_i_lineOptions10, _points_i_lineOptions_mode1, _points_i_lineOptions11, _points_i_lineOptions_mode2, _points_i_lineOptions12;
|
|
580
582
|
const gapResult = _checkInGap(j, gaps, gapIndex);
|
|
581
583
|
const isInGap = gapResult.isInGap;
|
|
582
584
|
gapIndex = gapResult.gapIndex;
|
|
@@ -589,17 +591,17 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
589
591
|
const yPoint1 = yScale(y1);
|
|
590
592
|
const xPoint2 = _xAxisScale(x2);
|
|
591
593
|
const yPoint2 = yScale(y2);
|
|
592
|
-
const strokeWidth = ((
|
|
594
|
+
const strokeWidth = ((_points_i_lineOptions10 = _points[i].lineOptions) === null || _points_i_lineOptions10 === void 0 ? void 0 : _points_i_lineOptions10.strokeWidth) || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
|
|
593
595
|
const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
|
|
594
596
|
const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;
|
|
595
|
-
const supportsTextMode = (
|
|
597
|
+
const supportsTextMode = (_points_i_lineOptions11 = _points[i].lineOptions) === null || _points_i_lineOptions11 === void 0 ? void 0 : (_points_i_lineOptions_mode1 = _points_i_lineOptions11.mode) === null || _points_i_lineOptions_mode1 === void 0 ? void 0 : _points_i_lineOptions_mode1.includes('text');
|
|
596
598
|
const text = _points[i].data[j - 1].text;
|
|
597
599
|
let currentMarkerSize = _points[i].data[j - 1].markerSize;
|
|
598
600
|
if ((0, _index1.isPlottable)(xPoint1, yPoint1)) {
|
|
599
|
-
var _points_i_lineOptions_mode3,
|
|
601
|
+
var _points_i_lineOptions_mode3, _points_i_lineOptions13;
|
|
600
602
|
const path = _getPath(xPoint1, yPoint1, circleId, j, false, _points[i].index);
|
|
601
603
|
var _points_i_data__text1;
|
|
602
|
-
pointsForLine.push(((
|
|
604
|
+
pointsForLine.push(((_points_i_lineOptions13 = _points[i].lineOptions) === null || _points_i_lineOptions13 === void 0 ? void 0 : (_points_i_lineOptions_mode3 = _points_i_lineOptions13.mode) === null || _points_i_lineOptions_mode3 === void 0 ? void 0 : _points_i_lineOptions_mode3.includes('markers')) || supportsTextMode ? /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("circle", {
|
|
603
605
|
id: circleId,
|
|
604
606
|
key: circleId,
|
|
605
607
|
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4,
|
|
@@ -645,22 +647,22 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
645
647
|
}));
|
|
646
648
|
}
|
|
647
649
|
if (j + 1 === _points[i].data.length) {
|
|
648
|
-
var _points_i_lineOptions_mode4,
|
|
650
|
+
var _points_i_lineOptions_mode4, _points_i_lineOptions14;
|
|
649
651
|
// If this is last point of the line segment.
|
|
650
652
|
const lastCircleId = `${circleId}${j}L`;
|
|
651
653
|
const hiddenHoverCircleId = `${circleId}${j}D`;
|
|
652
654
|
const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;
|
|
653
655
|
const { xAxisCalloutData: lastCirlceXCallout, xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData } = _points[i].data[j];
|
|
654
656
|
currentMarkerSize = _points[i].data[j].markerSize;
|
|
655
|
-
const lastSupportsTextMode = (
|
|
657
|
+
const lastSupportsTextMode = (_points_i_lineOptions14 = _points[i].lineOptions) === null || _points_i_lineOptions14 === void 0 ? void 0 : (_points_i_lineOptions_mode4 = _points_i_lineOptions14.mode) === null || _points_i_lineOptions_mode4 === void 0 ? void 0 : _points_i_lineOptions_mode4.includes('text');
|
|
656
658
|
const lastText = _points[i].data[j].text;
|
|
657
659
|
if ((0, _index1.isPlottable)(xPoint2, yPoint2)) {
|
|
658
|
-
var _points_i_lineOptions_mode5,
|
|
660
|
+
var _points_i_lineOptions_mode5, _points_i_lineOptions15;
|
|
659
661
|
const path = _getPath(xPoint2, yPoint2, lastCircleId, j, true, _points[i].index);
|
|
660
662
|
var _points_i_data_j_text;
|
|
661
663
|
pointsForLine.push(/*#__PURE__*/ _react.createElement(_react.Fragment, {
|
|
662
664
|
key: `${lastCircleId}_container`
|
|
663
|
-
}, ((
|
|
665
|
+
}, ((_points_i_lineOptions15 = _points[i].lineOptions) === null || _points_i_lineOptions15 === void 0 ? void 0 : (_points_i_lineOptions_mode5 = _points_i_lineOptions15.mode) === null || _points_i_lineOptions_mode5 === void 0 ? void 0 : _points_i_lineOptions_mode5.includes('markers')) || lastSupportsTextMode ? /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("circle", {
|
|
664
666
|
id: lastCircleId,
|
|
665
667
|
key: lastCircleId,
|
|
666
668
|
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4,
|
|
@@ -719,14 +721,14 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
719
721
|
})));
|
|
720
722
|
}
|
|
721
723
|
}
|
|
722
|
-
if ((0, _index1.isPlottable)(xPoint1, yPoint1) && (0, _index1.isPlottable)(xPoint2, yPoint2) && (!_hasMarkersMode || ((
|
|
724
|
+
if ((0, _index1.isPlottable)(xPoint1, yPoint1) && (0, _index1.isPlottable)(xPoint2, yPoint2) && (!_hasMarkersMode || ((_points_i_lineOptions12 = _points[i].lineOptions) === null || _points_i_lineOptions12 === void 0 ? void 0 : (_points_i_lineOptions_mode2 = _points_i_lineOptions12.mode) === null || _points_i_lineOptions_mode2 === void 0 ? void 0 : _points_i_lineOptions_mode2.includes('lines')))) {
|
|
723
725
|
if (isLegendSelected) {
|
|
724
726
|
// don't draw line if it is in a gap
|
|
725
727
|
if (!isInGap) {
|
|
726
|
-
var
|
|
727
|
-
const lineBorderWidth = ((
|
|
728
|
+
var _points_i_lineOptions16, _points_i_lineOptions17, _points_i_lineOptions18, _points_i_lineOptions19;
|
|
729
|
+
const lineBorderWidth = ((_points_i_lineOptions16 = _points[i].lineOptions) === null || _points_i_lineOptions16 === void 0 ? void 0 : _points_i_lineOptions16.lineBorderWidth) ? Number.parseFloat(_points[i].lineOptions.lineBorderWidth.toString()) : 0;
|
|
728
730
|
if (lineBorderWidth > 0) {
|
|
729
|
-
var
|
|
731
|
+
var _points_i_lineOptions20, _points_i_lineOptions21;
|
|
730
732
|
var _points_i_lineOptions_strokeLinecap3;
|
|
731
733
|
bordersForLine.push(/*#__PURE__*/ _react.createElement("line", {
|
|
732
734
|
id: borderId,
|
|
@@ -735,9 +737,9 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
735
737
|
y1: yPoint1,
|
|
736
738
|
x2: xPoint2,
|
|
737
739
|
y2: yPoint2,
|
|
738
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap3 = (
|
|
740
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap3 = (_points_i_lineOptions20 = _points[i].lineOptions) === null || _points_i_lineOptions20 === void 0 ? void 0 : _points_i_lineOptions20.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap3 !== void 0 ? _points_i_lineOptions_strokeLinecap3 : 'round',
|
|
739
741
|
strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
|
|
740
|
-
stroke: ((
|
|
742
|
+
stroke: ((_points_i_lineOptions21 = _points[i].lineOptions) === null || _points_i_lineOptions21 === void 0 ? void 0 : _points_i_lineOptions21.lineBorderColor) || _reacttheme.tokens.colorNeutralBackground1,
|
|
741
743
|
opacity: 1
|
|
742
744
|
}));
|
|
743
745
|
}
|
|
@@ -757,16 +759,16 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
757
759
|
onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
758
760
|
onMouseOut: _handleMouseOut,
|
|
759
761
|
stroke: lineColor,
|
|
760
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap4 = (
|
|
761
|
-
strokeDasharray: (
|
|
762
|
-
strokeDashoffset: (
|
|
762
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap4 = (_points_i_lineOptions17 = _points[i].lineOptions) === null || _points_i_lineOptions17 === void 0 ? void 0 : _points_i_lineOptions17.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap4 !== void 0 ? _points_i_lineOptions_strokeLinecap4 : 'round',
|
|
763
|
+
strokeDasharray: (_points_i_lineOptions18 = _points[i].lineOptions) === null || _points_i_lineOptions18 === void 0 ? void 0 : _points_i_lineOptions18.strokeDasharray,
|
|
764
|
+
strokeDashoffset: (_points_i_lineOptions19 = _points[i].lineOptions) === null || _points_i_lineOptions19 === void 0 ? void 0 : _points_i_lineOptions19.strokeDashoffset,
|
|
763
765
|
opacity: 1,
|
|
764
766
|
..._getClickHandler(_points[i].onLineClick)
|
|
765
767
|
}));
|
|
766
768
|
}
|
|
767
769
|
} else {
|
|
768
770
|
if (!isInGap) {
|
|
769
|
-
var
|
|
771
|
+
var _points_i_lineOptions22, _points_i_lineOptions23, _points_i_lineOptions24;
|
|
770
772
|
var _points_i_lineOptions_strokeLinecap5;
|
|
771
773
|
linesForLine.push(/*#__PURE__*/ _react.createElement("line", {
|
|
772
774
|
id: lineId,
|
|
@@ -777,9 +779,9 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
777
779
|
y2: yPoint2,
|
|
778
780
|
strokeWidth: strokeWidth,
|
|
779
781
|
stroke: lineColor,
|
|
780
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap5 = (
|
|
781
|
-
strokeDasharray: (
|
|
782
|
-
strokeDashoffset: (
|
|
782
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap5 = (_points_i_lineOptions22 = _points[i].lineOptions) === null || _points_i_lineOptions22 === void 0 ? void 0 : _points_i_lineOptions22.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap5 !== void 0 ? _points_i_lineOptions_strokeLinecap5 : 'round',
|
|
783
|
+
strokeDasharray: (_points_i_lineOptions23 = _points[i].lineOptions) === null || _points_i_lineOptions23 === void 0 ? void 0 : _points_i_lineOptions23.strokeDasharray,
|
|
784
|
+
strokeDashoffset: (_points_i_lineOptions24 = _points[i].lineOptions) === null || _points_i_lineOptions24 === void 0 ? void 0 : _points_i_lineOptions24.strokeDashoffset,
|
|
783
785
|
opacity: 0.1
|
|
784
786
|
}));
|
|
785
787
|
}
|