Wrapping text of X-axis labels?

6,091 views
Skip to first unread message

Bryan Maloney

unread,
Aug 27, 2014, 9:59:11 AM8/27/14
to google-visua...@googlegroups.com

It is commonly done in data presentation to have X-axis labels that are horizontal but wrapped. That is, if ones label is the words "Missionary Generation", it could appear thus in the chart:



Missionary
Generation




How does one do this with Google charts?

Sergey Grabkovsky

unread,
Aug 27, 2014, 10:15:45 AM8/27/14
to google-visua...@googlegroups.com
Google Charts should do this automatically if your unwrapped text doesn't fit. Here's an example: http://jsfiddle.net/emena01o/

--
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-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Andrew Gallant

unread,
Aug 27, 2014, 8:11:40 PM8/27/14
to google-visua...@googlegroups.com
It does not wrap when the text is angled (http://jsfiddle.net/emena01o/2/), which is what is happening in Bryan's chart.

To get the labels to wrap, they have to be able to fit along the bottom of the chart in the wrapped state.  In your case, this requires some combination of expanding the width of the chart and/or reducing the size of the text.  Here's one way you could do it: http://jsfiddle.net/asgallant/s7040rms/17/


On Wednesday, August 27, 2014 10:15:45 AM UTC-4, Sergey wrote:
Google Charts should do this automatically if your unwrapped text doesn't fit. Here's an example: http://jsfiddle.net/emena01o/

On Wed Aug 27 2014 at 9:59:13 AM Bryan Maloney <maloneyw...@gmail.com> wrote:

It is commonly done in data presentation to have X-axis labels that are horizontal but wrapped. That is, if ones label is the words "Missionary Generation", it could appear thus in the chart:



Missionary
Generation




How does one do this with Google charts?

--
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-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages