diff --git a/Jakefile.js b/Jakefile.js index 4f210bf6..b2bf4433 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -46,7 +46,7 @@ task('timeline', function () { './src/component/itemset.js', './src/component/item/*.js', - './src/visualization/timeline.js', + './src/visualization/timeline/timeline.js', './lib/moment.js' ], @@ -84,7 +84,7 @@ task('timeline', function () { }); // copy examples - jake.cpR('./src/examples/timeline', './bin/timeline/examples/'); + jake.cpR('./src/visualization/timeline/examples', './bin/timeline/examples/'); console.log('created timeline library'); }); diff --git a/README.md b/README.md index 54e2c2ca..31aa1778 100644 --- a/README.md +++ b/README.md @@ -6,5 +6,97 @@ The library is designed to be easy to use, to handle large amounts of dynamic data, and to enable manipulation of the data. The library consists of Timeline, LineChart, LineChart3d, Graph, and Treegrid. -vis.js Library is part of [CHAP](http://chap.almende.com), +Vis.js Library is part of [CHAP](http://chap.almende.com), the Common Hybrid Agent Platform, developed by [Almende B.V](http://almende.com). + + +# Install + +Install via bower: + + bower install vis + +Or download the library from the github project: +[https://github.com/almende/vis.git](https://github.com/almende/vis.git). + + +# Load + + +To use a component, include the javascript and css file of the component +in your webpage. For example for the Timeline: + +```html + + +``` + +A timeline can be instantiated as: + +```js +var timeline = new Timeline(container, data, options); +``` + +Where `container` is an HTML element, `data` is an Array with data or a DataSet, +and `options` is an optional object with configuration options for the +component. + + +# Example + +A basic example on loading a Timeline is shown below. More examples can be +found in the examples directories of each component. + +```html + + + + Timeline basic demo + + + + + + +
+ + + + +``` + + +# Build + +To build the library from source, clone the project from github + + git clone git://github.com/almende/vis.git + +The project uses [jake](https://github.com/mde/jake) as build tool. +To be able to run jake from the command line, jake must be installed globally: + + sudo npm install -g jake + +Then, the project can be build by executing jake in the root of the project: + + cd vis + jake + +This will build the library for each of the components. The built libraries can +be found in the directory `bin`, and includes examples. diff --git a/bin/timeline/examples/01_basic.html b/bin/timeline/examples/01_basic.html new file mode 100644 index 00000000..0633d7b6 --- /dev/null +++ b/bin/timeline/examples/01_basic.html @@ -0,0 +1,31 @@ + + + + Timeline basic demo + + + + + + +
+ + + + \ No newline at end of file diff --git a/bin/timeline/examples/01_basics.html b/bin/timeline/examples/02_dataset.html similarity index 100% rename from bin/timeline/examples/01_basics.html rename to bin/timeline/examples/02_dataset.html diff --git a/bin/timeline/timeline.js b/bin/timeline/timeline.js index 59966ac1..8ef30835 100644 --- a/bin/timeline/timeline.js +++ b/bin/timeline/timeline.js @@ -4,7 +4,7 @@ * * A dynamic, browser-based visualization library. * - * @version 3.0.0-SNAPSHOT + * @version 0.0.1 * @date 2013-04-16 * * @license diff --git a/bin/timeline/timeline.min.js b/bin/timeline/timeline.min.js index 3775617a..4891053e 100644 --- a/bin/timeline/timeline.min.js +++ b/bin/timeline/timeline.min.js @@ -4,7 +4,7 @@ * * A dynamic, browser-based visualization library. * - * @version 3.0.0-SNAPSHOT + * @version 0.0.1 * @date 2013-04-16 * * @license diff --git a/package.json b/package.json index 7c3846c8..deb0be4b 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,23 @@ { "name": "vis", - "version": "3.0.0-SNAPSHOT", + "version": "0.0.1", "description": "A dynamic, browser-based visualization library.", - "homepage": "https://github.com/almende/vis", + "homepage": "http://visjs.org/", "repository": { "type": "git", "url": "git://github.com/almende/vis.git" }, "keywords": [ + "vis", "visualization", "web based", "browser based", + "javascript", "chart", "linechart", "timeline", "graph", "network", - "javascript", "browser" ], "dependencies": {}, diff --git a/src/visualization/timeline/examples/01_basic.html b/src/visualization/timeline/examples/01_basic.html new file mode 100644 index 00000000..0633d7b6 --- /dev/null +++ b/src/visualization/timeline/examples/01_basic.html @@ -0,0 +1,31 @@ + + + + Timeline basic demo + + + + + + +
+ + + + \ No newline at end of file diff --git a/src/examples/timeline/01_basics.html b/src/visualization/timeline/examples/02_dataset.html similarity index 100% rename from src/examples/timeline/01_basics.html rename to src/visualization/timeline/examples/02_dataset.html diff --git a/src/visualization/timeline.js b/src/visualization/timeline/timeline.js similarity index 100% rename from src/visualization/timeline.js rename to src/visualization/timeline/timeline.js diff --git a/test/timeline.html b/test/timeline.html index e3fee0a7..49c62de4 100644 --- a/test/timeline.html +++ b/test/timeline.html @@ -19,7 +19,7 @@ - +