Skip to content

Commit 6bf516a

Browse files
committed
Merge branch 'master' into develop
2 parents 042c350 + cd1729e commit 6bf516a

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

README.md

+43-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,43 @@
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+
![pie chart](http://mgskjaeveland.github.io/sgvizler/image/gPieChart.png)
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

src/visualization/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
linkify = function (url, arraySyntax) {
2323
var prefixed = namespace.prefixify(url),
24-
base = namespace.getBaseURL,
24+
base = namespace.getBaseURL(),
2525
href = url, // the hyperlink.
2626
link, // what to click.
2727
result;

0 commit comments

Comments
 (0)