Can I set the title with a newline in my Bar chart?


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Reggie on 8th July 2013
Is there a way to add a newline in the title for a bar chart?

I tried both an html <br> tag and \n. <br> was output and \n caused a blank page.

In other words, neither of these worked.

.Set('title', 'Line 1<br>Line 2')

.Set('title', 'Line 1 \n Line 2')

Thank you for taking the time to read this and any help you can offer.
Posted by RGraph support on 8th July 2013
Hi there,

You need to use \r\n - not just \n:

www.rgraph.net/fiddle/?viewall





Richard, RGraph support
Posted by Reggie on 9th July 2013
Richard, Thank you and thanks for the page that showed that I also had to add .Set('gutter.top', 50)

Great product. Easy to modify. Thanks!

Best Regards,
Reggie

Add a reply




« Back to message list