-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Is there a way to export the dash layout as an html? #145
Comments
The Dash server sends the remote client a JSON serialised representation of the layout tree which is hydrated into HTML by React in the browser. It wouldn't take much to write an HTML export function for a Python layout tree consisting only of the HTML components, however the Dash core components correspond to Dash/React components so the potentially complex custom HTML generation logic for these is handled on the client side -- so server side HTML export doesn't really make sense. You can however open up the developer tools and copy the HTML contents of nodes in the DOM that you're after. |
You could also try to save the file in your browser as an HTML file. This isn't available programatically yet - we would need to somehow render the Dash app in the web browser and then download it (using electron or selenium) Also note that if you save the file this way as an HTML file, any of the interactivity in your code that use |
Ah yeah saving as HTML in browser works too. View source just shows the initial skeleton HTML so had assumed the same would apply to saving as HTML. |
any new features making the export as HTML possible? Looking to have a button to save as PDF. |
* refactor styling api * update table props * fix test regressions * remove column width/maxWidth/minWidth * fix lint in test * update test column widths api usage * update test column widths api usage * update test column widths api usage * fix tests * use snake case * styling examples * - improve discoverability (table, cells, headers, and cells_and_headers are top level props) - isolate conditionals in 'if' property - add style calc and apply for headers * fix visual regressions * revert visual test breaking change * update styling api usage * update copy/paste test * test delta * test delta * test delta * test delta * test delta * test delta * fix test regression * fix test regression * remove .only * update filtering interface to be more intuitive / flexible * styling refactoring - phase 2 - nomenclature stabilization - style filters * refactor dataframe -> data
* refactor styling api * update table props * fix test regressions * remove column width/maxWidth/minWidth * fix lint in test * update test column widths api usage * update test column widths api usage * update test column widths api usage * fix tests * use snake case * styling examples * - improve discoverability (table, cells, headers, and cells_and_headers are top level props) - isolate conditionals in 'if' property - add style calc and apply for headers * fix visual regressions * revert visual test breaking change * update styling api usage * update copy/paste test * test delta * test delta * test delta * test delta * test delta * test delta * fix test regression * fix test regression * remove .only * update filtering interface to be more intuitive / flexible * styling refactoring - phase 2 - nomenclature stabilization - style filters * refactor dataframe -> data
Is there a way to export the dash layout as an html?
I am familiar with:
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
...
app.run_server()
In order to render the html output in a browser. Is there a way to directly export the html output into a file? With plotly objects for example, I use,
plot(figure, output_type='div')
To export a single plot as a div. But I would like to combine plots and html components (text, list, etc..) into a single html.
The text was updated successfully, but these errors were encountered: