Skip to content
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

interpolation in slider definition #395

Closed
IgorDouven opened this issue Sep 9, 2020 · 1 comment
Closed

interpolation in slider definition #395

IgorDouven opened this issue Sep 9, 2020 · 1 comment

Comments

@IgorDouven
Copy link

Hi all,

First of all, many thanks for the great work on Pluto! It's wonderful!

I am defining a slider, as follows:

@bind step html"<input type='range' min='1' max='21' step='1' value='1'>"

which I then use as input in a plotting function.

That works fine. The problem is that the maximum depends on the outcome of the simulation I want to plot. So I would like to interpolate into the HTML code something like max = $length(simulation_results). That, of course, doesn't work. But I have not been able to figure out what does work. In any case, what I find on the Internet about interpolation into HTML strings doesn't appear to work.

I'd be grateful for any suggestions.

@IgorDouven
Copy link
Author

In the meantime, I discovered that the code I need is

@bind step Slider(1:length(simulation_results))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant