Google line chart h-Axis labels getting removed

32 views
Skip to first unread message

User 072319

unread,
Mar 20, 2020, 4:56:10 AM3/20/20
to Google Visualization API
Hi there,

I've a line chart with 3 lines where I'm displaying daily wise data. I'm displaying h-axis labels based on Month. Suppose I've data for 30-Nov-19 and 1-Dec-19. In this case when both labels are coming closer, the h-axis labels are getting removed/disappearing as the chart continues to draw. You can find my chart code here.

I'm including the chart images below.

chart1 (1).jpg


chart2.jpg


chart3.jpg


How can I set the minimum width for h-axis labels so that it won't get removed?

Can anyone help me to fix this? Thanks in advance

Daniel LaLiberte

unread,
Mar 20, 2020, 11:21:49 AM3/20/20
to Google Visualization API
When the chart can't squeeze your ticks in the available space, it just gives up and shows none.  So you have to give it more space.  I added slantedText: true and chartArea.bottom: 60 and it fits.  See  https://jsfiddle.net/fx3bpen6/

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/43ee7c07-3f0e-4854-8592-9549fb330f42%40googlegroups.com.


--
Message has been deleted

User 072319

unread,
Mar 23, 2020, 6:58:32 AM3/23/20
to Google Visualization API
Hello Daniel,

Thank you for the response. I'll try this out.

Thanks
Reply all
Reply to author
Forward
0 new messages