Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Gantt Chart: Inconsistency with the icon selection #25

Open
2 of 10 tasks
ravi6565 opened this issue Nov 23, 2020 · 1 comment
Open
2 of 10 tasks

Gantt Chart: Inconsistency with the icon selection #25

ravi6565 opened this issue Nov 23, 2020 · 1 comment
Labels
Feature New feature or request 📦 carbon-graphs
Milestone

Comments

@ravi6565
Copy link

What part of Carbon does this bug correlate to?
Gantt Chart Onclick event for Icons inside Graph
General graph logic:
We are passing custom SVG icons for Gantt chart and SVG icons are transparent. So on click of Icons only filled portions we are seeing click event and empty spaces are not clickable.
Reference JIRA: https://jira3.cerner.com/browse/UXREQ-13696

  • Graph attributes (axes, legends, regions...etc.)
  • Other (please specify): actionLegend.

Specific graph logic:

  • Bar graph
  • Bubble graph
  • Gantt chart
  • Line graph
  • Paired result
  • Pie chart
  • Scatter plot
  • Timeline

Describe the bug
A clear and concise description of what the bug is.
We noticed that SVG Icons without background onClick event isn't working as expected(Clickable).

In the below screenshot SVG icon is transparent. Filled places are clickable(Black color) and empty spaces i.e. inside oval empty spaces are non-clickable. 

Screenshot 2020-11-20 at 1 45 52 PM

Because of the above issue, we are seeing inconsistency in the icon selection(Click event).

For reference: https://pages.github.cerner.com/aeon-womenshealth/partogram-js/components/partogram-js/partogram 
please validate the same in the above URL. Steps to reproduce(Move the mouse cursor over the SVG icon in Gantt graph i.e. action legends) and Inconsistency behavior(try to move the cursor to Black color SVG fill or empty spaces i.e. transparent inside oval shape)

Reference JIRA LINK: https://jira3.cerner.com/browse/UXREQ-13696

Link to CodeSandbox
Cerner Github link:
Custom SVG Icons object creation for action legends: https://github.cerner.com/aeon-womenshealth/partogram-js/blob/master/src/components/labor-curve/laborCurveCarbonHelpers.js#L273-L290
SVG Icons: https://github.cerner.com/aeon-womenshealth/partogram-js/blob/master/src/components/labor-curve/FetalPositionSvgObject.js

Expected behavior
A clear and concise description of what you expected to happen.
Entire SVG icons should be selected including empty spaces inside SVG icons.

Screenshots
If applicable, add screenshots to help explain your problem.
Updated above

Desktop (please complete the following information):

  • OS: [e.g. iOS] - MAC and Windows
  • Browser [e.g. chrome, safari] - Cross browsers

Additional context
Add any other context about the problem here.
If any additional information please feel to provide a comments.

@sdadn sdadn transferred this issue from cerner/carbon-graphs Dec 7, 2020
@sdadn sdadn added Feature New feature or request 📦 carbon-graphs labels Dec 7, 2020
@sdadn
Copy link
Contributor

sdadn commented Dec 7, 2020

This limitation is caused by click events being bound to the SVG element, which results in a pixel-perfect area that ignores transparency in a custom icon. After discussing with UX, we came to the conclusion that clicking SVG's can be improved by drawing a transparent circle and binding the click event to it. The SVG icon will then be drawn on top the circle for visuals. This change will only be done for gantt charts and will lay the groundwork for hover events in the future.

@mraplumb mraplumb added this to the 2021_H1 milestone Dec 8, 2020
@mjhenkes mjhenkes modified the milestones: 2021_H1, Backlog Jan 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature New feature or request 📦 carbon-graphs
Projects
None yet
Development

No branches or pull requests

4 participants