Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

_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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ksheehy wants to merge3 commits intoplotly:main
base:main
Choose a base branch
Loading
fromksheehy:ff_bullet_negative_scale

Conversation

ksheehy
Copy link

@ksheehyksheehy commentedJan 26, 2024
edited by ndrezn
Loading

The issue is with the method of sorting the data from highest to lowest. The data needs to be sorted so both, the largest positive and negative values are plotted first.

# Vertical Velocitydata= (  {"label":"Vertical Velocity","sublabel":"[FPM]","range":sorted([-5000,-3000,3000,5000]),"performance": [-2000,-1000,1000,2000],"point": [500],'command': [600]},)fig=ff.create_bullet(data,titles='label',subtitles='sublabel',markers='point',measures='performance',ranges='range',orientation='v',title='Bullet Chart',scatter_options={'marker': {'symbol':'diamond'}},width=300,)fig.show()

Here is the current implementation - you can see since the sort function puts the -5000 tick mark last and the bar on top of all less negative values.
Screenshot 2024-01-26 130212

Here is a fix.
Screenshot 2024-01-26 130307

I did a little search on this function and it looks like it is being depreciated. I appologize if I have butchered the PR process.

@ksheehyksheehy changed the title_bullet has an issue building measure and range bars if the data set …_bullet measure and range bars have bugs if the data set has negative valuesJan 26, 2024
@ksheehyksheehy changed the title_bullet measure and range bars have bugs if the data set has negative values_bullet measure and range bars have issues if the data set has negative valuesJan 26, 2024
@Coding-with-AdamCoding-with-Adam added bugsomething broken sev-4cosmetic labelsFeb 1, 2024
@Coding-with-Adam
Copy link
Contributor

Thank you for reporting this,@ksheehy

ksheehy reacted with thumbs up emoji

@Coding-with-Adam
Copy link
Contributor

Hi@archmoj
Here's the code pen for this issue:
https://codepen.io/charming-data/pen/ExJwxRY

archmoj reacted with thumbs up emoji

@archmoj
Copy link
Contributor

Thanks very much for the PR.
This looks good.
Please add a test inpackages/python/plotly/plotly/tests/test_optional/test_figure_factory/test_figure_factory.py to lock this bug.

@gvwilsongvwilson added P3backlog fixfixes something broken communitycommunity contribution and removed sev-4cosmetic bugsomething broken labelsAug 13, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@archmojarchmojarchmoj left review comments

@marthacryanmarthacryanAwaiting requested review from marthacryan

At least 1 approving review is required to merge this pull request.

Assignees

@marthacryanmarthacryan

Labels
communitycommunity contributionfixfixes something brokenP3backlog
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@ksheehy@Coding-with-Adam@archmoj@gvwilson@marthacryan

[8]ページ先頭

©2009-2025 Movatter.jp