Hover template for chart with "base"
オープン
まだ誰も着手していません。
bug
P2
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
Hello!
I am creating a figure which is a Waterfall chart.
In this Waterfall chart, I am using the ‘base’ parameter.
This works perfectly for me, but I noticed a problem with the hovertemplate…
As soon as I have data below my ‘base’, the hover doesn’t work well… It doesn’t work when I am on the bar, I will let you see this in the video.
Here is the code:
import plotly.graph_objects as go
x_values = ['Waiting on union or regulatory problem', 'Up log wireline to depth inside drillstring',
'Drill to depth', 'Slickline run other activities', 'Service Well Control Equipment',
'Trip in to depth', 'Trip out to depth', 'Run in casing to depth', 'Drilling run other activities',
'Rig up to run slickline', 'Run in slickline to depth', 'Make up BHA', 'Circulate to condition hole',
'Waiting on cement to develop strength', 'Circulate to condition drilling fluid',
'Smallest differences combined']
y_values = [-4.83333333, 1.14583333, 1.125, 1.08333333, 0.75, 0.5625, 0.5, -0.45833333, 0.41666667, 0.375, 0.35416667, -0.33333333, 0.33333333, -0.33333333, 0.29166667, 0.875]
fig = go.Figure(
go.Waterfall(
orientation="v",
base=17.5625,
x=x_values,
y=y_values,
customdata=y_values,
hovertemplate=(
"%{x}<br>" + "Initial: %{initial:.2f}<br>" + "Final: %{final:.2f}<br>" + "Delta: %{delta:.2f}<extra></extra>"
),
),
layout={"height": 800}
)
fig.show()
Link bug in forum with the video : https://community.plotly.com/t/hover-template-for-chart-with-base/90887/3
Thanks!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
base、y_values、および initial、final、delta を含む hovertemplate を使用する、提供された go.Waterfall の例から始めます。base より小さい値でホバーの動作を再現し、その後、各バーにホバーしたときに期待される template の値が表示され、チャート全体で一貫して動作することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100