Hello,
I have uses a CustomJSTransform successfully to produce on-the-fly the values for the “size” of a scatter plot. Basically I am doing for size the same as what is done for y with the normalize used in this example.
However it seems a bit of an overkill to call in JS to just rescale some numbers. So I tried something like this with a lambda function.
p.scatter('x','y',
, size={"field":'rad', "transform": lambda x: x/10 }\
, source=visite\
, fill_alpha=0.15\
,fill_color={"field" :'fill_value', "transform" : color_mapper}\
, line_color='red')
Of course I got a Value Error because that lambda is not supported.
ValueError: expected an element of either String, Dict(Enum('expr', 'field', 'value', 'transform', 'units'), Either(String, Instance(Transform), Instance(Expression), Float)) or Float, got {'field': 'rad', 'transform': <function <lambda> at 0x7fd335d93b80>}
Am I just missing the syntax to use a lambda in the “transform” field or maybe I am the only one to feel the need for that?

