javascript - vis.js create title with multiple lines -
is there way create multiple line title nodes in "vis.js" library?
i tried string "hello \n hi" title not work.
if have super long title, rendered 1 super long line (with or without \n in it) current effect
in project, load nodes , call function converts labels correct format
// here data passed controller var network_nodes = json.parse(document.getelementbyid("network_nodes").innertext); nodes = new vis.dataset(setlabels()); // wanted separate label every word can put here label-formating function function setlabels() { network_nodes.foreach(function(node){ node.label = node.label.split(" ").join("\n"); }); return network_nodes; };
Comments
Post a Comment