@fluentui/react-charts 0.0.0-nightly-20251128-0406.1 → 0.0.0-nightly-20251202-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.
@@ -906,27 +906,24 @@ function calloutData(values) {
906
906
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
907
907
  combinedResult.forEach((ele)=>{
908
908
  const xValue = ele.x instanceof Date ? ele.x.getTime() : ele.x;
909
+ const newPoint = {
910
+ legend: ele.legend,
911
+ y: ele.y,
912
+ color: ele.color,
913
+ xAxisCalloutData: ele.xAxisCalloutData,
914
+ yAxisCalloutData: ele.yAxisCalloutData,
915
+ callOutAccessibilityData: ele.callOutAccessibilityData,
916
+ index: ele.index
917
+ };
909
918
  if (xValue in xValToDataPoints) {
910
- xValToDataPoints[xValue].push({
911
- legend: ele.legend,
912
- y: ele.y,
913
- color: ele.color,
914
- xAxisCalloutData: ele.xAxisCalloutData,
915
- yAxisCalloutData: ele.yAxisCalloutData,
916
- callOutAccessibilityData: ele.callOutAccessibilityData,
917
- index: ele.index
918
- });
919
+ // Check if a point with the same legend and y-value already exists
920
+ const existingPoint = xValToDataPoints[xValue].find((p)=>p.legend === newPoint.legend && p.y === newPoint.y);
921
+ if (!existingPoint) {
922
+ xValToDataPoints[xValue].push(newPoint);
923
+ }
919
924
  } else {
920
925
  xValToDataPoints[xValue] = [
921
- {
922
- legend: ele.legend,
923
- y: ele.y,
924
- color: ele.color,
925
- xAxisCalloutData: ele.xAxisCalloutData,
926
- yAxisCalloutData: ele.yAxisCalloutData,
927
- callOutAccessibilityData: ele.callOutAccessibilityData,
928
- index: ele.index
929
- }
926
+ newPoint
930
927
  ];
931
928
  }
932
929
  });