-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (54 loc) · 1.7 KB
/
index.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html>
<head>
<title>HDX Quick Charts Sandbox</title>
<link rel="stylesheet" href="style.css"/>
<meta charset="utf-8"/>
</head>
<body>
<header>
<h1>HDX Quick Charts Sandbox</h1>
<p>
Use this sandbox to experiment with writing your own bites
for HDX Quick Charts. (Recommend opening a JavaScript console to
see error messages from Quick Charts; you may need to disable ad
blockers.)
</p>
</header>
<main>
<section id="config">
<form>
<label>
<span>Source URL for HXL-tagged data [<a
href="http://hxlstandard.org">?</a>]</span>
<input id="url" name="url" type="url" value="https://data.humdata.org/dataset/mozambique-cyclone-kenneth-3w-4w"/>
</label>
<label>
<span>JSON bite [<a href="https://humanitarian.atlassian.net/wiki/display/HDX/Quick+Charts+JSON+formats">?</a>]</span>
<textarea id="bite" name="bite" type="json">{
"title": "Organisations",
"type":"key figure",
"ingredient": {
"aggregateColumn": null,
"valueColumn": "#org",
"aggregateFunction": "distinct-count"
},
"unit": "orgs",
"numberFormat": "us"
}</textarea>
</label>
<div id="bite-editor"></div>
<button type="submit">Update</button>
</form>
</section>
<section id="preview">
<iframe id="chart" src=""></iframe>
</section>
</main>
<footer id="embed">
<p><b>Embed URL:</b> <a id="embed-url"></a></p>
</footer>
<script type="text/javascript" src="lib/ace/ace.js"></script>
<script type="text/javascript" src="script.js"></script>
</body>
</html>