Boxplot Category Cutoff Issues
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Hi--I've got a boxplot I want to show all options of a category array on, regardless of whether data is present. For the purposes of demonstration, let's consider the categories to be days of the week, and it's important that the user be able to see if a day of the week is missing data.
I can use category array to get missing boxes that fall in the middle of the data to appear, but entries at the start / end won't show up:
I can specify a manual range (in terms of the indexes per docs), but then the boxes get cut off awkwardly (same thing would happen on the right if Sunday was present):
This gets even worse when there are multiple traces (in this case a full box from one trace is cut off):
The only way I see to resolve this is to use negative indexes (or extra indexes if the issue is on the right side), but that doesn't seem very future proof (since it bucks the docs), and sits a bit awkwardly.
Is there a better way to do this?
Here's a codepen reproducing the graphs I used here: https://codepen.io/lswainemoore/pen/yyLOdbo.
Thanks for any help!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the weekday boxplot cases in the linked CodePen and compare them with the layout.xaxis.range documentation. Trace how category-axis bounds are applied to boxplot traces, then determine whether the edge cutoff is expected or should be corrected; done means the reported cases have a clear supported behavior without awkward manual index adjustments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100