Skip to content
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

Timeseries hang #293

Closed
nicolaskruchten opened this issue Jan 31, 2018 · 7 comments
Closed

Timeseries hang #293

nicolaskruchten opened this issue Jan 31, 2018 · 7 comments
Assignees
Labels

Comments

@nicolaskruchten
Copy link
Contributor

To replicate: +Trace, +Trace, set type to Timeseries, click on anything else, wait... browser locks up

@nicolaskruchten nicolaskruchten self-assigned this Feb 8, 2018
@nicolaskruchten
Copy link
Contributor Author

Notes:

  • also happens in the opposite order, oddly: +Trace, set type to Timeseries (ok), +Trace (hang)

@nicolaskruchten
Copy link
Contributor Author

@VeraZab input needed!

This infinite loop is actually fairly straightforward... There are two ifs here https://github.com/plotly/react-plotly.js-editor/blob/master/src/components/fields/TraceSelector.js#L180 , one which turns the rangeslider on and one which turns it off. If you have two traces, one of which is a timeseries and one which is a scatter, each of their TraceSelectors steps into one of the branches and things bounce back and forth.

I assume your intention here was to capture situations where a single trace switches from one type to another, not to capture inter-trace interactions... but there is in fact a path dependence problem here. If we create a timeseries, then a scatter, we would expect the rangeslider to stay on, right? If we then remove the timeseries, would we expect it to disappear? If so, presumably that's not the case if we had two timeseries and removed one of them. So... is the rule something like "if there is at least one timeseries/ohlc/candlestick then force the rangeslider on always"? Or something like "rangesliders are only allowed if one trace is timeseries/ohlc/candlestick"? Neither of those seems satisfactory.

I'm thinking we should try to do an onChange type thing on the trace selector, and if it's switching to one of timeseries/ohlc/candlestick then force the rangeslider on, but nothing else. If someone turns it off, ok. If someone turns it on for a scatter trace, ok.

Thoughts?

@nicolaskruchten
Copy link
Contributor Author

FWIW the current workspace resets the rangeslider to true for timeseries and false for others, on change, but lets you turn it on and off for non-financial traces, but not off for financial traces.

@nicolaskruchten
Copy link
Contributor Author

Digging more into the workspace, I see that the type there (in the JSON editor) is not timeseries but scatter, and there's nothing to do with autobinx or autobiny in the trace object... Can you fill me in about what I'm missing here?

@nicolaskruchten
Copy link
Contributor Author

@VeraZab see comment in #260 before answering here :)

@VeraZab
Copy link
Contributor

VeraZab commented Feb 9, 2018

ok, we can remove the timeseries trace type. Rangesliders aren't in yet, and there would have been other interactions to test out by turning it on/off, changing trace types. autobinx and autobiny would have come into play then.

@nicolaskruchten
Copy link
Contributor Author

You'll have to explain autobinx and autobiny to me sometime... They are not keys in the trace object for any type other than histogram as far as the documentation goes, so why do they come into play here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants