-
Notifications
You must be signed in to change notification settings - Fork 3
Add conversion of Plots.jl's plotly plots #4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
thanks for taking this on @BeastyBlacksmith !! It would be nice a add a test before merging. |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 StructType
s https://github.com/JuliaPlots/PlotlyBase.jl/blob/master/src/json3.jl, but I haven't tested it
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
Closes plotly/Dash.jl#214