Use WGLMakie from Genie

Genie is a web framework and WGLMakie makes web-interactive graphics, normally by using JSServe.jl.

Is it possible to use WGLMakie in a Genie site? How would you suggest doing it?


cc @essenciary @sdanisch

3 Likes

Maybe @piever or @yakir12 have some examples handy…
I need to give WGLMakie another overhaul soon, to improve docs etc…
But in principle, using show(io, MIME"text/html"(), Page()); show(io, MIME"text/html"(), plot); (page is documented in the docs) should do mostly what you need…

2 Likes

I never attempted that, I only kept to either WGLMakie with JSServe OR Genie with all sorts of Quasar and Vue things.

But it sure would be cool to allow for that. I would find the combination of both to be amazing (Genie is ultra stable and reliable, WGLMakie can do almost all the plotting anyone would need).

1 Like

Any update on this?
I’d live to see an example

5 Likes

I don’t mean to highjack this thread to shill my own package, but it’s been a while since anyone has responded. I’ve released some simple plotting support for WGLMakie.jl, CairoMakie.jl, and Bonito.jl in Oxygen.jl - Plotting Support . There’s some simple examples in the Readme.md file for each package.

It ended up being pretty straightforward to get these extensions working with Makie and Bonito. They all use the same show() function which made it easy to load and convert the types. After going through this, I’m fairly positive these kind of changes can be ported over to Genie.jl.

Granted, what I have is much more basic - this provides a way to return either a graph or Bonito app directly from a request handler. I imagine injecting Makie support into Genie’s custom templating engine would be a much more involved effort.

2 Likes