New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending jslink? #1109
Comments
We were thinking of having a js container run an arbitrary js transformation specified in a third |
Been discussing with @SylvainCorlay about transformations, jsdlink((slider1, 'index'), (floattext, 'value'), transformation='log(value)') We probably don't want to use eval, so that leave us to choose a library for parsing that: Another option I would like to see, is sth similar, but instead of a math transformation, it's is a non-linear mapping, but an option from say a dict: animation_delay_toggle_button = widgets.ToggleButtons(
options=['None', 'Fast, 'Regular', 'Slow'],
description='Delay:',
)
jsdlink((animation_delay_toggle_button, 'index'), (figure, 'animation_delay'), \
choice={0:0, 1:100, 2:500, 3:1000}) Using a dict it would also be possible to map strings to values. Having this in jslink would also be nice, but lets wait the discussion/PR here |
Hi, sorry for digging up this topic, but I stumbled upon it when i searched for linking between a checkbox and a stack Do you know if there have been some work on extending jslink, especially with the dict mapping ? I know I can use the For now I'm using ToggleButtons that have an index that I can link with my stack, but having a selector only for 2 values is a bit overkill in my case. |
jslink is really useful for having some frontend only communication, however there are more use cases I can think of that would be useful. I wonder if some thought went already into this, if not maybe it is useful to discuss some use cases that could be implemented simply.
jslinkf((widget1, 'value', 'Math.log(value)'), (widget2, 'value', 'Math.exp(value)'
.index
to get the child from the list, and then assign it to a target.jslinkXXX((selector, 'index'), (some_widget, 'children'), (visible_panel_proxy, 'child'))
. I hope this example is clear.scatter.style
changes, you want to linkscatter.style["color"]
tobar.selected_style["color"]
, e.g.jslinkYYY((scatter, 'style', 'color'), (bar, 'selected_style', 'color'))
.The text was updated successfully, but these errors were encountered: