-
Notifications
You must be signed in to change notification settings - Fork 0
/
example2.html
37 lines (36 loc) · 1.68 KB
/
example2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<html>
<head>
<title>Example 2 - SGvizler</title>
<a href="index.html" target="_blank">Example 1</a><br/>
<a href="example3.html" target="_blank">example 3</a><br/>
<a href="example4.html" target="_blank">example 4</a><br/>
<a href="example-jquery.html" target="_blank">Jquery example</a><br/>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="sgvizler.js"></script>
<script>
sgvizler
.prefix("ex", "http://example.org#")
.defaultEndpointURL("https://dbpedia.org/sparql")
.defaultQuery("SELECT * { ?a ?b ?c, ?d, ?e } LIMIT 7")
.defaultChartFunction("sgvizler.visualization.Table")
.defaultChartWidth(500)
.defaultChartHeight(500);
</script>
</head>
<body>
<h1>Sgvizler example 2</h1>
<p>Please allow the page to load for a few seconds.</p>
<script>
var Q = new sgvizler.Query(); // Create a Query instance.
// Values may also be set in the sgvizler object---but will be
// overwritten here.
Q.query("SELECT * {?s ?p ?o} LIMIT 10")
.endpointURL("https://dbpedia.org/sparql")
.endpointOutputFormat("json") // Possible values 'xml', 'json', 'jsonp'.
.chartFunction("google.visualization.Table") // The name of the function to draw the chart.
.draw("myElementID"); // Draw the chart in the designated HTML element.
</script>
<div id="myElementID"></div>
</body>
</html>