8000 _bullet measure and range bars have issues if the data set has negative values by ksheehy · Pull Request #4497 · plotly/plotly.py · GitHub
[go: up one dir, main page]

Skip to content
8000

_bullet measure and range bars have issues if the data set has negative values #4497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Reformat
  • Loading branch information
archmoj authored Mar 28, 2024
commit 2a1933526daa3ba9c8602dd2befb507cb5b45ac8
16 changes: 14 additions & 2 deletions packages/python/plotly/plotly/figure_factory/_bullet.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ def _bullet(
bar = go.Bar(
x=x,
y=y,
marker=dict(color=inter_colors[sorted(df.iloc[row]["ranges"]).index(sorted(df.iloc[row]["ranges"], key=abs, reverse=True)[idx])]),
marker=dict(
color=inter_colors[
sorted(df.iloc[row]["ranges"]).index(
sorted(df.iloc[row]["ranges"], key=abs, reverse=True)[idx]
)
]
),
name="ranges",
hoverinfo="x" if orientation == "h" else "y",
orientation=orientation,
Expand Down Expand Up @@ -132,7 +138,13 @@ def _bullet(
bar = go.Bar(
x=x,
y=y,
marker=dict(color=inter_colors[sorted(df.iloc[row]["measures"]).index(sorted(df.iloc[row]["measures"], key=abs, reverse=True)[idx])]),
marker=dict(
color=inter_colors[
sorted(df.iloc[row]["measures"]).index(
sorted(df.iloc[row]["measures"], key=abs, reverse=True)[idx]
)
]
),
name="measures",
hoverinfo="x" if orientation == "h" else "y",
orientation=orientation,
Expand Down
0