plotly / plotly/plotly.js

Boxplot Category Cutoff Issues

未关闭
#7,374 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug P3
主要语言
JavaScript
星标
18.3k
派生
2k
平均合并
2 天 12 小时
30 天内合并 PR
28

描述

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:

Image

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):

Image

This gets even worse when there are multiple traces (in this case a full box from one trace is cut off):

Image

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.

Image

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!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,在链接的 CodePen 中复现工作日 boxplot 的案例,并将其与 layout.xaxis.range 文档进行比较。跟踪类别轴边界如何应用于 boxplot trace,然后确定边缘截断是预期行为还是应当修正;当所报告的案例具有明确的受支持行为,且不需要别扭的手动索引调整时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。