Browse Source

Created an index page for the documentation, added another example

css_transitions
josdejong 11 years ago
parent
commit
aaff768118
4 changed files with 112 additions and 1 deletions
  1. +23
    -0
      docs/dataset.html
  2. +0
    -1
      docs/graph.html
  3. +29
    -0
      docs/index.html
  4. +60
    -0
      examples/graph/18_dashed_lines.html

+ 23
- 0
docs/dataset.html View File

@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
<title>vis.js | DataSet documentation</title>
<link rel='stylesheet' href='css/style.css' type='text/css' />
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<link href='css/style.css' type='text/css' rel='stylesheet'>
<script type="text/javascript" src="lib/prettify/prettify.js"></script>
</head>
<body>
<div id="container">
<h1>DataSet documentation</h1>
<p>coming soon...</p>
</div>
</body>
</html>

+ 0
- 1
docs/graph.html View File

@ -3,7 +3,6 @@
<head>
<title>vis.js | graph documentation</title>
<link rel='stylesheet' href='css/style.css' type='text/css' />
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<link href='css/style.css' type='text/css' rel='stylesheet'>

+ 29
- 0
docs/index.html View File

@ -0,0 +1,29 @@
<!doctype html>
<html>
<head>
<title>vis.js | documentation</title>
<link rel='stylesheet' href='css/style.css' type='text/css' />
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<link href='css/style.css' type='text/css' rel='stylesheet'>
<script type="text/javascript" src="lib/prettify/prettify.js"></script>
</head>
<body>
<div id="container">
<h1>vis.js documentation</h1>
<p>The following pages are available:</p>
<ul>
<li><a href="timeline.html">Timeline</a></li>
<li><a href="graph.html">Graph</a></li>
<li><a href="dataset.html">DataSet</a></li>
</ul>
</div>
</body>
</html>

+ 60
- 0
examples/graph/18_dashed_lines.html View File

@ -0,0 +1,60 @@
<!doctype html>
<html>
<head>
<title>Graph | Dashed lines</title>
<style type="text/css">
body {
font: 10pt sans;
}
</style>
<script type="text/javascript" src="../../vis.js"></script>
<script type="text/javascript">
// Called on page load
function draw() {
var nodes = [
{id: 1, text: "dashed\nline\nexamples"},
{id: 2, text: "default"},
{id: 3, text: "dashlength: 20\ndashgap: 20"},
{id: 4, text: "dashlength: 20\ndashgap: 5"},
{id: 5, text: "dashlength: 5\ndashgap: 20"},
{id: 6, text: "dashlength: 20\ndashgap: 5\naltdashlength: 5"}
];
var edges = [
{from: 1, to: 2, style: "dash-line"},
{from: 1, to: 3, style: "dash-line", dashlength: 20, dashgap: 20},
{from: 1, to: 4, style: "dash-line", dashlength: 20, dashgap: 5},
{from: 1, to: 5, style: "dash-line", dashlength: 5, dashgap: 20},
{from: 1, to: 6, style: "dash-line", dashlength: 20, dashgap: 5, altdashlength: 5}
];
// create the graph
var container = document.getElementById('mygraph');
var data = {
nodes: nodes,
edges: edges
};
var options = {
width: '600px',
height: '600px',
edges: {
length: 200
},
stabilize: false
};
var graph = new vis.Graph(container, data, options);
}
</script>
</head>
<body onload="draw();">
<p>
This example shows the different options for dashed lines.
</p>
<div id="mygraph"></div>
</body>
</html>

Loading…
Cancel
Save