I would like to know how I can obtain HTML string from fdplotly() in Franklin.
This is because I what to put the HTML in an outer div so that I can create a tabular layout for plotly plots.
Imaginary code will look something like:
p = PlotlyJS.scatter()
html = fdplotly(json(p); return_as_string=true)
# maybe there must be an option to prevent fdplotly() from
# printing right away at this point and instead return HTML
# string so that user can put the result in a way he likes
println("""
~~~
<div style="display:flex; flex-wrap: wrap;">
$(html)
<div>
~~~
""")
but granted you might want to do something specific with the string, if you look at the code it should be pretty simple to build your own: this is the string I use in fdplotly:
whatever style I pass to fdplotly() is meant for that particular div that fdplotly() creates for me.
I wanted to put the auto generated div in an outer div that I define myself.
Let me try the second example; This approach is really great; I can control divs arbitrarily. Thank you again for your valuable suggestion.