null values reset stacking in express barchart
オープン
まだ誰も着手していません。
bug
P2
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
It seems like null values in the middle of a series reset the stacking so that the next value starts at zero. I tried it upstream in a JS codepen and it is handled okay there, so I believe it is an issue with the python API or possibly with plotly.express.
Reprex modified from https://plotly.com/python/bar-charts/#bar-charts-with-text
import plotly.express as px
wide_df = px.data.medals_wide()
# set null value in middle 'silver' series
wide_df.iloc[0,2] = None
fig = px.bar(
wide_df,
x="nation",
y=["gold", "silver", "bronze"],
title="Nulls Reset Stacking",
text_auto=True)
fig.show()
Output:
Based on input data:
Note that South Korea should be stacked to a total of 35 and not 24.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された再現コードの plotly.express.bar 呼び出しから始め、null の処理を、issue で参照されている upstream の JavaScript の動作と比較してください。medals_wide データを使って例を再現し、韓国の次の棒がゼロから再開するのではなく、合計 35 まで積み上げられたままになることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100