add trace `legendItem` styles
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
I'm thinking of adding a new trace attribute container: legenditem
{
x: [/* */],
y: [/* */],
legenditem: {
textfont: {
color: 'red'
size: 12
},
marker: {
size: 20,
symbol: 'circle',
line: {width: 2, color: '#444'}
}
}
}
to the scatter*, bar* and pie traces to make their legend item styling configurable. This would be an easy (easier than @alexcjohnson 's legend 2.0 idea 😏 ) solution to https://github.com/plotly/plotly.js/issues/2967, https://github.com/plotly/plotly.js/issues/2080, https://github.com/plotly/plotly.js/issues/1701 and https://github.com/plotly/plotly.js/issues/1560
By the way, I'm thinking a naming this new container legenditem and not legend as I'm thinking legend could eventually be used when we implement multiple legends where e.g. legend: 'legend2' would mean "put this trace's legend item in the second legend".
One more note on @alexcjohnson 's legend 2.0 idea: having legenditem in traces wouldn't make it obsolete. We could still add a way to turn annotations into legend items later.
Thoughts?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先查看链接的四个 issue(#2967、#2080、#1701 和 #1560),以了解所请求的图例行为和未解决的设计问题。为 scatter*、bar* 和 pie traces 定义 trace 级 legenditem 容器的范围;完成的标准是已就样式要求和实现边界达成一致。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100