plotly doesn't render html for data with long descriptions
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- numpy, pandas, plotly, python
- Domain
- data-visualization, performance
Research direction
Start by reproducing the failure with the supplied Python snippet, including the large scatter data and long text values, then compare fig.show() with fig.write_html('visualization.html'). Investigate how the generated HTML handles the hover_data payload; done means the resulting HTML opens and renders the plot reliably with long descriptions.
Written by the indexing model from the issue text.
Description
When trying to create a scatter plot with long descriptions (~5k chars), the html file stops running. Unfortunately, the description cannot be shortened. Here's a code snipped that will help reproduce the problem:
import numpy as np
import pandas as pd
import plotly.express as px
embedding2d = # generate np.array with shape: (389000, 2)
x = embedding2d[:, 0]
y = embedding2d[:, 1]
data = pd.DataFrame({
'x': x,
'y': y,
'text': # generate list of 389000 samples with 10k chars each sample
})
# Визуализация с plotly
fig = px.scatter(
data, x='x', y='y',
#template='plotly_dark',
hover_data=['text'], # Добавляем данные, которые будут отображаться при наведении
title="2D Vector Visualization with Labels",
)
fig.update_layout(
width=1520, height=685,
title_x=0.5
)
fig.show()
fig.write_html('visualization.html') # open browser
P.s. Changing browser doesn't help. I waited about 20 minutes
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.py
-
P3 size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug P1
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in plotly/plotly.py
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100