Uh oh!
There was an error while loading. Please reload this page.
Add conversion of Plots.jl's plotly plots - #4
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
etpinard
commented
Jul 31, 2023
thanks for taking this on @BeastyBlacksmith !! It would be nice a add a test before merging. |
etpinard
commented
Aug 1, 2023
Related: plotly/Dash.jl#221 |
| pl = @test_nowarn DashBase.to_dash(plot(1:5)) | ||
| @test pl isa PlotlyJS.SyncPlot |
There was a problem hiding this comment.
@etpinard do these need to return something readable by JSON3 or is it enough, that they return something that has a to_dash method?
There was a problem hiding this comment.
Good question. Have you tried it inside a Dash.jl callback?
| import DashBase | ||
| import PlotlyBase | ||
| import PlotlyBase.JSON |
There was a problem hiding this comment.
This would of course break if PlotlyBase stops importing JSON.
I think this here is fine for now, but we should probably make the switch to using JSON3 exclusively inside DashBase.jl and Dash.jl. We should open an issue once this PR is merged.
Looks like PlotlyBase does define JSON3-compatible StructTypes https://github.com/JuliaPlots/PlotlyBase.jl/blob/master/src/json3.jl, but I haven't tested it
Uh oh!
There was an error while loading. Please reload this page.
etpinard
commented
Aug 3, 2023
Ok. I'm going to go ahead and merge this PR. The other things I'd like to include in v1 are in https://github.com/plotly/DashBase.jl/milestone/1 |
Fixes#3
Closesplotly/Dash.jl#214