Invalid Figure Field when using API
未关闭
还没有人认领这个 Issue。
bug
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Coming across this in few different ways when making docs and noticed it raised in the community forum too.
https://community.plot.ly/t/remove-edit-chart-from-embedded-html-graph-made-in-r/1601/2
When using scattercarpet type script below, I kept receiving the error:
Error: Client error: (400) Bad Request
Figure field is invalid. Reason: Raw data arrays are not allowed at this endpoint. Use grid references instead. Raw data found at the following paths in the figure [('data', 1, u'y')]
p <- plot_ly(
type = 'carpet',
a = c(4, 4, 4, 4.5, 4.5, 4.5, 5, 5, 5, 6, 6, 6),
b = c(1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3),
y = c(2, 3.5, 4, 3, 4.5, 5, 5.5, 6.5, 7.5, 8, 8.5, 10),
aaxis = list(
tickprefix = 'a = ',
ticksuffix = 'm',
smoothing = 1,
minorgridcount = 9
),
baxis = list(
tickprefix = 'b = ',
ticksuffix = 'Pa',
smoothing = 1,
minorgridcount = 9
)
) %>%
add_trace(
type = 'scattercarpet',
a = c(4, 4.5, 5, 6),
b = c(2.5, 2.5, 2.5, 2.5),
line = list(
shape = 'spline',
smoothing = 1,
color = 'blue'
)
)
api_create(p)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用 plot_ly()、add_trace() 和 api_create() 重现提供的 R 示例,重点关注 scattercarpet trace 以及报告的原始数据验证错误。阅读处理这些调用的 API Figure 验证或序列化路径;当 API 接受该示例且不再出现无效 Figure 字段错误时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- api, data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100