Open mhkeller opened 1 year ago
The docs for vl.color().condition() say:
vl.color().condition()
A field definition or one or more value definition(s) with a parameter predicate.
I'm trying to replicate the point_invalid_color using Vega Lite API and based on the language in the doc I would have thought I would do:
vl.color().condition( 'datum[\'IMDB Rating\'] === null || datum[\'Rotten Tomatoes Rating\'] === null', '#aaa' )
That compiles to:
"color": { "condition": [ "datum['IMDB Rating'] === null || datum['Rotten Tomatoes Rating'] === null" "#aaa" ] }
I have to do this instead:
vl.color().condition({ test: 'datum[\'IMDB Rating\'] === null || datum[\'Rotten Tomatoes Rating\'] === null', value: '#aaa' })
Is this the desired API? If so, I would expect the docs to describe an object with keys of test and value.
test
value
The docs for
vl.color().condition()
say:I'm trying to replicate the point_invalid_color using Vega Lite API and based on the language in the doc I would have thought I would do:
That compiles to:
I have to do this instead:
Is this the desired API? If so, I would expect the docs to describe an object with keys of
test
andvalue
.