-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: Add iframe/widget endpoint for displaying widgets #4938
Conversation
- Opens widgets from plugins or any table just by name by adding the iframe/widget path - Exposed at `/iframe/widget` - Tested by running the following code to create a plotly-express widget and some tables: ``` import deephaven.plot.express as dx from deephaven import time_table import random import pandas as pd import deephaven.pandas as dhpd df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv') t = dhpd.to_table(df) sourceh = time_table("PT1S").update(formulas=[ "X = (int)random.uniform(0, 180) - 90", "Y = (int)random.uniform(0, 360) - 180", "Z = (float)random.gauss(30, 3)", "l1 = i % 20", "l2 = i % 30", ]) fig = dx.density_mapbox(t, lat='Latitude', lon='Longitude', z='Magnitude', radius=10, center=dict(lat=0, lon=180), zoom=0, mapbox_style="stamen-terrain") ``` - Then tested that each table/widget opened correctly by opening the following links: 1. plot.express: http://localhost:10000/iframe/widget/?name=fig 2. table: http://localhost:10000/iframe/widget/?name=t 3. Pandas data frame: http://localhost:10000/iframe/widget/?name=df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan to deprecate / remove /iframe/chart/
/ /iframe/table/
?
Need to add an example to the iframe documentation: https://deephaven.io/core/docs/how-to-guides/use-iframes/#display-tables-in-an-iframe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should deprecate the table and chart paths, but only once we have proper code splitting for bundle size based on what's loaded.
Labels indicate documentation is required. Issues for documentation have been opened: How-to: https://github.com/deephaven/deephaven.io/issues/3551 |
/iframe/widget