plotly / plotly/plotly.js

Change the height of the legend graphic (specifically for fill)

未关闭
#6,984 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

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

描述

Currently the height of the "fill" section of the legend "key" (for want of a better word) is fixed:

https://github.com/plotly/plotly.js/blob/6f34028d9fe50c05d20569c5a930cc3ad600c1b3/src/components/legend/style.js#L152-L153

Please could functionality to change this be implemented. A number of our users find the distinction between line and fill keys to be too indistinguishable (particularly when using plots with wider line thicknesses).

I am aware of https://github.com/plotly/plotly.js/issues/3735 but feel this is much more targeted (thus easier) than a general overhaul of the legend styling.

贡献指南

打开贡献指南

从这里开始

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

调研方向

从 src/components/legend/style.js 第 152–153 行附近开始,跟踪 fill 部分的高度是如何应用到图例键的。确定可以在哪里提供可配置的高度,同时不改变无关的图例样式。完成标准是:用户可以通过更改 fill 高度来区分填充键和线键,并且相关的图例行为已由测试覆盖。

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

评估

技术栈
javascript
领域
data-visualization
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

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