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

Feature: add property which extend the trace in a sorted way #35

Open
bearsh opened this issue Dec 4, 2019 · 2 comments
Open

Feature: add property which extend the trace in a sorted way #35

bearsh opened this issue Dec 4, 2019 · 2 comments

Comments

@bearsh
Copy link

bearsh commented Dec 4, 2019

I just filed a issue against plotly to add a way to extend a plot in a sorted way (not append but insert sorted) (plotly/plotly.js#4408)

now I though it may also possible (and probably faster implemented) to do in from the graph component. is it possible to hold a copy or reference to the plot's data and on extend insert the new data in a sorted way and afterwards call Plotly.animate()? is this feasible?

@bcliang
Copy link
Owner

bcliang commented Dec 7, 2019

What you're suggesting is technically possible, but I think it would be better to wait for a solution in the PlotlyJS library. Sorting logic + insertion will depend on the type of trace you are plotting (obvious with time series, not so sure about other implementations).

Current solutions:

  • use this/dcc.Graph and just redraw the entire trace via data callback
  • use this/dcc.Graph extendData with a trace type that does not show order (e.g. scatter plot with points only e.g. no lines).
  • modify this/dcc.Graph component to support a new property that will (1) extract existing trace data, (2) insert new points into the trace, (3) call Plotly.deleteTraces(), and (4) Plotly.addTraces()

@bearsh
Copy link
Author

bearsh commented Dec 9, 2019

thanks for taking the time to response!
As you thinks it's technically possible, I'll revisit my requirements and based on that either wait for PlotlyJS or do it in a forked Graph.
Please feel free to close it unless the issue has still some value for you...

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