label width
See original GitHub issueI haven’t figured out how to get my labels to fully print out. I’ve explored the altair documentation, the vega documentation, and the d3 documentation
https://github.com/d3/d3-format/blob/master/README.md#format says: “If not specified, then the width will be determined by the content.” So I guess my content is ellipsed? But the grantor dataframe definitely has every grant program name fully spelled-out.
grantor = pd.DataFrame(df['Name'].value_counts())
grantor.reset_index(inplace=True)
Chart(grantor).mark_bar().encode(y=Y('index', sort=SortField(field='Name', order='ascending'),
axis=Axis(title='Grant Program')), x='Name')
BTW, the oddball “Name” in the X axis is because I converted a series into value_counts which retained the “Name” name for the count column name.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How can I control the width of a label tag? - Stack Overflow
Inline elements (like SPAN, LABEL, etc.) are displayed so that their height and width are calculated by the browser based on their content....
Read more >How to Control the Width of the <label> Tag - W3docs
Since the tag is an inline element, using the width property won't have any effect. Here you can find some methods of adding...
Read more >Understanding Label Dimensions - Print.Save.Repeat.
Label Width : A label's width is the distance between each side of the label. Outer Diameter: The Outer Diameter of a label...
Read more >label width: 100px; : label « Form « HTML / CSS - Java2s.com
label width : 100px; : label « Form « HTML / CSS.
Read more >How to add Label width in Tkinter? - Tutorialspoint
The size of the label widget depends on a number of factors such as width, height, and Font-size of the Label text. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I wasn’t able to find
labelMaxLength
as a possible option. However,.configure_axis(labelLimit=1000)
seemed to work. Not sure what the recommended method is.I’m returning to this same chart four years later (a surprise when I was Googling for answers to come upon my own original question). I figured out a few updates, wanting to update the x label, and keep the wider Y-axis label.
I replaced this code:
With this, for the win:
(Not sure why I had to change the order to descending, but it worked.)
UPDATE: Oh, but now the ‘Grant Program’ Y axes label is sitting on top of the grant program names. Back to the drawing board.