Skip to content

onRelayout Parameter #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
timothy-godfrey opened this issue Sep 4, 2019 · 1 comment
Closed

onRelayout Parameter #158

timothy-godfrey opened this issue Sep 4, 2019 · 1 comment

Comments

@timothy-godfrey
Copy link

timothy-godfrey commented Sep 4, 2019

Possibly a bug, I get differently structured but deceptively similar parameters from the onRelayout event.

In the instance that onRelayout is triggered by a change to a rangeslider the event parameter is an object with 1 array called "xaxis.range":
eventParameter : { xaxis.range : [xmin, xmax] }

In the instance that onRelayout is triggered by a scroll zoom action the event parameter is an object with 2 properties that are named in way that makes them appear like an array, but are not:
eventParameter : { xaxis.range[0] : xmin, xaxis.range[1] : xmax}

I'm not sure if this is by design or by accident, but it broke my code because I was doing a check like so:
if( typeof eventParameter["xaxis.range"] === 'undefined') { /code/ }

In case it is relevant, part of the reason that I am only getting x axis values is because I have the y axes property 'fixedrange' set to true, and 'scrollZoom' set to true.

@etpinard
Copy link
Contributor

etpinard commented Sep 4, 2019

Duplicate of plotly/plotly.js#1877

@etpinard etpinard marked this as a duplicate of plotly/plotly.js#1877 Sep 4, 2019
@etpinard etpinard closed this as completed Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants