@datagrok/api-samples 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/scripts/data-frame/construction/create-from-columns.js +1 -1
- package/scripts/data-frame/construction/create-from-csv.js +1 -1
- package/scripts/data-frame/construction/create-image-column.js +9 -0
- package/scripts/data-frame/metadata/dataframe-meta.js +6 -0
- package/scripts/grid/advanced/auto-size.js +7 -0
- package/scripts/ui/viewers/filters/add-single-filter.js +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/api-samples",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"friendlyName": "API Samples",
|
|
5
5
|
"description": "API Samples",
|
|
6
6
|
"repository": {
|
|
@@ -18,5 +18,6 @@
|
|
|
18
18
|
],
|
|
19
19
|
"canView": [
|
|
20
20
|
"All users"
|
|
21
|
-
]
|
|
21
|
+
],
|
|
22
|
+
"category": "Dev"
|
|
22
23
|
}
|
|
@@ -17,6 +17,6 @@ let t2 = DG.DataFrame.fromColumns([
|
|
|
17
17
|
DG.Column.fromStrings('countries', ['USA', 'Canada', 'Mexico']),
|
|
18
18
|
DG.Column.fromStrings('population', ['321', '35', '121']),
|
|
19
19
|
DG.Column.fromType(DG.COLUMN_TYPE.FLOAT, 'float', 3),
|
|
20
|
-
DG.Column.qnum('qnum', 3)
|
|
20
|
+
DG.Column.qnum('qnum', 3),
|
|
21
21
|
]);
|
|
22
22
|
grok.shell.addTableView(t2);
|
|
@@ -8,6 +8,6 @@ Honda, Accord, 6, 1.8, 20000
|
|
|
8
8
|
BMW, 328i, 4, 1.7, 60000
|
|
9
9
|
BMW, 535i, 6, 1.5, 35000
|
|
10
10
|
Tesla, Roadster, , 1.6, 100000
|
|
11
|
-
Tesla, Model S, , 1.6, 120000
|
|
11
|
+
Tesla, Model S, , 1.6, 120000`, {columnImportOptions: [{name: 'model', semType: 'carModel'}]}););
|
|
12
12
|
|
|
13
13
|
grok.shell.addTableView(table);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// tags: DataFrame, Column, construction
|
|
2
|
+
// Note that bytearray column is empty by default and cant be created so far with Column.fromList method
|
|
3
|
+
// double click on cell to insert image
|
|
4
|
+
|
|
5
|
+
let t = DG.DataFrame.fromColumns([
|
|
6
|
+
DG.Column.fromStrings('images', ['im1', 'im2', 'im3']),
|
|
7
|
+
DG.Column.fromType(DG.COLUMN_TYPE.BYTE_ARRAY, 'byte array col', 3),
|
|
8
|
+
]);
|
|
9
|
+
grok.shell.addTableView(t);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// adding the specified filter to the already existing filter group
|
|
2
|
+
|
|
3
|
+
let tv = grok.shell.addTableView(grok.data.demo.molecules());
|
|
4
|
+
let options = {
|
|
5
|
+
type: "Chem:substructureFilter",
|
|
6
|
+
column: "smiles",
|
|
7
|
+
columnName: "smiles"
|
|
8
|
+
};
|
|
9
|
+
tv.getFiltersGroup({createDefaultFilters: false}).add(options);
|