Search code examples
jqueryflottimeserieschart

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!


Solution

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