-
-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathgetValueCounts.js
More file actions
46 lines (42 loc) · 1.4 KB
/
Copy pathgetValueCounts.js
File metadata and controls
46 lines (42 loc) · 1.4 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
39
40
41
42
43
44
45
46
/*
* Project Name : Visual Python
* Description : GUI-based Python code generator
* File Name : getValueCounts.js
* Author : Black Logic
* Note : Library Component
* License : GNU GPLv3 with Visual Python special exception
* Date : 2021. 11. 18
* Change Date :
*/
//============================================================================
// [CLASS] ValueCounts
//============================================================================
define([
'vp_base/js/com/component/LibraryComponent',
'vp_base/js/com/component/VarSelector'
], function(LibraryComponent, VarSelector) {
/**
* ValueCounts
*/
class ValueCounts extends LibraryComponent {
_init() {
super._init();
this.state = {
i0: '',
o0: '',
...this.state
}
}
render() {
super.render();
// add var selector
var varSelector = new VarSelector(['DataFrame', 'Series', 'Index'], 'DataFrame', false);
varSelector.setComponentId('i0');
varSelector.addClass('vp-state');
varSelector.setUseColumn(true);
varSelector.setValue(this.state.i0);
$(this.wrapSelector('#i0')).replaceWith(varSelector.render());
}
}
return ValueCounts;
});