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 00000000000000..9edeee64d4d1a7 --- /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" +} diff --git a/packages/react-charting/src/components/LineChart/LineChart.base.tsx b/packages/react-charting/src/components/LineChart/LineChart.base.tsx index d78420ae41e48b..b8cdbdc4c10d0a 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,