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

Not all bars in waterfall chart is focusable #16788

Closed
pvsleeper opened this issue Dec 15, 2021 · 3 comments · Fixed by #16975
Closed

Not all bars in waterfall chart is focusable #16788

pvsleeper opened this issue Dec 15, 2021 · 3 comments · Fixed by #16975

Comments

@pvsleeper
Copy link

Expected behaviour

All the bars in a waterfall chart should be focusable when a11y is enabled.

Actual behaviour

Certain bars in a waterfall chart are not focusable. This seems to happen when the bars have negative values but the axis doesn't have negative values.

Live demo with steps to reproduce

https://jsfiddle.net/oehu0tx6/24/

Product version

9.3.2

Affected browser(s)

Chrome, Egde

@highsoft-bot highsoft-bot added this to To do in Development-Flow Dec 15, 2021
@raf18seb
Copy link
Contributor

Hi @pvsleeper, thank you for reporting a bug.

@raf18seb raf18seb added a11y Accessibility related. Type: Bug labels Dec 15, 2021
@oysteinmoseng
Copy link
Member

Internal note: Happens because the waterfall point in question has point.isInside === false.

@raf18seb
Copy link
Contributor

raf18seb commented Dec 22, 2021

Thanks @oysteinmoseng for a clue!

Indeed, the isPoinsInside method is fired before the point.plotY is recalculated in the waterfall.prototype.translate method. Before recalculations, the original -438 value is taken but the waterfall's column obviously has different y and shapeArgs - that's why isPointInside method returns an incorrect statement.

When fixing: developer should investigate why isPointinside is fired before plotY recalculations - the order should be changed or the isInside flag should be recalculated again like in this workaround: https://jsfiddle.net/BlackLabel/s8w9uhze/

Tagging as a good exercise for beginners and not strictly related to accessibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

5 participants