-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(react-charting): Improve legend selection for Scatter charts #34701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix(react-charting): Improve legend selection for Scatter charts #34701
Conversation
📊 Bundle size report✅ No changes found |
Pull request demo site: URL |
@@ -0,0 +1,7 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests/react-charting-AreaChart 1 screenshots
Image Name | Diff(in Pixels) | Image Type |
---|---|---|
vr-tests/react-charting-AreaChart.Custom Accessibility.default.chromium.png | 11 | Changed |
@@ -0,0 +1,7 @@ | |||
{ | |||
"type": "patch", | |||
"comment": "fix(react-charting): Improve legend selection for Scatter charts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setSelectedLegends(props.legendProps?.selectedLegends || []); | ||
} | ||
} else { | ||
setSelectedLegends(props.legendProps?.selectedLegends || []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any difference in if and else condition statements
return selectedLegends.length === 0; | ||
}, [selectedLegends]); | ||
return selectedLegends.length === 0 && activeLegend === ''; | ||
}, [selectedLegends, activeLegend]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use _getHighlightedLegend.length === 0?
@@ -358,8 +359,8 @@ export const ScatterChartBase: React.FunctionComponent<IScatterChartProps> = Rea | |||
* This function checks if none of the legends is selected or hovered.*/ | |||
|
|||
const _noLegendHighlighted = React.useCallback((): boolean => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this fix issue of legend hover not working also.
Work item: https://uifabric.visualstudio.com/iss/_workitems/edit/13025
fix(react-charting): Improve legend selection for Scatter charts