@kanaries/graphic-walker 0.4.29 → 0.4.30
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
CHANGED
package/src/computation/index.ts
CHANGED
|
@@ -139,16 +139,32 @@ export const fieldStat = async (
|
|
|
139
139
|
query: [
|
|
140
140
|
{
|
|
141
141
|
op: 'aggregate',
|
|
142
|
-
groupBy: [],
|
|
142
|
+
groupBy: [field.fid],
|
|
143
143
|
measures: [
|
|
144
144
|
{
|
|
145
|
-
field:
|
|
146
|
-
agg: '
|
|
147
|
-
asFieldKey:
|
|
145
|
+
field: '*',
|
|
146
|
+
agg: 'count',
|
|
147
|
+
asFieldKey: COUNT_ID,
|
|
148
148
|
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
type: 'view',
|
|
155
|
+
query: [
|
|
156
|
+
{
|
|
157
|
+
op: 'aggregate',
|
|
158
|
+
groupBy: [],
|
|
159
|
+
measures: [
|
|
149
160
|
{
|
|
150
161
|
field: '*',
|
|
151
162
|
agg: 'count',
|
|
163
|
+
asFieldKey: TOTAL_DISTINCT_ID,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
field: COUNT_ID,
|
|
167
|
+
agg: 'sum',
|
|
152
168
|
asFieldKey: 'count',
|
|
153
169
|
},
|
|
154
170
|
],
|
|
@@ -295,7 +295,7 @@ const useVisualCount = (
|
|
|
295
295
|
if (!field.rule || (field.rule.type !== 'one of' && field.rule.type !== 'not in') || !metaData) return;
|
|
296
296
|
setSelectedValueSum(0);
|
|
297
297
|
onChange({
|
|
298
|
-
type:
|
|
298
|
+
type: currentCount === metaData.valuesMeta.distinctTotal ? 'one of' : 'not in',
|
|
299
299
|
value: new Set(),
|
|
300
300
|
});
|
|
301
301
|
}, [field.rule, onChange, metaData]);
|