I have some cytoscape nodes with
style: cytoscape.stylesheet()
.selector('node')
.css({
'border-color': '#0266C8',
'border-width' : '1px',
'shape': 'data(faveShape)',
'width': '80px',
'font-family' : 'Consolas',
'font-size' : '10px',
'content': 'data(id)',
'text-valign': 'center',
'background-color': 'data(faveColor)',
'color': 'data(textColor)'
})
...
How can I have a content with two or more lines and 2 or more concatenated strings?
...
'content': 'data(id)' + '<br>' + data('name') + '<br>test123',
...
TIA
In your stylesheet:
text-wrap: wrap;
label: 'My multiline\nlabel';
See http://js.cytoscape.org/#style/labels
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With