Skip to content

Barcharts small bar mouseover problem #389

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

bobular
Copy link
Member

@bobular bobular commented Aug 25, 2022

Loosely related to VEuPathDB/web-eda#1259

Just a draft at the moment, but we could merge, even if we don't find a solution.

I added a story to demonstrate.

I googled and tried a few things (including very large border widths) but nothing worked 😭

I commented on plotly/plotly.R#2114

@bobular bobular requested a review from moontrip August 25, 2022 11:43
Copy link
Contributor

@moontrip moontrip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested the story and confirmed the example that does not work for mouseover for small values

@bobular
Copy link
Member Author

bobular commented Aug 25, 2022

tested the story and confirmed the example that does not work for mouseover for small values

Thanks - I'll leave it here for a week or so and probably merge after next week's Wednesday meeting (and some discussion)

@moontrip
Copy link
Contributor

@bobular I think that if we adjust max range at dependent (y) axis range control, saying 100, then perhaps mouseover would work as small value bars are scaled up accordingly?

@bobular
Copy link
Member Author

bobular commented Aug 25, 2022

@bobular I think that if we adjust max range at dependent (y) axis range control, saying 100, then perhaps mouseover would work as small value bars are scaled up accordingly?

Yes, that would make the bar bigger and clickable. It's a workaround, just like switching on log scale.

Another possibility is to add a toggle switch to turn on/off displaying the values on the barchart. Both Barplot and Histogram have a showValues prop.

I just hacked this in browser dev tools (set showValues: true) and it looks quite good

image

Not sure where this toggle switch would live? y-axis section?

@bobular
Copy link
Member Author

bobular commented Aug 25, 2022

This needs some UX input I think. @danicahelb @SheenaTomko @nkittur-uga

@moontrip
Copy link
Contributor

moontrip commented Aug 25, 2022

@bobular I think that if we adjust max range at dependent (y) axis range control, saying 100, then perhaps mouseover would work as small value bars are scaled up accordingly?

Yes, that would make the bar bigger and clickable. It's a workaround, just like switching on log scale.

Another possibility is to add a toggle switch to turn on/off displaying the values on the barchart. Both Barplot and Histogram have a showValues prop.

I just hacked this in browser dev tools (set showValues: true) and it looks quite good

@bobular I like the idea to show values but isn't it troubled with overlay variable? (stacked in histogram and grouped in barplot) Perhaps showValues: false for overlay variable? 😃

@bobular
Copy link
Member Author

bobular commented Aug 25, 2022

It's a bit of a mess/misleading with an overlay, yes

image

@danicahelb
Copy link

@bobular I don't think i like the toggle to display values. we will likely add a toggle to add counts in each population and all of these different numbers will get very confusing!

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.

3 participants