Cytoscape.js JSON format is something like this :
var cy = cytoscape({
style: [
{
selector: 'node',
style: {
shape: 'hexagon',
'background-color': 'red',
label: 'data(id)'
}
}],
container: document.getElementById('cy'),
elements: [
{ data: { id: 'a' } },
{ data: { id: 'b' } },
{
data: {
id: 'ab',
source: 'a',
target: 'b',
}
}]
});
I have been able to generate elements
part myself, but I don't know how to generate other parts using C#. Should I do some kind of concatenation because other parts are not dynamic? If yes, how should I do that? Thanks.