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

bars gaps and spaces #350

Open
AlonaNadler opened this issue Aug 26, 2019 · 8 comments
Open

bars gaps and spaces #350

AlonaNadler opened this issue Aug 26, 2019 · 8 comments
Labels
:data Data/series/scales related issue enhancement New feature or request :styling Styling related issue :xy Bar/Line/Area chart related

Comments

@AlonaNadler
Copy link

AlonaNadler commented Aug 26, 2019

When you split series in a not stacked chart there are gaps and spaces between the bars, which makes the chart looks bad visually and also the gaps cannot be explained

image

it appears the chart is "saving" space for certain values. In high cardinality data, the top values can be completely different between the x-axis values. so for example in the example above maybe

It would be good the not have these gaps between the bars and reserved the number of places based on the size of the split series, which any value/color can be within them

cc: @flash1293

@AlonaNadler AlonaNadler added the bug Something isn't working label Aug 26, 2019
@nickofthyme
Copy link
Collaborator

Thanks for bringing this up. This functionality is by design as each x-Axis ordinal value (i.e. gz, zip, css, etc.) will save room for each of the 12 series in the legend. The spaces represent a null, 0 (zero) or relatively small value for a given series.

That said we are always eager to make enhancements that will promote readability and reduce noise.

Are you proposing that we collapse the spaces where there is no value to show?

@nickofthyme nickofthyme added enhancement New feature or request and removed bug Something isn't working labels Aug 26, 2019
@flash1293
Copy link

It feels like there are use cases for both, if you have a low number of series, reserving space for a "zero" value is probably the more readable option, for a high number of series efficiently using the space might make more sense. Maybe a setting on the series spec component?

@nickofthyme
Copy link
Collaborator

@flash1293 Great idea I was thinking something similar

@AlonaNadler
Copy link
Author

AlonaNadler commented Sep 9, 2019

This functionality is by design as each x-Axis ordinal value (i.e. gz, zip, css, etc.) will save room for each of the 12 series in the legend. The spaces represent a null, 0 (zero) or relatively small value for a given series.

What if the field we do the split series is IP (which is high cardinality)? IP can have ten thousand of different Ips. The approach of "saving" spaces for dedicated values will be challenging when it comes to really data were there are more than 5 values

image

@nickofthyme
Copy link
Collaborator

@AlonaNadler Ya I can see the use case. I talked with @markov00 and @monfera about how to approach this. We will prioritize accordingly.

@markov00 markov00 added :styling Styling related issue :xy Bar/Line/Area chart related :data Data/series/scales related issue labels Mar 26, 2020
@markov00 markov00 added the needs design A design pass is required and not available label Apr 3, 2024
@markov00
Copy link
Member

markov00 commented Apr 3, 2024

hey @gvnmagni it will be great if you can provide your input here: what we have is "hierarchical" categorical bar chart where each main category has its own group of bars. In some cases some bars are missing (no data/no value).
What should we do: always consider each main category with all the available sub-categories (having these empty spaces around) or should we just keep the same order of the subcategories but we can put each sub-categories side-by-side without the need to respect the position of missing sub-categories?

The same principle should/could be applied to small multiples.

@gvnmagni
Copy link

gvnmagni commented Apr 4, 2024

I would discern the grouped bars from the small multiple concept. In grouped bars, I think that it probably makes sense to collapse all bars together, especially when we have a lot of them, and it is probably a good idea to choose a number of categories that when exceeded makes those bars to get closer to each other. Five? six? I don't have a specific number in mind, we can try with five and see how it behaves.

In the case of small multiples I am a little reluctant though, since the whole concept of the small multiple is to create identical charts that differ only from the main subject but that lives on the same identical structure. The main goal is comparison and we might lose that if we fill those empty spaces. In that case it's probably better, from my point of view, to leave empty spaces as they are

@markov00 markov00 removed the needs design A design pass is required and not available label Apr 8, 2024
@nickofthyme
Copy link
Collaborator

Another use case I saw today, related to mutual exclusivity of series to each bucket.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:data Data/series/scales related issue enhancement New feature or request :styling Styling related issue :xy Bar/Line/Area chart related
Projects
None yet
Development

No branches or pull requests

5 participants