Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add a new line to jquery flot ticks

I am using JQuery Flot to create some graphs. So far I have managed to format my Ticks using tickformatter

The graph looks like this: http://i1358.photobucket.com/albums/q779/Angel_Ruiz_Morales/Capture.gif

The only problem I am having now is that I would like the Ticks to appear as follows: Today\n{TIME}

I have tried adding \n character and see it appended but for some reason flot still displays Today {TIME} inline rather than on separate lines.

Does any one know a way to introduce a new line ?

Thanks!

like image 547
Angel Avatar asked Dec 12 '12 20:12

Angel


1 Answers

You need to use a <br> instead of \n. The tick labels are HTML.

like image 129
Ryley Avatar answered Oct 22 '22 05:10

Ryley