Skip to content
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

Plotly widget not showing figure #308

Closed
vojtavozda opened this issue Aug 5, 2024 · 5 comments · Fixed by #310
Closed

Plotly widget not showing figure #308

vojtavozda opened this issue Aug 5, 2024 · 5 comments · Fixed by #310
Labels
bug Something isn't working

Comments

@vojtavozda
Copy link

I am trying to employ plotly but the widget which should show the figure gets stuck on a waiting animation.

My context file:

from damnit_ctx import Variable
import plotly.graph_objects as go

@Variable(title="Plotly")
def get_plotly(run):
    # Sample data
    x = [1, 2, 3, 4, 5]
    y = [10, 14, 12, 16, 15]
    
    # Create a scatter plot
    fig = go.Figure(data=go.Scatter(x=x, y=y, mode='markers'))
    
    # Add titles and labels
    fig.update_layout(
        title='Simple Scatter Plot',
        xaxis_title='X-Axis',
        yaxis_title='Y-Axis'
    )
    
    return fig

Created column and mouse-hover preview is quite promising:
image

But when I double-click on the cell, a new widget is opened but stucks on waiting animation. The app itself is working, I can close the widget, the waiting circle is spinning but the figure is never generated.
image

I am using Ubuntu, I tried several ways to open the gui: FastX in browser (Chrome, Firefox), ssh -X from terminal, as well as FastX app from https://confluence.desy.de/display/IS/FastX3_258905161.html. I tried also different figure settings all with the same result.

Thank you for your help

@tmichela
Copy link
Member

tmichela commented Aug 5, 2024

Hi,

Could you try setting the following environment variable before starting the gui:

export QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox
amore-proto gui

@vojtavozda
Copy link
Author

Great, thank you. Figures are now well generated.

It works great in a browser but for use in the desktop app this setings somehow ruins scale factor of the entire app (before -> now):
image

However, setting export QT_AUTO_SCREEN_SCALE_FACTOR=1 and restarting the app solved the issue.

@tmichela
Copy link
Member

tmichela commented Aug 6, 2024

Thanks for your feedback.
I'll just reopen the issue until we have it fixed.

@tmichela tmichela reopened this Aug 6, 2024
@tmichela tmichela added the bug Something isn't working label Aug 8, 2024
@tmichela
Copy link
Member

tmichela commented Aug 8, 2024

the desktop app this setings somehow ruins scale factor of the entire app

I could not reproduce this issue,
@vojtavozda what OS are you using, and where are you running the damnit gui (locally or on Maxwell)?

@vojtavozda
Copy link
Author

Ubuntu 24.04. When I ran the gui from the browser FastX or Maxwell via ssh -X [email protected] there was no scaling issue. But when I ran the app localy it was present. I got the app from here (StarNet_FastX3/client/3.3/FastX3-3.3.60.rhel7.x86_64.tar.gz)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants