-
Notifications
You must be signed in to change notification settings - Fork 1
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
How can I embed a chart in a custom html? #2
Comments
Hey @EderSantana, awesome to hear! Depending on how you are ingesting data, there are two ways to accomplish this:
With either strategy the actual embedding can be done in a few ways. See all the docs on this starting here: http://lightning-viz.org/usage/#iframes. The most straightforward is to use an iframe (or pym.js embed). Alternatively each chart has an endpoint (http:///visualizations//embed/) that will produce html that is conducive to just being embedded straight onto the page (no iframes). This is what we use to embed the charts in IPython for example. I'm just getting back from a short vacation, but I saw your message in the gitter channel as well. We don't support subplots at the moment, but this can be replicated through embedding. Having real subplot support would be awesome to add. If any of this doesn't make sense or needs clarification feel free to ask in gitter or on this thread. |
Thanks for the reply, @mathisonian My solution was similar to your 2º suggestion. I rendered the template with a python/Flask server. I've seen how you did it for ipython and just got the html. Later I had an API to send new numbers to the server, which would update the chart and send the new html using Server Sent Events to the browser. But something wrong is happening in this last step. Maybe SSE protocols converted something, but I couldn't update the html in the browser. When I tried to change the div's html, the chart just disappeared. The new html was there, but it didn't render the chart. So yeah, I'll keep investigating. Tkx for the help. |
I'm thinking about a way to create custom dashboards with lightning, do you have an example of how to bind the resulting chart to a div?
The text was updated successfully, but these errors were encountered: