plotly doesn't render html for data with long descriptions
オープン
まだ誰も着手していません。
bug
P3
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供された Python スニペットを使って、大量の散布データと長いテキスト値を含め、失敗を再現します。次に、fig.show() と fig.write_html('visualization.html') を比較します。生成された HTML が hover_data ペイロードをどのように処理するかを調査します。長い説明でも、生成された HTML がプロットを確実に開いてレンダリングできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- numpy, pandas, plotly, python
- 領域
- data-visualization, performance
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 28/100