cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Plotly Express not rendering in Firefox but fine in Safari

Geophph
Visitor

Using a basic example of plotly express i see no output in firefox but is fine in Safari. Any ideas why this may occur?

 

 

import plotly.express as px
import pandas as pd

# Create a sample dataframe
df = pd.DataFrame({
'x': range(10),
'y': [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
})

# Create a scatter plot
fig = px.scatter(df, x='x', y='y', title='Sample Scatter Plot')

fig.show(renderer='databricks')

 

 

 

 

 

 
1 ACCEPTED SOLUTION

Accepted Solutions

parthSundarka
Databricks Employee
Databricks Employee

I can confirm that this re-rendering does happen. Initially, it is a black screen, but resizing the browser window renders the graph properly. I initially thought it was blank because of the window size and did not think of the re-render scenario. It happens with almost every graph type in Plotly, too.

Further, I tried it in the non-databricks environment on Firefox, and it seemed to be working. If you are looking for a fix for Firefox without having to resize, I suggest reaching out to Databricks Support so that they can reach out to the Engineering team and check on getting a fix for this as this is reproducible in all DBR versions.

The current Workaround would be to resize the window once the workflow is run to see the visualisation.

Do let me know if you have any queries. If not, can we mark this as an accepted solution?

View solution in original post

5 REPLIES 5

parthSundarka
Databricks Employee
Databricks Employee

Hi @Geophph ,

I tried to reproduce this quickly on Firefox and it seems to be working for me. I used a serverless compute and I am on Firefox version 134.0 (aarch64)

parthSundarka_0-1736468563521.png

Could you check if updating the Firefox version resolves your issue? If the browser version is up to date, Could you share more details about the compute type being used here, which may be causing the issue?

 

 

Thanks for the quick response! I am on the same version of firefox as you. The compute is a cluster on 13.3 runtime - what other details might be relevant?

Geophph_1-1736469329200.png

 

I guess maybe this is a Firefox / Mac (M2) issue for me. If I take the window and drag from my laptop to external monitor, it forces some sort of redraw in the browser and the graph appears. Conversely, if I start the plot on my external (no graph shows) then drag to the laptop it also triggers a re-render of sorts and the graph then appears. So i'm not sure it's related to compute, but also unclear to me how to fix.

parthSundarka
Databricks Employee
Databricks Employee

I can confirm that this re-rendering does happen. Initially, it is a black screen, but resizing the browser window renders the graph properly. I initially thought it was blank because of the window size and did not think of the re-render scenario. It happens with almost every graph type in Plotly, too.

Further, I tried it in the non-databricks environment on Firefox, and it seemed to be working. If you are looking for a fix for Firefox without having to resize, I suggest reaching out to Databricks Support so that they can reach out to the Engineering team and check on getting a fix for this as this is reproducible in all DBR versions.

The current Workaround would be to resize the window once the workflow is run to see the visualisation.

Do let me know if you have any queries. If not, can we mark this as an accepted solution?

I will do so! Thanks for your help in looking into this!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group