Jupyterlab additional view is not updated
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 18.8k
- Fork
- 2.8k
- Merge medio
- 16h 26m
- PR unite (30g)
- 21
Descrizione
If I use jupyterlab with plotly, for example with the simple slider example:
import plotly.graph_objects as go
import numpy as np
# Create figure
fig = go.Figure()
# Add traces, one for each slider step
for step in np.arange(0, 5, 0.1):
fig.add_trace(
go.Scatter(
visible=False,
line=dict(color="#00CED1", width=6),
name="𝜈 = " + str(step),
x=np.arange(0, 10, 0.01),
y=np.sin(step * np.arange(0, 10, 0.01))))
# Make 10th trace visible
fig.data[10].visible = True
# Create and add slider
steps = []
for i in range(len(fig.data)):
step = dict(
method="update",
args=[{"visible": [False] * len(fig.data)},
{"title": "Slider switched to step: " + str(i)}], # layout attribute
)
step["args"][0]["visible"][i] = True # Toggle i'th trace to "visible"
steps.append(step)
sliders = [dict(
active=10,
currentvalue={"prefix": "Frequency: "},
pad={"t": 50},
steps=steps
)]
fig.update_layout(
sliders=sliders
)
fig.show()
from the documentation.
Then, I created an additional view in Jupyter Lab. (Actually, I intend to use a similar mechanism for remote communication in university teaching in a different setup.)
If I move the axis origin or the sliders in the original view, only the original view is updated. Analogously, if I use the additional output for changes, only this output will be updated. On the other hand, after reloading the file and saving it, both views are updated after some time.
So, I assume that a model update is not triggered on the other view after a change.
Can you give me a pointer to what or where I should change? (I may make a PR if I have an idea of what to fix, but I am relatively new to the Jupyter code base and not fluent in Python but in Javascript, where I assume the problem is.)
I have seen that there are some filters, so a message to the kernel is not resent to the js side.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci l’esempio di slider Plotly fornito in JupyterLab con una vista aggiuntiva, quindi traccia il percorso di aggiornamento per le modifiche apportate in una delle due viste. Il lavoro è completato quando le modifiche all’origine dell’asse e allo slider in una vista aggiornano l’altra senza richiedere un ricaricamento e un salvataggio; l’issue non indica file del repository né test da cui iniziare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, jupyter-notebook, python
- Ambito
- data-visualization, frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100