From 88ed7bd1c16f6f667e3950a1eae12bf8c5ee3807 Mon Sep 17 00:00:00 2001 From: Shubhabrata Ghosh Date: Mon, 11 Mar 2024 20:34:51 +0530 Subject: [PATCH 1/2] Add circleID to _refArray --- .../src/components/LineChart/LineChart.base.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/react-charting/src/components/LineChart/LineChart.base.tsx b/packages/react-charting/src/components/LineChart/LineChart.base.tsx index d78420ae41e48..b8cdbdc4c10d0 100644 --- a/packages/react-charting/src/components/LineChart/LineChart.base.tsx +++ b/packages/react-charting/src/components/LineChart/LineChart.base.tsx @@ -767,6 +767,9 @@ export class LineChartBase extends React.Component { + this._refCallback(e!, circleId); + }} onMouseOut={this._handleMouseOut} onFocus={() => this._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)} onBlur={this._handleMouseOut} @@ -803,6 +806,9 @@ export class LineChartBase extends React.Component { + this._refCallback(e!, lastCircleId); + }} onMouseOver={this._handleHover.bind( this, x2, @@ -1190,7 +1196,7 @@ export class LineChartBase extends React.Component `translate(${_this._xAxisScale(x)}, 0)`) .attr('visibility', 'visibility'); this._refArray.forEach((obj: IRefArrayData) => { - if (obj.index === lineId) { + if (obj.index === lineId || obj.index === circleId) { this.setState({ isCalloutVisible: true, refSelected: obj.refElement, From a6baa75d6f387dde7640573d54c814903895353e Mon Sep 17 00:00:00 2001 From: Shubhabrata Ghosh Date: Mon, 11 Mar 2024 20:47:40 +0530 Subject: [PATCH 2/2] Add changefile --- ...eact-charting-b1624aa9-89c3-4fad-beff-b4758f6406eb.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-charting-b1624aa9-89c3-4fad-beff-b4758f6406eb.json diff --git a/change/@fluentui-react-charting-b1624aa9-89c3-4fad-beff-b4758f6406eb.json b/change/@fluentui-react-charting-b1624aa9-89c3-4fad-beff-b4758f6406eb.json new file mode 100644 index 0000000000000..9edeee64d4d1a --- /dev/null +++ b/change/@fluentui-react-charting-b1624aa9-89c3-4fad-beff-b4758f6406eb.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Add circleIDs to refArray for triggering callouts using circleIDs", + "packageName": "@fluentui/react-charting", + "email": "shubhabrata08@gmail.com", + "dependentChangeType": "patch" +}