In cytoscape.js I can style nodes with
style: [
{
selector: 'node',
style: {
'content': 'data(id)',
}
},
When I change the content to 'content': 'data(id), data(id)'
, it just interprets it as a string.
Is it possible to handle the variables as variables instead of just a string?
Use a function:
content: function( ele ){ return 'foo' + ele.data('bar') + 'baz'; }