|
1 |
| -# sgvizler |
2 |
| -js |
| 1 | +# Sgvizler |
| 2 | + |
| 3 | +Sgvizler is a javascript wrapper for easy visualisation of SPARQL result sets. |
| 4 | + |
| 5 | +See http://mgskjaeveland.github.io/sgvizler/ for how to set up, use, and extend Sgvizler, including documentation, downloads, and examples. |
| 6 | + |
| 7 | +Add visualisations directly into your webpages like this: |
| 8 | +```html |
| 9 | +<div id="example" |
| 10 | + data-sgvizler-endpoint="http://sws.ifi.uio.no/sparql/npd" |
| 11 | + data-sgvizler-query="SELECT ?class (count(?instance) AS ?noOfInstances) |
| 12 | + WHERE{ ?instance a ?class } |
| 13 | + GROUP BY ?class |
| 14 | + ORDER BY ?class" |
| 15 | + data-sgvizler-chart="google.visualization.PieChart" |
| 16 | + style="width:800px; height:400px;"></div> |
| 17 | +``` |
| 18 | +to get charts like this: |
| 19 | + |
| 20 | + |
| 21 | +## Installing Sgvizler : |
| 22 | + |
| 23 | +1. Install nodejs and necessary packages : |
| 24 | + |
| 25 | + i) Nodejs : "sudo apt install nodejs-legacy" |
| 26 | +(for Ubuntu 16.04 this installed version is not up to date, to get the last version : https://askubuntu.com/questions/786272/why-does-installing-node-6-x-on-ubuntu-16-04-actually-install-node-4-2-6) |
| 27 | + |
| 28 | + ii) "npm install -g npm" |
| 29 | + |
| 30 | + iii) Yuidocjs : "npm -g install yuidocjs." |
| 31 | + |
| 32 | + iv) "npm install uglify-js -g" |
| 33 | + |
| 34 | +2. "Compile" with makefile : |
| 35 | + |
| 36 | + i) Type : "yuidoc." at the source of the tree. |
| 37 | + This will generate a ./out directory |
| 38 | + |
| 39 | + ii) Being in ./sgvizler, type "make sgvizler.js" |
| 40 | + This will create all necessary files thanks to Makefile |
| 41 | + |
| 42 | + iii) Finally, type "uglifyjs sgvizler.js -o sgvizler.min.js" |
| 43 | + To get the minifier version of sgvizler.js |
0 commit comments