|
@ -34,13 +34,14 @@ Or download the library from the github project: |
|
|
## Load |
|
|
## Load |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To use a component, include the javascript file of vis in your web page: |
|
|
|
|
|
|
|
|
To use a component, include the javascript and css files of vis in your web page: |
|
|
|
|
|
|
|
|
```html |
|
|
```html |
|
|
<!DOCTYPE HTML> |
|
|
<!DOCTYPE HTML> |
|
|
<html> |
|
|
<html> |
|
|
<head> |
|
|
<head> |
|
|
<script src="components/vis/vis.js"></script> |
|
|
|
|
|
|
|
|
<script src="components/vis/dist/vis.js"></script> |
|
|
|
|
|
<link href="components/vis/dist/vis.css" rel="stylesheet" type="text/css" /> |
|
|
</head> |
|
|
</head> |
|
|
<body> |
|
|
<body> |
|
|
<script type="text/javascript"> |
|
|
<script type="text/javascript"> |
|
@ -50,7 +51,7 @@ To use a component, include the javascript file of vis in your web page: |
|
|
</html> |
|
|
</html> |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
or load vis.js using require.js: |
|
|
|
|
|
|
|
|
or load vis.js using require.js. Note that vis.css must be loaded too. |
|
|
|
|
|
|
|
|
```js |
|
|
```js |
|
|
require.config({ |
|
|
require.config({ |
|
@ -86,7 +87,8 @@ of the project. |
|
|
<html> |
|
|
<html> |
|
|
<head> |
|
|
<head> |
|
|
<title>Timeline basic demo</title> |
|
|
<title>Timeline basic demo</title> |
|
|
<script src="components/vis/vis.js"></script> |
|
|
|
|
|
|
|
|
<script src="components/vis/dist/vis.js"></script> |
|
|
|
|
|
<link href="components/vis/dist/vis.css" rel="stylesheet" type="text/css" /> |
|
|
|
|
|
|
|
|
<style type="text/css"> |
|
|
<style type="text/css"> |
|
|
body, html { |
|
|
body, html { |
|
@ -139,6 +141,17 @@ Then, the project can be build running: |
|
|
npm run build |
|
|
npm run build |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Test |
|
|
|
|
|
|
|
|
|
|
|
To test teh library, install the project dependencies once: |
|
|
|
|
|
|
|
|
|
|
|
npm install |
|
|
|
|
|
|
|
|
|
|
|
Then run the tests: |
|
|
|
|
|
|
|
|
|
|
|
npm test |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## License |
|
|
## License |
|
|
|
|
|
|
|
|
Copyright (C) 2010-2013 Almende B.V. |
|
|
Copyright (C) 2010-2013 Almende B.V. |
|
|