[Bug] Cannot reduce legend line-height in Firefox
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
调研方向
从链接的最小复现开始,使用所述的 itemHeight、lineHeight 和 fontSize 值比较 Firefox 和 Chromium 中的图例布局。检查图例文本元素和路径元素的 SVG transform 值。当 Firefox 产生与 Chromium 相同的多行图例间距和布局时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Version
6.1.0
Link to Minimal Reproduction
Steps to Reproduce
- Set
legend.itemHeightto a small value (6) - Set
textStyle.lineHeightto 10px - Set
textStyle.fontSizeto 8. - The legend needs a lot of label to be on multiple lines (or the legend width could be limited)
- Use default font
Current Behavior
It looks like the distance between the 2 legend lines is equal to lineHeight + 8px on both browsers (Firefox and Chromium).
In Chromium, with the provided example, the distance between the 2 lines is 18px as expected.
But, the legend line height in Firefox cannot be reduced under 20px + 8px.
It looks like that the computed transform="translate(...)" attribute for each text and path element of the legend is not "valid" in Firefox.
Expected Behavior
Firefox should have the same layout that Chromium.
Environment
- OS: Arch Linux
- Browser: Firefox 151
- Framework: None
Any additional comments?
No response
- 主要语言
- TypeScript
- 星标
- 67.7k
- 派生
- 19.9k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/echarts 的其他 Issue
-
[Bug] String formatter templates only replace the first occurrence of `{a}`/`{b}`/`{c}`可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭en pending
难度 2/5 1-3 小时 新手友好度 80/100
-
[Bug] Inverse axis collapses the grid with outerBoundsContain when a tick is near the axis edge可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭en pending
难度 2/5 1-3 小时 新手友好度 82/100
-
en pending
难度 2/5 1-3 小时 新手友好度 78/100
-
en pending
难度 2/5 1-3 小时 新手友好度 78/100
-
[Bug] The zoom cursor in the toolbox area is incorrect可能已有人在做 @waterWang 于 99 天前认领。 未关闭bug en pending
难度 2/5 1-3 小时 新手友好度 70/100
相似的 Issue
-
area: batch
难度 2/5 1-3 小时 新手友好度 75/100
inabagumi/shinju-date#7294 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
streaming-video-technology-alliance/common-media-library#700 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
vercel-labs/ui#809 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 67/100
KrisCris/village-in-the-shade-guide#75 ·
维护者通常 1 天内回复
-
bot:ai-assisted component:platform-js status:untriaged
难度 1/5 1 小时以内 新手友好度 74/100
midnightntwrk/platform-js#38 ·