@fluentui/react-charts 0.0.0-nightly-20250911-0406.1 → 0.0.0-nightly-20250915-0408.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/CommonComponents/CartesianChart.js +5 -7
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- 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/utilities/utilities.js +5 -5
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +5 -7
- package/lib-commonjs/components/CommonComponents/CartesianChart.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/lib-commonjs/utilities/utilities.js +5 -5
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +13 -13
|
@@ -507,19 +507,19 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
507
507
|
]);
|
|
508
508
|
}
|
|
509
509
|
if (isLegendSelected) {
|
|
510
|
-
var _points_i_lineOptions3, _points_i_lineOptions4;
|
|
510
|
+
var _points_i_lineOptions3, _points_i_lineOptions4, _points_i_lineOptions5;
|
|
511
511
|
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;
|
|
512
512
|
if (lineBorderWidth > 0) {
|
|
513
|
-
var
|
|
513
|
+
var _points_i_lineOptions6, _points_i_lineOptions7;
|
|
514
514
|
var _points_i_lineOptions_strokeLinecap;
|
|
515
515
|
bordersForLine.push(/*#__PURE__*/ React.createElement("path", {
|
|
516
516
|
id: borderId,
|
|
517
517
|
key: borderId,
|
|
518
518
|
d: line(lineData),
|
|
519
519
|
fill: "transparent",
|
|
520
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap = (
|
|
520
|
+
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',
|
|
521
521
|
strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
|
|
522
|
-
stroke: ((
|
|
522
|
+
stroke: ((_points_i_lineOptions7 = _points[i].lineOptions) === null || _points_i_lineOptions7 === void 0 ? void 0 : _points_i_lineOptions7.lineBorderColor) || tokens.colorNeutralBackground1,
|
|
523
523
|
opacity: 1
|
|
524
524
|
}));
|
|
525
525
|
}
|
|
@@ -533,15 +533,16 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
533
533
|
stroke: lineColor,
|
|
534
534
|
strokeWidth: strokeWidth,
|
|
535
535
|
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',
|
|
536
|
-
|
|
537
|
-
|
|
536
|
+
strokeDasharray: (_points_i_lineOptions5 = _points[i].lineOptions) === null || _points_i_lineOptions5 === void 0 ? void 0 : _points_i_lineOptions5.strokeDasharray,
|
|
537
|
+
onMouseMove: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
538
|
+
onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
538
539
|
onMouseOut: _handleMouseOut,
|
|
539
540
|
..._getClickHandler(_points[i].onLineClick),
|
|
540
541
|
opacity: 1,
|
|
541
542
|
tabIndex: isLegendSelected ? 0 : undefined
|
|
542
543
|
}));
|
|
543
544
|
} else {
|
|
544
|
-
var
|
|
545
|
+
var _points_i_lineOptions8, _points_i_lineOptions9;
|
|
545
546
|
var _points_i_lineOptions_strokeLinecap2;
|
|
546
547
|
linesForLine.push(/*#__PURE__*/ React.createElement("path", {
|
|
547
548
|
id: lineId,
|
|
@@ -551,7 +552,8 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
551
552
|
"data-is-focusable": false,
|
|
552
553
|
stroke: lineColor,
|
|
553
554
|
strokeWidth: strokeWidth,
|
|
554
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap2 = (
|
|
555
|
+
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',
|
|
556
|
+
strokeDasharray: (_points_i_lineOptions9 = _points[i].lineOptions) === null || _points_i_lineOptions9 === void 0 ? void 0 : _points_i_lineOptions9.strokeDasharray,
|
|
555
557
|
opacity: 0.1
|
|
556
558
|
}));
|
|
557
559
|
}
|
|
@@ -565,13 +567,13 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
565
567
|
strokeWidth: DEFAULT_LINE_STROKE_SIZE,
|
|
566
568
|
stroke: lineColor,
|
|
567
569
|
visibility: 'hidden',
|
|
568
|
-
onMouseMove: (event)=>_onMouseOverLargeDataset
|
|
569
|
-
onMouseOver: (event)=>_onMouseOverLargeDataset
|
|
570
|
+
onMouseMove: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
571
|
+
onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
570
572
|
onMouseOut: _handleMouseOut
|
|
571
573
|
}));
|
|
572
574
|
} else if (!props.optimizeLargeData) {
|
|
573
575
|
for(let j = 1; j < _points[i].data.length; j++){
|
|
574
|
-
var
|
|
576
|
+
var _points_i_lineOptions10, _points_i_lineOptions_mode1, _points_i_lineOptions11, _points_i_lineOptions_mode2, _points_i_lineOptions12;
|
|
575
577
|
const gapResult = _checkInGap(j, gaps, gapIndex);
|
|
576
578
|
const isInGap = gapResult.isInGap;
|
|
577
579
|
gapIndex = gapResult.gapIndex;
|
|
@@ -584,17 +586,17 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
584
586
|
const yPoint1 = yScale(y1);
|
|
585
587
|
const xPoint2 = _xAxisScale(x2);
|
|
586
588
|
const yPoint2 = yScale(y2);
|
|
587
|
-
const strokeWidth = ((
|
|
589
|
+
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;
|
|
588
590
|
const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
|
|
589
591
|
const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;
|
|
590
|
-
const supportsTextMode = (
|
|
592
|
+
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');
|
|
591
593
|
const text = _points[i].data[j - 1].text;
|
|
592
594
|
let currentMarkerSize = _points[i].data[j - 1].markerSize;
|
|
593
595
|
if (isPlottable(xPoint1, yPoint1)) {
|
|
594
|
-
var _points_i_lineOptions_mode3,
|
|
596
|
+
var _points_i_lineOptions_mode3, _points_i_lineOptions13;
|
|
595
597
|
const path = _getPath(xPoint1, yPoint1, circleId, j, false, _points[i].index);
|
|
596
598
|
var _points_i_data__text1;
|
|
597
|
-
pointsForLine.push(((
|
|
599
|
+
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", {
|
|
598
600
|
id: circleId,
|
|
599
601
|
key: circleId,
|
|
600
602
|
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4,
|
|
@@ -640,22 +642,22 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
640
642
|
}));
|
|
641
643
|
}
|
|
642
644
|
if (j + 1 === _points[i].data.length) {
|
|
643
|
-
var _points_i_lineOptions_mode4,
|
|
645
|
+
var _points_i_lineOptions_mode4, _points_i_lineOptions14;
|
|
644
646
|
// If this is last point of the line segment.
|
|
645
647
|
const lastCircleId = `${circleId}${j}L`;
|
|
646
648
|
const hiddenHoverCircleId = `${circleId}${j}D`;
|
|
647
649
|
const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;
|
|
648
650
|
const { xAxisCalloutData: lastCirlceXCallout, xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData } = _points[i].data[j];
|
|
649
651
|
currentMarkerSize = _points[i].data[j].markerSize;
|
|
650
|
-
const lastSupportsTextMode = (
|
|
652
|
+
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');
|
|
651
653
|
const lastText = _points[i].data[j].text;
|
|
652
654
|
if (isPlottable(xPoint2, yPoint2)) {
|
|
653
|
-
var _points_i_lineOptions_mode5,
|
|
655
|
+
var _points_i_lineOptions_mode5, _points_i_lineOptions15;
|
|
654
656
|
const path = _getPath(xPoint2, yPoint2, lastCircleId, j, true, _points[i].index);
|
|
655
657
|
var _points_i_data_j_text;
|
|
656
658
|
pointsForLine.push(/*#__PURE__*/ React.createElement(React.Fragment, {
|
|
657
659
|
key: `${lastCircleId}_container`
|
|
658
|
-
}, ((
|
|
660
|
+
}, ((_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", {
|
|
659
661
|
id: lastCircleId,
|
|
660
662
|
key: lastCircleId,
|
|
661
663
|
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4,
|
|
@@ -714,14 +716,14 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
714
716
|
})));
|
|
715
717
|
}
|
|
716
718
|
}
|
|
717
|
-
if (isPlottable(xPoint1, yPoint1) && isPlottable(xPoint2, yPoint2) && (!_hasMarkersMode || ((
|
|
719
|
+
if (isPlottable(xPoint1, yPoint1) && 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')))) {
|
|
718
720
|
if (isLegendSelected) {
|
|
719
721
|
// don't draw line if it is in a gap
|
|
720
722
|
if (!isInGap) {
|
|
721
|
-
var
|
|
722
|
-
const lineBorderWidth = ((
|
|
723
|
+
var _points_i_lineOptions16, _points_i_lineOptions17, _points_i_lineOptions18, _points_i_lineOptions19;
|
|
724
|
+
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;
|
|
723
725
|
if (lineBorderWidth > 0) {
|
|
724
|
-
var
|
|
726
|
+
var _points_i_lineOptions20, _points_i_lineOptions21;
|
|
725
727
|
var _points_i_lineOptions_strokeLinecap3;
|
|
726
728
|
bordersForLine.push(/*#__PURE__*/ React.createElement("line", {
|
|
727
729
|
id: borderId,
|
|
@@ -730,9 +732,9 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
730
732
|
y1: yPoint1,
|
|
731
733
|
x2: xPoint2,
|
|
732
734
|
y2: yPoint2,
|
|
733
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap3 = (
|
|
735
|
+
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',
|
|
734
736
|
strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
|
|
735
|
-
stroke: ((
|
|
737
|
+
stroke: ((_points_i_lineOptions21 = _points[i].lineOptions) === null || _points_i_lineOptions21 === void 0 ? void 0 : _points_i_lineOptions21.lineBorderColor) || tokens.colorNeutralBackground1,
|
|
736
738
|
opacity: 1
|
|
737
739
|
}));
|
|
738
740
|
}
|
|
@@ -752,16 +754,16 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
752
754
|
onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
753
755
|
onMouseOut: _handleMouseOut,
|
|
754
756
|
stroke: lineColor,
|
|
755
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap4 = (
|
|
756
|
-
strokeDasharray: (
|
|
757
|
-
strokeDashoffset: (
|
|
757
|
+
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',
|
|
758
|
+
strokeDasharray: (_points_i_lineOptions18 = _points[i].lineOptions) === null || _points_i_lineOptions18 === void 0 ? void 0 : _points_i_lineOptions18.strokeDasharray,
|
|
759
|
+
strokeDashoffset: (_points_i_lineOptions19 = _points[i].lineOptions) === null || _points_i_lineOptions19 === void 0 ? void 0 : _points_i_lineOptions19.strokeDashoffset,
|
|
758
760
|
opacity: 1,
|
|
759
761
|
..._getClickHandler(_points[i].onLineClick)
|
|
760
762
|
}));
|
|
761
763
|
}
|
|
762
764
|
} else {
|
|
763
765
|
if (!isInGap) {
|
|
764
|
-
var
|
|
766
|
+
var _points_i_lineOptions22, _points_i_lineOptions23, _points_i_lineOptions24;
|
|
765
767
|
var _points_i_lineOptions_strokeLinecap5;
|
|
766
768
|
linesForLine.push(/*#__PURE__*/ React.createElement("line", {
|
|
767
769
|
id: lineId,
|
|
@@ -772,9 +774,9 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
772
774
|
y2: yPoint2,
|
|
773
775
|
strokeWidth: strokeWidth,
|
|
774
776
|
stroke: lineColor,
|
|
775
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap5 = (
|
|
776
|
-
strokeDasharray: (
|
|
777
|
-
strokeDashoffset: (
|
|
777
|
+
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',
|
|
778
|
+
strokeDasharray: (_points_i_lineOptions23 = _points[i].lineOptions) === null || _points_i_lineOptions23 === void 0 ? void 0 : _points_i_lineOptions23.strokeDasharray,
|
|
779
|
+
strokeDashoffset: (_points_i_lineOptions24 = _points[i].lineOptions) === null || _points_i_lineOptions24 === void 0 ? void 0 : _points_i_lineOptions24.strokeDashoffset,
|
|
778
780
|
opacity: 0.1
|
|
779
781
|
}));
|
|
780
782
|
}
|