-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
[BUG] FigureResampler show_dash in JupyterLab fails to display plot #265
Comments
Hi @miloaissatu, First and foremost, thank you so much for providing a highly detailed description of this issue! π€ I suppose, as how you've described this issue, that by adding the "show_dash_kwargs" and "init_dash_kwargs" variables to the However, as I do not have a K8s jupyterhub test setup (and I guess it will take me quite some time to get this set up), I would highly appreciate it if you could aid me in providing (i) some documentation and/or (ii) an "JupyterHubFigureResampler" subclass for this environment. Kind regards, |
"'JupyterHubFigureResampler' subclass for this environment." I'm not quite sure what this entails, could you elaborate? :) in terms of documentation, went and did abit more digging and these are relevant
|
* π adding init kwargs to show dash - fix for #265 * π retain show_dash kwargs in constructor These can be of special interest for the register_plotly_resampler method * π adding init kwargs to show dash - fix for #265 * π retain show_dash kwargs in constructor These can be of special interest for the register_plotly_resampler method * π§Ή fix linting issue * ποΈ write docs * π§Ή * π linting --------- Co-authored-by: Jeroen Van Der Donckt <18898740+jvdd@users.noreply.github.com> Co-authored-by: Jeroen Van Der Donckt <boebievdd@gmail.com>
Describe the bug ποΈ
Plotly-resampler figureresampler fails to load dash figures in a jupyterhub+jupyterlab on kubernetes (i.e. z2jh) environment. With jupyterhub on kubernetes, user notebook servers are spawned as pods and user access to those servers are proxied via jupyterhub.
Dash requires requests_pathname_prefix on init() and jupyter_server_url on run for it to display inline or provide correct link for external display.
show_dash_kwargs
is only passed to dash on run() and not init() so end result is it doesn't work.Reproducing the bug π
Snippet taken from plotly_resampler_basic_example.ipynb, main difference is adding extra dash kwargs for it to work in jupyterhub+jupyterlab on kubernetes behind jupyterhub proxy.
Expected behavior π§
Ability to pass kwargs to dash.Dash() init() and run() so that plot can display correctly in 'inline' or 'external' modes.
See workaround section for suggestion.
Screenshots πΈ
Without workaround
With workaround/suggested solution
Environment information: (please complete the following information)
Workaround / Solution
Allow passing through kwargs to dash init.
Replace
app = dash.Dash("local_app")
withapp = dash.Dash("local_app",**self._show_dash_kwargs)
inplotly_resampler/figure_resampler/figure_resampler.py
Example one liner sed to do code replacement
Might be cleaner to have a dash_kwargs in addition to show_dash kwargs though.
Additional context
Side note, I can't get other modes to work
The text was updated successfully, but these errors were encountered: