Skip to content
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

[Horizontal Bar Chart With Axis] Enable multiple legend selection #33484

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

srmukher
Copy link
Contributor

[Horizontal Bar Chart With Axis] Enable multiple legend selection

@srmukher srmukher requested a review from a team as a code owner December 18, 2024 08:01
Copy link

github-actions bot commented Dec 18, 2024

📊 Bundle size report

✅ No changes found

Copy link

Pull request demo site: URL

@srmukher srmukher force-pushed the users/srmukher/HBC_multi_legend branch from 403da6d to 5d4b991 Compare December 19, 2024 06:10
if (this._isLegendSelected()) {
if (this._isSpecificLegendTitleSelected(currentLegend?.title!)) {
this.setState({
isLegendSelected: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isLegendSelected: false

why setting this to false if setting selectedLegendTitle to a value

this.state.isLegendSelected === false ||
(this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)
) {
if (!this._isLegendSelected() || (this._isLegendSelected() && this._isSpecificLegendTitleSelected(point.legend!))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(!this._isLegendSelected() || (this._isLegendSelected() && this._isSpecificLegendTitleSelected(point.legend!))) {

shouldn't bar hover and bar focus conditions be same?

shouldHighlight = this.state.selectedLegendTitle === point.legend;
if (this._isLegendHovered() || this._isLegendSelected()) {
shouldHighlight =
this._isSpecificLegendTitleSelected(point.legend!) || this._isSpecificLegendSelected(point.legend!);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this._isSpecificLegendTitleSelected(point.legend!) || this._isSpecificLegendSelected(point.legend!);

same here?

if (this.state.isLegendHovered || this.state.isLegendSelected) {
shouldHighlight = this.state.selectedLegendTitle === point.legend;
if (this._isLegendHovered() || this._isLegendSelected()) {
shouldHighlight = this._isSpecificLegendTitleSelected(point.legend!);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here?

@AtishayMsft
Copy link
Contributor

Change file is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants