This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-22
Channels
- # announcements (2)
- # beginners (137)
- # chlorine-clover (13)
- # clj-kondo (3)
- # cljsrn (4)
- # clojure (52)
- # clojure-australia (3)
- # clojure-dev (2)
- # clojure-europe (34)
- # clojure-nl (1)
- # clojure-sg (3)
- # clojure-spec (1)
- # clojure-uk (12)
- # clojurescript (2)
- # clojureverse-ops (7)
- # code-reviews (3)
- # conjure (2)
- # cursive (18)
- # datavis (21)
- # datomic (34)
- # exercism (1)
- # figwheel-main (6)
- # graphql (3)
- # helix (21)
- # introduce-yourself (1)
- # jackdaw (1)
- # jobs (4)
- # jobs-discuss (32)
- # juxt (14)
- # leiningen (6)
- # lsp (35)
- # meander (19)
- # nrepl (2)
- # off-topic (37)
- # portal (40)
- # quil (5)
- # re-frame (45)
- # reagent (10)
- # releases (1)
- # remote-jobs (4)
- # reveal (15)
- # sci (7)
- # shadow-cljs (40)
- # spacemacs (3)
- # tools-build (2)
- # vim (17)
- # xtdb (11)
Hmm... wanna throw a spec up on a vega editor url?
Well, I guess I can just use that gist
@ben.sless Oh; This turns out to be a very simple mistake. You put the transform in the encoding specification. It should be at the top level (or on the layer specification if you have multiple layers).
You're quite welcome 🙂 I've been in the same place, so happy to help.
The problem with the schema it only tells me the path, not what the expected schema is
That would be fantastic! I've thought about translating into spec or something like malli. That would be fantastic.
Yeah; Might be appropriate as a separate project frankly. But absolutely seems doable.
This is really one of the big challenges of getting used to vega/vega-lite early on. It's takes time to get a deep intuitive sense of what goes where. You see code in one situation, and in adapting it's usually not immediately obvious which pieces need to go where.
I'll just say that this does get better over time.
However, it's worth pointing out that the vega-editor can often be super helpful. In this case, you'll notice in the logs that you get [Warning] transform-encoding is dropped as transform is not a valid encoding channel.
Also, [Warning] Validation: /encoding must NOT have additional properties of #/additionalProperties
I really should try to add some better debugging information like this to Oz. I'm actually not sure how to though; I don't know that it's code in the vega/vega-lite, but might be using their json-schema to produce this stuff.
Here's my edits; All I changed other than moving transform around was switching to {:filter {:param :selection}}
, but your expression approach should work as well (though I'm not sure if selection_rate
would be the right way to access the currently selected value or not; would have to look in to that).