@uwdata/mosaic-plot 0.14.1 → 0.16.1
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 +5 -6
- package/src/marks/Grid2DMark.js +2 -1
- package/src/marks/Mark.js +8 -11
- package/dist/mosaic-plot.js +0 -34603
- package/dist/mosaic-plot.min.js +0 -60
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uwdata/mosaic-plot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "A Mosaic-powered plotting framework based on Observable Plot.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data",
|
|
@@ -26,10 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@observablehq/plot": "^0.6.17",
|
|
29
|
-
"@uwdata/mosaic-core": "^0.
|
|
30
|
-
"@uwdata/mosaic-sql": "^0.
|
|
31
|
-
"d3": "^7.9.0"
|
|
32
|
-
"isoformat": "^0.2.1"
|
|
29
|
+
"@uwdata/mosaic-core": "^0.16.1",
|
|
30
|
+
"@uwdata/mosaic-sql": "^0.16.1",
|
|
31
|
+
"d3": "^7.9.0"
|
|
33
32
|
},
|
|
34
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "e12af9927b0a35a0e3194850ef569d0d24a022ce"
|
|
35
34
|
}
|
package/src/marks/Grid2DMark.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/** @import { ExprNode } from '@uwdata/mosaic-sql' */
|
|
1
2
|
import { interpolatorBarycentric, interpolateNearest, interpolatorRandomWalk } from '@observablehq/plot';
|
|
2
3
|
import { toDataColumns } from '@uwdata/mosaic-core';
|
|
3
|
-
import {
|
|
4
|
+
import { Query, bin2d, binLinear2d, collectColumns, count, isAggregateExpression, isBetween, lt, lte, sum } from '@uwdata/mosaic-sql';
|
|
4
5
|
import { Transient } from '../symbols.js';
|
|
5
6
|
import { binExpr } from './util/bin-expr.js';
|
|
6
7
|
import { dericheConfig, dericheConv2d } from './util/density.js';
|
package/src/marks/Mark.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
/** @import { SelectQuery } from '@uwdata/mosaic-sql' */
|
|
2
|
+
import { isParam, MosaicClient, queryFieldInfo, toDataColumns } from '@uwdata/mosaic-core';
|
|
3
|
+
import { Query, collectParams, column, isAggregateExpression, isColumnParam, isColumnRef, isNode, isParamLike } from '@uwdata/mosaic-sql';
|
|
3
4
|
import { isColor } from './util/is-color.js';
|
|
4
5
|
import { isConstantOption } from './util/is-constant-option.js';
|
|
5
6
|
import { isSymbol } from './util/is-symbol.js';
|
|
@@ -121,7 +122,7 @@ export class Mark extends MosaicClient {
|
|
|
121
122
|
return c?.field ? c : null;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
|
|
125
|
+
async prepare() {
|
|
125
126
|
if (this.hasOwnData()) return null;
|
|
126
127
|
|
|
127
128
|
const { channels, reqs } = this;
|
|
@@ -136,14 +137,11 @@ export class Mark extends MosaicClient {
|
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
const table = this.sourceTable();
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
column: c,
|
|
142
|
-
|
|
143
|
-
}));
|
|
144
|
-
}
|
|
140
|
+
const info = await queryFieldInfo(
|
|
141
|
+
this.coordinator,
|
|
142
|
+
Array.from(fields, ([c, s]) => ({ table, column: c, stats: Array.from(s) }))
|
|
143
|
+
);
|
|
145
144
|
|
|
146
|
-
fieldInfo(info) {
|
|
147
145
|
const lookup = Object.fromEntries(info.map(x => [x.column, x]));
|
|
148
146
|
for (const entry of this.channels) {
|
|
149
147
|
const { field } = entry;
|
|
@@ -152,7 +150,6 @@ export class Mark extends MosaicClient {
|
|
|
152
150
|
}
|
|
153
151
|
}
|
|
154
152
|
this._fieldInfo = true;
|
|
155
|
-
return this;
|
|
156
153
|
}
|
|
157
154
|
|
|
158
155
|
/**
|