-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from PumasAI/mh/plotly-inline-render
Fix #51
- Loading branch information
Showing
6 changed files
with
134 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: PlotlyJS | ||
julia: | ||
exeflags: ["--project=PlotlyJS"] | ||
--- | ||
|
||
```{julia} | ||
using PlotlyJS | ||
``` | ||
|
||
```{julia} | ||
#| label: fig-scatter | ||
#| fig-cap: "Scatter Plot" | ||
PlotlyJS.Plot(scatter(; y = [1, 2, 3], mode = "markers")) | ||
``` | ||
|
||
```{julia} | ||
#| label: fig-line-plot | ||
#| fig-cap: "Line Plot" | ||
plot(scatter(; y=[1, 2, 3], mode="lines")) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[deps] | ||
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include("../../utilities/prelude.jl") | ||
|
||
if Sys.iswindows() | ||
# There are issues with the Kaleido_jll v0.2 build on Windows, skip for now. | ||
@info "Skipping PlotlyJS.jl tests on Windows" | ||
else | ||
test_example(joinpath(@__DIR__, "../../examples/integrations/PlotlyJS.qmd")) do json | ||
cells = json["cells"] | ||
for nth in (4, 6) | ||
cell = cells[nth] | ||
outputs = cell["outputs"] | ||
@test length(outputs) == 1 | ||
data = outputs[1]["data"] | ||
@test haskey(data, "image/png") | ||
@test haskey(data, "image/svg+xml") | ||
@test haskey(data, "text/html") | ||
@test startswith(data["text/html"], "<div>") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,5 +65,6 @@ if !@isdefined(SCHEMA) | |
end | ||
QuartoNotebookRunner.close!(server, each) | ||
end | ||
GC.gc() | ||
end | ||
end |