infor-design / enterprise-wc

Enterprise-grade web component library for the Infor Design System
Apache License 2.0
27 stars 26 forks source link

IdsBarChart: Legend acts as an URL with selectable attribute set as true #2494

Open Rajarajeshwari14 opened 2 months ago

Rajarajeshwari14 commented 2 months ago

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.

To Reproduce

  1. Go to 'main.wc.design/bar-chart-selectable-example'
  2. Click on the text 'Component A'. You will notice the selectable works fine. The URL looks the same.
  3. Click on the blue square icon which is left of the text of 'Component A'. (Even while hovering you will notice a new URL).
  4. You will notice the URL changes to 'https://main.wc.design.infor.com/ids-bar-chart/selectable.html#legend-component-a'
  5. This is causing problems in our application where it appends some legend on our home page as "http://my-application/#legendA" which is redirected to a blank page.

Expected behavior Clicking the legend should not redirect the page but highlighting chart slices should work as it is.

Version ids-enterprise-wc - 1.0.0

Screenshots (You can notice the legend appended in the URL)

image
tmcconechy commented 2 months ago

@Rajarajeshwari14 what team is this for?

Rajarajeshwari14 commented 2 months ago

@tmcconechy Its Process Intelligence