@uwdata/mosaic-plot 0.12.0 → 0.12.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/README.md +2 -0
- package/dist/mosaic-plot.js +6 -3
- package/dist/mosaic-plot.min.js +3 -3
- package/package.json +4 -4
- package/src/marks/HexbinMark.js +5 -2
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# mosaic-plot
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@uwdata/mosaic-plot)
|
|
4
|
+
|
|
3
5
|
A Mosaic-powered grammar of graphics based on [Observable Plot](https://github.com/observablehq/plot). Mmarks (plot layers) serve as individual Mosaic clients. These marks can push data processing (binning, hex binning, regression) and optimizations (such as M4 for line/area charts) down to the database. This package also provides interactors for linked selection, filtering, and highlighting using Mosaic Params and Selections.
|
|
4
6
|
|
|
5
7
|
The `mosaic-plot` package is included as part of the [vgplot](https://github.com/uwdata/mosaic/tree/main/packages/vgplot) API.
|
package/dist/mosaic-plot.js
CHANGED
|
@@ -7030,7 +7030,7 @@ function clausePoint(field3, value, {
|
|
|
7030
7030
|
source,
|
|
7031
7031
|
clients = source ? /* @__PURE__ */ new Set([source]) : void 0
|
|
7032
7032
|
}) {
|
|
7033
|
-
const predicate = value !== void 0 ?
|
|
7033
|
+
const predicate = value !== void 0 ? isIn(field3, [literal(value)]) : null;
|
|
7034
7034
|
return {
|
|
7035
7035
|
meta: { type: "point" },
|
|
7036
7036
|
source,
|
|
@@ -32811,13 +32811,16 @@ var HexbinMark = class extends Mark2 {
|
|
|
32811
32811
|
float642(x12),
|
|
32812
32812
|
div(add(mul(add(x3, mul(0.5, bitAnd(y3, 1))), dx), ox2), xr)
|
|
32813
32813
|
),
|
|
32814
|
-
[yc.as]: sub(
|
|
32814
|
+
[yc.as]: sub(
|
|
32815
|
+
float642(y22),
|
|
32816
|
+
div(add(mul(y3, dy), oy2), yr)
|
|
32817
|
+
),
|
|
32815
32818
|
...cols
|
|
32816
32819
|
}).groupby(x3, y3, ...dims).from(
|
|
32817
32820
|
// Subquery performs hex binning in screen space and also passes
|
|
32818
32821
|
// original columns through (the DB should optimize this).
|
|
32819
32822
|
Query.select({
|
|
32820
|
-
[py]: div(mul(yr, sub(
|
|
32823
|
+
[py]: div(sub(mul(yr, sub(y22, yc.field)), oy2), dy),
|
|
32821
32824
|
[pj]: int322(round(py)),
|
|
32822
32825
|
[px]: sub(
|
|
32823
32826
|
div(sub(mul(xr, sub(xc.field, x12)), ox2), dx),
|