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

Ability to disable toggle visiblity behavior on legend items. #1055

Closed
1 task done
hbharding opened this issue Mar 4, 2021 · 2 comments · Fixed by #1134
Closed
1 task done

Ability to disable toggle visiblity behavior on legend items. #1055

hbharding opened this issue Mar 4, 2021 · 2 comments · Fixed by #1134
Assignees
Labels
enhancement New feature or request :interactions Interactions related issue :legend Legend related issue released Issue released publicly

Comments

@hbharding
Copy link

hbharding commented Mar 4, 2021

Is your feature request related to a problem? Please describe.
We have charts in Observability that only ever plot 1 or 2 pieces of information. Users are able to click on a legend item to toggle the visibility of data. While this feature is useful when there are many pieces of data being shown (it allows the user to focus), it doesn't seem like it provides any value when the chart only has a single legend item.

Describe the solution you'd like
A way for developers to disable the toggle capability when it's not desired.

Describe alternatives you've considered
Consistency / expected behavior might be a concern. Some charts would allow toggling visibility (current default behavior), whereas other may not. How would a user know when this toggle behavior is available?

A simple solution could be to just remove this capability when there is only a single legend item. This behavior could apply to all chart types. If more than 1 legend item exists, then the toggle visibility feature would become available.

Additional context

See screenshots

image
image

Checklist

Delete any items that are not applicable to this feature request.

  • this request is checked against already exist requests
@hbharding hbharding added enhancement New feature or request :interactions Interactions related issue :legend Legend related issue labels Mar 4, 2021
@hbharding hbharding changed the title Ability to disable the toggle behavior on legend items. Ability to disable toggle visiblity behavior on legend items. Mar 5, 2021
@markov00
Copy link
Member

Thank you @hbharding I think we can go with:

A simple solution could be to just remove this capability when there is only a single legend item. This behavior could apply to all chart types. If more than 1 legend item exists, then the toggle visibility feature would become available.

The consistency issue created with that change is neglectable and is replaced by a better UX

nickofthyme pushed a commit that referenced this issue 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
Collaborator

🎉 This issue has been resolved 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 issue Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request :interactions Interactions related issue :legend Legend related issue released Issue released publicly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants