-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvoyager.js
More file actions
38 lines (28 loc) · 1.07 KB
/
voyager.js
File metadata and controls
38 lines (28 loc) · 1.07 KB
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
/** https://github.com/vega/voyager#example-use */
class VoyagerView extends NView {
constructor() {
super();
}
build(me, target) {
target.html('Loading...');
LazyLoad.js('lib/voyager/build/lib-voyager.js', ()=>{
LazyLoad.css('lib/voyager/build/style.css');
const v = voyager.CreateVoyager(target[0]);
target.css({
//overrides
fontSize: 'auto'
});
target.find('header').hide();
v.updateConfig({
showDataSourceSelector: false
}); //HACK should have been taken by constructor
v.updateData({
"values": [
{"fieldA": "A", "fieldB": 28}, {"fieldA": "B", "fieldB": 55}, {"fieldA": "C", "fieldB": 43},
{"fieldA": "D", "fieldB": 91}, {"fieldA": "E", "fieldB": 81}, {"fieldA": "F", "fieldB": 53},
{"fieldA": "G", "fieldB": 19}, {"fieldA": "H", "fieldB": 87}, {"fieldA": "I", "fieldB": 52}
]
});
});
}
}