Skip to content

fix(legend): disable handleLabelClick for one legend item#1134

Merged
rshen91 merged 15 commits intoelastic:masterfrom
rshen91:disable-visible-legend-items
Apr 26, 2021
Merged

fix(legend): disable handleLabelClick for one legend item#1134
rshen91 merged 15 commits intoelastic:masterfrom
rshen91:disable-visible-legend-items

Conversation

@rshen91
Copy link
Copy Markdown
Contributor

@rshen91 rshen91 commented Apr 22, 2021

Summary

Fixes #1055

If there is only one legend item, the label will not be able to be clicked to be visible or not. That functionality still works for charts with multiple legend items.

Checklist

Delete any items that are not applicable to this PR.

  • Unit tests were updated or added to match the most common scenarios

@rshen91 rshen91 added :legend Legend related issue :interactions Interactions related issue labels Apr 22, 2021
@rshen91 rshen91 marked this pull request as ready for review April 22, 2021 21:40
Copy link
Copy Markdown
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

Looks like the ItemLabel is still toggleable. We need to update that in addition to the click handler.

Screen Recording 2021-04-22 at 05 27 27 PM

@rshen91
Copy link
Copy Markdown
Contributor Author

rshen91 commented Apr 23, 2021

Looks like the ItemLabel is still toggleable. We need to update that in addition to the click handler.

Screen Recording 2021-04-22 at 05 27 27 PM

ah good catch - please see a34bf4a thank you!

@rshen91 rshen91 requested a review from nickofthyme April 23, 2021 14:25
@rshen91 rshen91 requested a review from nickofthyme April 23, 2021 15:37
@rshen91 rshen91 changed the title feat(legend): disable handleLabelClick for one legend item fix(legend): disable handleLabelClick for one legend item Apr 23, 2021
Copy link
Copy Markdown
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

LGTM, just a few minor comments

@rshen91 rshen91 merged commit a7242af into elastic:master Apr 26, 2021
nickofthyme pushed a commit that referenced this pull request May 25, 2021
# [29.2.0](v29.1.0...v29.2.0) (2021-05-25)

### Bug Fixes

* **legend:** disable handleLabelClick for one legend item ([#1134](#1134)) ([a7242af](a7242af)), closes [#1055](#1055)

### Features

* **a11y:** add alt text for all chart types  ([#1118](#1118)) ([9e42229](9e42229)), closes [#1107](#1107)
* **legend:** specify number of columns on floating legend ([#1159](#1159)) ([c2e4652](c2e4652)), closes [#1158](#1158)
* simple screenspace constraint solver ([#1141](#1141)) ([eb11480](eb11480))
@nickofthyme
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 29.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label May 25, 2021
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:interactions Interactions related issue :legend Legend related issue released Issue released publicly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to disable toggle visiblity behavior on legend items.

2 participants