plotly / plotly/plotly.js

Documentation mismatch re: polar + bargap

Open
#7,337 2 comments 0 reactions 1 assignee View on GitHub

@LiamConnors is already working on this.

Since Feb 3, 2025.

bug documentation P2
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Hi--I'm not sure how exactly this works, but I believe the layout documentation for polar traces doesn't match the behavior in the code. In particular, the bargap property seems to be missing.

For a barpolar type plot, I can verify that it works when nested within the polar key of the layout object, but not when at the parent layout level (as the documentation seems to imply: https://plotly.com/javascript/reference/layout/.

Although most of the inner workings are beyond me, behavior (not documentation) seems consistent with bits of code like:

All this leads me to believe that the documentation is wrong, or rather that whatever schema (I'm guessing this?) is informing the documentation is wrong. Of course, I wouldn't be too bothered by this, except that I assume the same schema that generates the documentation also informs the types here, which are also missing bargap, and is giving typescript grief. I know (think?) the types are not plotly's responsibility, but I think fixing the schema here would help downstream.

Thanks, and I appreciate your work.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.