Skip to content
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

Regression of bar plot axis scaling between 1.51.1 and 1.51.2 #4567

Closed
brubbel opened this issue Feb 10, 2020 · 10 comments · Fixed by #4568
Closed

Regression of bar plot axis scaling between 1.51.1 and 1.51.2 #4567

brubbel opened this issue Feb 10, 2020 · 10 comments · Fixed by #4568
Assignees
Labels
bug something broken

Comments

@brubbel
Copy link

brubbel commented Feb 10, 2020

@archmoj

96ef28a#diff-41fd60f1e6a06a5340748d3f4b3754e6R218-R225

This commit broke (my) bar plots which are updated in chunks. Horizontal axis of the bar plot stopped rescaling correctly between 1.51.1 and 1.51.2.
This has been working for years so this should be considered as a regression.

By removing this if statement it starts working again:

if(spansHorizontal) {

New behaviour:
image

Version <= 1.51.1 (or above if-statement removed in 1.51.2):
image

If required, I'll try to construct a simple example to reproduce.

@archmoj archmoj added bug something broken regression this used to work labels Feb 10, 2020
@archmoj archmoj self-assigned this Feb 10, 2020
@archmoj
Copy link
Contributor

archmoj commented Feb 10, 2020

@brubbel thanks for reporting.
Does this demo illustrate the bug?

@brubbel
Copy link
Author

brubbel commented Feb 10, 2020

It seems so, at first sight.

@archmoj
Copy link
Contributor

archmoj commented Feb 10, 2020

Related: #4522.

@brubbel
Copy link
Author

brubbel commented Feb 10, 2020

Confirmed: I've Tested the demo with and without the if-statement, and it illustrates the same issue.

@archmoj
Copy link
Contributor

archmoj commented Feb 11, 2020

I would like to possibly add another test to lock the behaviour.
@brubbel would you mind sharing the data and layout of your figure?
Thanks.

@archmoj
Copy link
Contributor

archmoj commented Feb 11, 2020

In addition to #4522, I also think this could be related to #4180 as well.

@archmoj
Copy link
Contributor

archmoj commented Feb 11, 2020

In addition to #4522, I also think this could be related to #4180 as well.
Correction: regression is not related to #4180.

@brubbel
Copy link
Author

brubbel commented Jun 7, 2020

@archmoj
With the latest version (https://cdn.plot.ly/plotly-latest.min.js, v1.54.1), and using your above demo, the problem is solved.
However, it persists when the plot is downloaded using the png button:

image

@alexcjohnson
Copy link
Collaborator

@brubbel the png behavior is not a regression - going back to v1.51.1 or earlier we see this same behavior that the bars disappear in the png output. We might consider it a bug, but this is a little tricky. Normally for a plot downloaded as an image we disable both rounding positions and shape-rendering: crispEdges, because the same machinery can produce vector output (eps, pdf, svg) and even for raster output it can scale up to higher resolution. In all of those cases this rounding and disabled antialiasing would degrade the output.

But for the default output of the download button - 1:1 scaled raster - it would make sense to carve out an exception and retain the behavior used on interactive plots.

@alexcjohnson alexcjohnson reopened this Jun 8, 2020
@alexcjohnson alexcjohnson removed the regression this used to work label Jun 8, 2020
@jackparmer
Copy link
Contributor

This issue has been tagged with NEEDS SPON$OR

A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.

Sponsorship range: $5k-$10k

What Sponsorship includes:

  • Completion of this feature to the Sponsor's satisfaction, in a manner coherent with the rest of the Plotly.js library and API
  • Tests for this feature
  • Long-term support (continued support of this feature in the latest version of Plotly.js)
  • Documentation at plotly.com/javascript
  • Possibility of integrating this feature with Plotly Graphing Libraries (Python, R, F#, Julia, MATLAB, etc)
  • Possibility of integrating this feature with Dash
  • Feature announcement on community.plotly.com with shout out to Sponsor (or can remain anonymous)
  • Gratification of advancing the world's most downloaded, interactive scientific graphing libraries (>50M downloads across supported languages)

Please include the link to this issue when contacting us to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants