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

2494 - Fixed legend URL behavior when selectable attribute is true #2825

Conversation

gurov
Copy link
Collaborator

@gurov gurov commented Sep 12, 2024

Explain the details for making this change. What existing problem does the pull request solve?

Problem
While setting the selectable attribute in a bar (/any other) chart, the legend icon acts as a URL.

Setting up the chart selectable attribute to false (or adding pointer-events : none for the anchor tag in DOM) prevents the chart legend from acting as a URL but does not retain the highlight effect on clicking each of the chart slices.

Solution
Added pointer-events: none; to swatch tag, so all clicks on the swatch element will be passed to a parent chart-legend-item element.

Related github/jira issue (required):

Closes #2494

Steps necessary to review your pull request (required):

http://localhost:4300/ids-bar-chart/selectable.html

Included in this Pull Request:

  • Some documentation for the feature.
  • A test for the bug or feature.
  • A note to the change log.

@gurov gurov requested a review from a team as a code owner September 12, 2024 13:25
@tmcconechy tmcconechy merged commit 203e7dd into main Sep 12, 2024
4 checks passed
@tmcconechy tmcconechy deleted the 2494---Fix-legend-URL-behavior-when-selectable-attribute-is-true branch September 12, 2024 15:12
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.

IdsBarChart: Legend acts as an URL with selectable attribute set as true
3 participants