plotly / plotly/plotly.js

Inconsistent EventData for axis range

Open
#1,877 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.