Slide 13
Slide 13 text
html のサンプル(2)
var cy = cytoscape({
container: document.getElementById('cy'),
elements: [
{
data: {
id: "0",
label: "ACL“,
shape: "star"
},
group: "nodes",
},
{
data: {
id: "6",
label: "DB1_GroupA",
shape: "hexagon"
},
group: "nodes",
},
{
data: {
id: "6-0",
source: "6",
target: "0",
},
group: "edges",
},
],
style: [
{
selector: 'node',
style: {
'shape': 'data(shape)',
'background-color': '#666',
'content': 'data(label)',
'text-valign': 'center',
'color': 'white',
'text-outline-width': 2,
'text-outline-color': '#888',
}
},
{
selector: 'edge',
style: {
'curve-style': 'bezier',
'target-arrow-shape': 'triangle-backcurve',
}
},
]
});
var options = {
name: 'cose',
fit: true,
animate: false
};
cy.layout( options ).run();