|
@ -14,16 +14,18 @@ |
|
|
background: #d1d1d1; |
|
|
background: #d1d1d1; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head> |
|
|
|
|
|
|
|
|
<script src="../googleAnalytics.js"></script> |
|
|
|
|
|
</head> |
|
|
|
|
|
|
|
|
<body> |
|
|
<body> |
|
|
|
|
|
<p>The font, size, and stroke of labels is fully customizable.</p> |
|
|
|
|
|
|
|
|
<div id="mynetwork"></div> |
|
|
<div id="mynetwork"></div> |
|
|
|
|
|
|
|
|
<script type="text/javascript"> |
|
|
<script type="text/javascript"> |
|
|
// create an array with nodes |
|
|
// create an array with nodes |
|
|
var nodes = [ |
|
|
var nodes = [ |
|
|
{id: 1, label: 'Node 1', fontStrokeWidth : 5, fontStrokeColor: 'white'}, |
|
|
|
|
|
|
|
|
{id: 1, label: 'Node 1', font: {stroke: 5, strokeColor: 'white'}}, |
|
|
{id: 2, label: 'Node 2'}, |
|
|
{id: 2, label: 'Node 2'}, |
|
|
{id: 3, label: 'Node 3'}, |
|
|
{id: 3, label: 'Node 3'}, |
|
|
{id: 4, label: 'Node 4'}, |
|
|
{id: 4, label: 'Node 4'}, |
|
@ -32,7 +34,7 @@ |
|
|
|
|
|
|
|
|
// create an array with edges |
|
|
// create an array with edges |
|
|
var edges = [ |
|
|
var edges = [ |
|
|
{from: 1, to: 2, label: 'edgeLabel', fontStrokeWidth : 2, fontStrokeColor : '#00ff00'}, |
|
|
|
|
|
|
|
|
{from: 1, to: 2, label: 'edgeLabel', font: {stroke: 2, strokeColor : '#00ff00'}}, |
|
|
{from: 1, to: 3, label: 'edgeLabel'}, |
|
|
{from: 1, to: 3, label: 'edgeLabel'}, |
|
|
{from: 2, to: 4}, |
|
|
{from: 2, to: 4}, |
|
|
{from: 2, to: 5} |
|
|
{from: 2, to: 5} |
|
@ -46,14 +48,18 @@ |
|
|
}; |
|
|
}; |
|
|
var options = { |
|
|
var options = { |
|
|
nodes : { |
|
|
nodes : { |
|
|
shape : 'dot', |
|
|
|
|
|
fontStrokeWidth : 1, |
|
|
|
|
|
fontStrokeColor : '#d1d1d1' |
|
|
|
|
|
|
|
|
shape: 'dot', |
|
|
|
|
|
font: { |
|
|
|
|
|
stroke: 1, |
|
|
|
|
|
strokeColor: '#d1d1d1' |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
edges : { |
|
|
|
|
|
fontStrokeWidth : 1, |
|
|
|
|
|
fontStrokeColor : '#d1d1d1', |
|
|
|
|
|
fontFill : 'none' |
|
|
|
|
|
|
|
|
edges: { |
|
|
|
|
|
font: { |
|
|
|
|
|
stroke: 1, |
|
|
|
|
|
strokeColor: '#d1d1d1', |
|
|
|
|
|
//fill: 'none' // TODO: what is the replacement for fill? |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
var network = new vis.Network(container, data, options); |
|
|
var network = new vis.Network(container, data, options); |
|
|