Skip to content

parseSpec and selection #240

Closed Answered by mingfang
rickiesmooth asked this question in Q&A
Dec 28, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

In your spec, filterBy: "$global" is correct.
But your params may not be.
Try removing options and use just params

and const globalSelection = vg.Selection.intersect();
needs $ like const $globalSelection = vg.Selection.intersect();.

Correction: The above is not true, $ is not needed. see comment below.

Here is a working example.
https://github.com/mingfang/mosaic-svelte/blob/master/src/routes/mosaic/%2Bpage.svelte#L35

I believe this is the relevant code
https://github.com/uwdata/mosaic/blob/main/packages/vgplot/src/spec/parse-spec.js#L374

IMO
I don't agree that we should be forced to use $ for selections.
Also the $ conflicts with Svelte's use of $.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jheer
Comment options

@mingfang
Comment options

@rickiesmooth
Comment options

Answer selected by rickiesmooth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants