Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vis.js create title with multiple lines

Is there a way to create multiple line title for nodes in "vis.js" library?

I tried a string like "hello \n hi" as title but this does not work.

If I have a super long title, it will get be rendered as one super long line (with or without \n in it) current effect

like image 515
Ashley Liu Avatar asked Jul 17 '26 15:07

Ashley Liu


1 Answers

You have two options.

In your data obj, for your nodes.

data_obj["title"] = "<pre>1</pre><pre>2</pre>"

Or

data_obj["title"] ="1 </br> 2</br>"

Either will do the job.

like image 51
user3738936 Avatar answered Jul 20 '26 04:07

user3738936



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!