Adding new transforms is easy, but people should be able to self serve something like this:
from bokeh.models import CustomJSTransform
transform = CustomJSTransform.from_coffeescript(
compute="""return 2*x""",
v_compute="""
vals = []
for x in xs:
vals.push(2*x)
return vals
"""
)
.....
p.circle(x='x', y='y', size={field: 'x', transform: transform})
Just like #4659, user would know that single x is passed to compute and array xs is passed to v_compute. User would specify a return value and would also be able to pass in args - like for CustomJS.
Adding new transforms is easy, but people should be able to self serve something like this:
Just like #4659, user would know that single
xis passed to compute and arrayxsis passed to v_compute. User would specify a return value and would also be able to pass in args - like for CustomJS.