plotly / plotly/react-plotly.js

Is layout.height really disallowed when layout.autosize=true ?

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

还没有人认领这个 Issue。

主要语言
JavaScript
星标
1.1k
派生
138
平均合并
3 天 2 小时
30 天内合并 PR
4

描述

I've got a responsive table created per this repo's docs:
To make a plot responsive, i.e. to fill its containing element and resize when the window is resized, use style or className to set the dimensions of the element (i.e. using width: 100%; height: 100% or some similar values) and set useResizeHandler to true while setting layout.autosize to true and leaving layout.height and layout.width undefined. This can be seen in action in this CodePen and will implement the behaviour documented here: https://plot.ly/javascript/responsive-fluid-layout/

I would like to reduce the whitespace below the table by using the layout.height property which seems to work in plotly.js (CodePen) and doesn't appear to be prohibited per the responsive-fluid-layout section cited above. Is there another approach we can/should take in react-plotly if the layout.height property must remain undefined here?

贡献指南

这个仓库没有索引到贡献指南

从这里开始

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

调研方向

先从 responsive-fluid-layout 文档和其中链接的两个 CodePen 开始,然后比较 layout.height 与 layout.autosize 在 plotly.js 和 react-plotly.js 中的行为。完成的标准是:项目已经确定并记录了一种在保留响应式调整大小的同时减少表格空白区域的方法。

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

评估

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

把新 issue 发到你的邮箱

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