Inconsistent EventData for axis range
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with plotly.js v1.28.3 using one trace, a rangeslider, and a plotly_relayout callback. Compare eventData from trace zooming or panning with eventData from rangeslider panning; done when the axis-range payload is consistent with the documented access pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100