JuliaPlots / JuliaPlots/PlotlyJS.jl

[Use of react!]

Open
#497 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
444
Forks
86
PR merge metrics
No merged PRs in 30d

Description

The correct method of using react! is

```julia
react!(fig, fig.plot.data, fig.plot.layout)
```

but I found that using

```julia
react!(fig.plot, fig.plot.data, fig.plot.layout)
```

does not have a method error. And also using redraw! doesn't update the plot.

The following is the code I used for the test:

```Julia
using PlotlyJS
x = [1, 2, 3]
y = [1, 4, 7]
tr = scatter(x=x, y=y,)
fig = plot(tr)

# change data
fig.plot.data[1][:y][3] = 0 # == y[3] = 0
react!(fig.plot, fig.plot.data, fig.plot.layout) # not correct, but no error text in the terminal
redraw!(fig) # also does not update the plot
display(fig)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the react! and redraw! calls in the provided PlotlyJS example, comparing the documented fig and fig.plot argument forms. Reproduce the silent call and the unchanged plot, then trace the relevant PlotlyJS entry points to determine the expected error or update behavior. Done means the incorrect usage is handled consistently and the redraw behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, julia
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.