question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(some PDF viewers) Orca using plotly.js > 1.49.5 creates thin lines for bars with 0 length

See original GitHub issue

0-length bars are visible in pdfs generated by Orca even though they aren’t visible in the plotly.js graphs.

image001

I can reproduce this issue using orca directly using this method with the below json figure.

{"data": [{"y": ["This", "is", "a", "test", "placeholder"], "x": [12, 9, 15, 12, 0], "type": "bar", "orientation": "h"}], "layout": {"xaxis": {"type": "categorical", "showgrid": false, "zeroline": false}, "yaxis": {"title": "test", "zeroline": false}}}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
antoinergcommented, Aug 20, 2020

Thanks @michaelbabyn for the clear description of the issue and the Codepen to reproduce the issue! Thanks @archmoj for the references!

The reason why plotly.js puts a bar with a width of 0 is to properly support transitions. We can’t transition a bar from being non-existent to having a finite value. Anyway, that’s the conclusion I reached when introducing https://github.com/plotly/plotly.js/pull/4180.

It looks like a Chromium bug to me that rectangles with zero width would appear in its PDF output. Anyway, I think we could and should fix this in plotly.js since it will affect any Chromium user printing web pages and not just Orca users.

1reaction
michaelbabyncommented, Aug 20, 2020

Note that I can reproduce the issue by printing the page to PDF using chrome if that makes debugging easier

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add Docker in installation methods #187 - plotly/orca - GitHub
I think we should advertise our Docker images in the installation methods ... (some PDF viewers) Orca using plotly.js > 1.49.5 creates thin...
Read more >
Bar charts in JavaScript - Plotly
Over 39 examples of Bar Charts including changing color, size, log axes, and more in JavaScript.
Read more >
Use orca in node application to export images in pdf - plotly.js
I am making a node-electron application that uses plotly.js for plotting. Now to export as pdf or eps I need to use orca....
Read more >
Error bars in Python - Plotly
Over 9 examples of Error Bars including changing color, size, log axes, and more in Python.
Read more >
JavaScript Figure Reference: bar Traces - Plotly
Sets where the bar base is drawn (in position axis units). ... Type: number or array of numbers greater than or equal to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found