Skip to content

Set width of categorical bars & boxes to category unit i.e. 1 #5072

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

Merged
merged 4 commits into from
Aug 18, 2020

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Aug 13, 2020

Fixes #5058 and fixes #1181 | Demo: before vs after

@plotly/plotly_js

@archmoj archmoj added bug something broken status: reviewable labels Aug 13, 2020
@alexcjohnson
Copy link
Collaborator

This is fine as a narrow fix for #5058; but I think considering #1181 (and boxes #4510) it may be both simpler and more general to always use an automatic spacing of one unit for bars or boxes on category axes. Maybe this is as simple as replacing the minDiff calculated in sieve.js with 1? (This is I believe the value we start with to determine widths, then we apply the grouping and gaps)

@nicolaskruchten
Copy link
Contributor

I also think I would favour a broader fix that covers box traces etc if possible and to resolve #1181 :)

@archmoj archmoj changed the title Fix missing category positions in overlay mode for bar-like traces Fix missing category positions in overlay mode for bar-like traces and box plots Aug 14, 2020
@archmoj archmoj changed the title Fix missing category positions in overlay mode for bar-like traces and box plots Set width of categorical bars & boxes to category unit i.e. 1 Aug 14, 2020
@archmoj archmoj requested a review from alexcjohnson August 18, 2020 00:39
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

Nice clean solution. Well done! 💃

@archmoj archmoj merged commit 3781f48 into master Aug 18, 2020
@archmoj archmoj deleted the fix5058-overlay-missing-category branch August 18, 2020 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
3 participants