Horizontal legend entrywidth does not adjust to font size on initial render
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, react
调研方向
从 组件的初始渲染路径以及示例中描述的图例水平尺寸调整行为开始。使用 orientation "h" 和 24px 的图例字体重现图表,然后将其与更改字体大小后的结果进行比较;当初始渲染时条目宽度与配置的字体匹配时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
When initially rendering the component, when set to orientation "h", the legend entries do not adjust their size correctly based on the font size set in the layout.
Example:
`
export const Test = (): ReactElement => {
const data : Data[] =[
{
x: [1, 2, 3],
y: [2, 6, 3],
name: "my example scatter chart",
type: 'scatter',
mode: 'lines+markers',
marker: {color: 'red'},
},
{type: 'bar', name:"my example bar chart", x: [1, 2, 3], y: [2, 5, 3]},
]
const layout = {
width: 1350,
height: 950,
hoverlabel: {
bgcolor: "#555555",
font: {
family: "Open Sans",
size: 14
}
},
legend: {
x: 0.25,
y: -0.35,
orientation: "h" as any,
font: {
family: 'Open Sans',
size: 24,
color: '#555555'
},
entrywidth:0,
},
xaxis: {
showline: false,
zeroline: false,
title: {
text: 'x',
font: {
family: 'Open Sans',
size: 14,
color: '#555555'
}
},
},
yaxis: {
showline: false,
zeroline: false,
title: {
text: 'y',
font: {
family: 'Open Sans',
size: 14,
color: '#555555'
}
}
}
}
return (<Plot
layout={layout}
data={data}
/>)
}
`

If I adjust the font size property of the layout object after the initial render, it corrects itself.

Any guidance or help would be greatly appreciated.
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 138
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 4
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
plotly/react-plotly.js 的其他 Issue
-
P3 plotly-internal size: 1 task
难度 3/5 1-2 天 新手友好度 45/100
plotly/react-plotly.js#386 ·
-
enhancement P3 size: 1
难度 3/5 1-2 天 新手友好度 65/100
plotly/react-plotly.js#380 · 7 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
plotly/react-plotly.js#358 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
plotly/react-plotly.js#354 ·
-
难度 3/5 1-2 天 新手友好度 30/100
plotly/react-plotly.js#353 · 1 条评论 ·
查看 plotly/react-plotly.js 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
难度 1/5 1 小时以内 新手友好度 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
难度 2/5 1-3 小时 新手友好度 84/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
难度 2/5 1-3 小时 新手友好度 72/100
bevyengine/bevy-website#2595 ·