fail to update_xaxes rangebreaks by datetime
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
data df:
`
id date_time time_hms time_second price time_date
0 2021-05-31 09:25:00 09:25:00 33900 7 2021-05-31
1 2021-05-31 09:30:00 09:30:00 34200 8 2021-05-31
2 2021-05-31 09:30:01 09:30:01 34201 7 2021-05-31
3 2021-05-31 09:30:02 09:30:02 34202 6 2021-05-31
4 2021-05-31 09:30:03 09:30:03 34203 5 2021-05-31
... ... ... ... ...
24264 2021-06-04 14:56:56 14:56:56 53816 7 2021-06-04
24265 2021-06-04 14:56:57 14:56:57 53817 6 2021-06-04
24266 2021-06-04 14:56:58 14:56:58 53818 4 2021-06-04
24267 2021-06-04 14:56:59 14:56:59 53819 7 2021-06-04
24268 2021-06-04 15:00:00 15:00:00 54000 8 2021-06-04
`
code:
`
import pandas as pd
import plotly.express as px
import plotly.io as pio
fig = px.line(df,
x = "date_time",
y = "price"
)
fig.update_xaxes(
rangebreaks=[
dict(bounds=["2021-06-01 09:25:00", "2021-06-04 09:25:01"]) # hide by datetime
]
)
pio.write_html(fig, file="stock_graph_px.html", auto_open=True)
`
the result html page is blank.
as document, rangebreaks only work for "date" .
but, how to deal with datetime breaks?
is there a simple way to set axis datetime breaks?
plotly==4.14.3
Python 3.8.5
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Plotly 4.14.3 で、pandas、Plotly Express、pio.write_html を使用した提供済みの例を実行し、その後、update_xaxes が datetime rangebreaks の境界をどのように処理するかを調べます。失敗を確認し、datetime breaks が空白でない HTML ページを生成すべきかどうかを判断してください。同じ再現で結果を検証してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100