plotly / plotly/plotly.js

Inconsistent EventData for axis range

未关闭
#1,877 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug P3
主要语言
JavaScript
星标
18.3k
派生
2k
平均合并
2 天 12 小时
30 天内合并 PR
28

描述

Version used: plotly.js (basic) v1.28.3

I am registered to the event "plotly_relayout".
I am using a chart with one trace and a rangeslider.

When zooming / panning on the trace, the following eventData is emitted to my callback:

Object {xaxis.range[0]: "2017-04-25 02:03:12.3635", xaxis.range[1]: "2017-05-24 12:21:05.5226"}

When panning on the rangeslider the follwoing eventData is emitted to my callback:

Object {xaxis.range: Array[2]}

And the array contains:
["2017-05-16 11:13:38.5694", "2017-06-14 21:31:31.7285"]

The plotly documentation shows that you are supposed to access the eventData axis information like this:
eventdata['xaxis.range[0]']

this only works for the first object, not the one emitted when using the rangeslider.

贡献指南

打开贡献指南

从这里开始

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

调研方向

使用 plotly.js v1.28.3,通过一个 trace、一个 rangeslider 和一个 plotly_relayout callback 重现该报告。比较对 trace 进行缩放或平移时的 eventData 与对 rangeslider 进行平移时的 eventData;当轴范围 payload 与文档中的访问模式一致时完成。

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

评估

技术栈
javascript
领域
data-visualization
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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