@datagrok/compute 1.43.4 → 1.43.6
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/CHANGELOG.md +8 -0
- package/dist/148.js +1 -1
- package/dist/148.js.map +1 -1
- package/dist/377.js +2 -0
- package/dist/377.js.map +1 -0
- package/dist/44.js +2 -0
- package/dist/44.js.map +1 -0
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +2 -2
- package/src/outliers-selection/outliers-selection-viewer.ts +9 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/compute",
|
|
3
3
|
"friendlyName": "Compute",
|
|
4
|
-
"version": "1.43.
|
|
4
|
+
"version": "1.43.6",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Andrey Sharapov",
|
|
7
7
|
"email": "andrey.sharapov@softwarecountry.com"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"directory": "packages/Compute"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@datagrok-libraries/compute-utils": "^1.43.
|
|
16
|
+
"@datagrok-libraries/compute-utils": "^1.43.5",
|
|
17
17
|
"@datagrok-libraries/utils": "^4.5.7",
|
|
18
18
|
"cash-dom": "^8.1.5",
|
|
19
19
|
"datagrok-api": "^1.25.0",
|
|
@@ -34,7 +34,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
|
|
|
34
34
|
|
|
35
35
|
if (!inputData.columns.byName(IS_OUTLIER_COL_LABEL)) {
|
|
36
36
|
inputData.columns
|
|
37
|
-
.add(DG.Column.
|
|
37
|
+
.add(DG.Column.fromList(DG.TYPE.STRING, IS_OUTLIER_COL_LABEL, new Array(inputData.rowCount).fill('Inlier')));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
if (!inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL)) {
|
|
@@ -67,13 +67,16 @@ export class OutliersSelectionViewer extends DG.JsViewer {
|
|
|
67
67
|
const confirmOutliers = () => {
|
|
68
68
|
if (!groupsListGrid.dataFrame) return;
|
|
69
69
|
|
|
70
|
-
inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('
|
|
70
|
+
inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('Outlier', DG.MARKER_TYPE.OUTLIER);
|
|
71
|
+
inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('Last Inlier', DG.MARKER_TYPE.STAR);
|
|
72
|
+
inputData.col(IS_OUTLIER_COL_LABEL)?.meta.colors.setCategorical({'Outlier': DG.Color.scatterPlotMarker,
|
|
73
|
+
'Inlier': DG.Color.scatterPlotMarker, 'Last Inlier': DG.Color.red});
|
|
71
74
|
|
|
72
75
|
const newRationale =
|
|
73
76
|
groupsListGrid.dataFrame?.cell(groupsListGrid.dataFrame.rowCount-1, OUTLIER_RATIONALE_COL_LABEL).value;
|
|
74
77
|
|
|
75
78
|
inputData.selection.getSelectedIndexes().forEach((selectedIndex: number) => {
|
|
76
|
-
inputData.col(IS_OUTLIER_COL_LABEL)!.set(selectedIndex,
|
|
79
|
+
inputData.col(IS_OUTLIER_COL_LABEL)!.set(selectedIndex, 'Outlier', false);
|
|
77
80
|
inputData.col(OUTLIER_RATIONALE_COL_LABEL)!.set(
|
|
78
81
|
selectedIndex,
|
|
79
82
|
newRationale,
|
|
@@ -89,7 +92,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
|
|
|
89
92
|
const cancelOutliers = () => {
|
|
90
93
|
if (!groupsListGrid.dataFrame) return;
|
|
91
94
|
|
|
92
|
-
groupsListGrid.dataFrame.rows.removeAt(groupsListGrid.dataFrame.rowCount-1);
|
|
95
|
+
groupsListGrid.dataFrame.rows.removeAt(groupsListGrid.dataFrame.rowCount - 1);
|
|
93
96
|
inputData.selection.setAll(false);
|
|
94
97
|
|
|
95
98
|
$(getBalloonContainer()).empty();
|
|
@@ -113,7 +116,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
|
|
|
113
116
|
for (let i = 0; i < inputData.rowCount; i++) {
|
|
114
117
|
if (inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).get(i) === rationale) {
|
|
115
118
|
inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).set(i, '', false);
|
|
116
|
-
inputData.columns.byName(IS_OUTLIER_COL_LABEL).set(i,
|
|
119
|
+
inputData.columns.byName(IS_OUTLIER_COL_LABEL).set(i, 'Inlier', false);
|
|
117
120
|
}
|
|
118
121
|
}
|
|
119
122
|
inputData.fireValuesChanged();
|
|
@@ -153,7 +156,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
|
|
|
153
156
|
const updateGroupsDf = () => {
|
|
154
157
|
if ((inputData.columns as DG.ColumnList).byName(OUTLIER_RATIONALE_COL_LABEL)) {
|
|
155
158
|
for (let i = 0; i < inputData.rowCount; i++) {
|
|
156
|
-
if (inputData.columns.byName(IS_OUTLIER_COL_LABEL).get(i)) {
|
|
159
|
+
if (inputData.columns.byName(IS_OUTLIER_COL_LABEL).get(i) === 'Outlier') {
|
|
157
160
|
if (inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).get(i) === '')
|
|
158
161
|
(inputData.columns as DG.ColumnList).byName(OUTLIER_RATIONALE_COL_LABEL).set(i, 'Manual', false);
|
|
159
162
|
} else {
|