Hello again Yves,

You can add new lines to titles and labels by using \n in the text. BUT - 
you cannot (as far as I know) easily restyle it. What I did was copy your 
code and put it at http://brisray.com/test/yves.htm so I could see what I 
can do to help you. I also tidied up what I wrote before so there isn't so 
much CSS and clutter.

You see the bottom haxis title is now on two lines? That is done by adding 
\n to the text.

title: 'EUI (kBTU/ft squared) \n >> Uses more energy per ft2 >>',

in the haxis options.

When I tried doing that to the main title it did work but it used the title 
styling which not what I think you want. What I did then was remove the 
title and subtitle from the chart itself and used them separately. The 
problem with that is that there was a huge gap between that text and top of 
the chart.

There is a way around that though by using the chartArea options. Details 
about that are available in the documentation - 
https://developers.google.com/chart/interactive/docs/gallery/histogram#configuration-option
 
<https://developers.google.com/chart/interactive/docs/gallery/histogram#configuration-options>s
 
So I added

chartArea:{top:10} 

to your options to reduce the size of the gap.


WhiteHat on StackOverflow did come up with a way to insert a subtitle into 
the chart, but to me it seems a bit over-complicated for the result 
achieved - 
https://stackoverflow.com/questions/41893055/add-subtitle-in-areachart-in-google-chart

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/a2747754-8003-4a9e-99c7-cdf87d603020%40googlegroups.com.

Reply via email to