question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bar graph width overlapping with size parameter

See original GitHub issue

I am trying to increase the width of the bar chart because the default one is too thin for my purposes. I passed size=25 but as you can see, it causes overlapping. Not really sure how to fix it without making the chart a giant mess.

bar_graph = alt.Chart(data).mark_bar(size=25).encode(
    x='is_missing:N',
    y='sum(count)',
    color=alt.Color('prim_code', sort=alt.SortField(op='sum', field='count'), legend=None)
)
bar_graph.encoding.x.title='Category'
bar_graph.encoding.y.title='Records'

bar_graph

visualization

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jakevdpcommented, Jan 5, 2021
1reaction
f0liecommented, Jul 27, 2018

I can do it, since I am the one that suggested it. lol

I’ll take the simple examples that exist, paste the Vega json and example what happened. I’ll sprinkle in my own examples like using alt.Y() to add titles since they are basically nested Json statements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple Width Overlapping Column Chart - Peltier Tech
You can overlap two sets of different-width bars in an Excel chart using primary and secondary axes. Here is how to overlap three...
Read more >
How do I change the size of the plot and prevent overlapping ...
First you can control the height of each horizontal bar with the height parameter. It defaults to .8 so try using a lower...
Read more >
Overlapping Bar Charts | CSS-Tricks
As the name suggests, overlapping charts visualize two different sets of data in a single diagram.
Read more >
Bar Charts Overlap When DateTime Fields Are Set to "Exact ...
When using a DateTime field set to "Exact Date", bar charts using the "Automatic" width size overlap. Environment. Tableau Desktop. Resolution.
Read more >
A Complete Guide to Stacked Bar Charts | Tutorial by Chartio
The main cell values indicate the length of each sub-bar in the plot. Bars are built across rows: when the stacked bar chart...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found