-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: CanvasRenderer is missing a valid canvas or context #383
Comments
Hey! Nice to have new users to VegaLite, sorry about the frustration with canvas (quite likely a javascript dependency issue). Before someone is able to look into this in more detail, there are three things you can do to help the community give feedback on your problem:
|
OK, I have now updated to Julia 1.6.0, and rebuilt my package from scratch.
Here is the pkg status:
Here is the error:
|
Sorry, it should have occurred to me way sooner. This is a known issue which will be resolved in a future version; at the moment, there is a test which captures the fact that this behavior is broken... Line 94 in 3344842
|
There are dependencies which need to be updated / deconflicted before this will work. In the meantime, you might be able to use VegaLite to generate a Vega spec and then pipe it to vg2png in the Vega-cli package. Admittedly, a poor solution, but one of few available until this is resolved. |
This should now be fixed on |
Is the fix released yet? I still get this error and had to resort to the workaround with vega ( |
Now I even encounter this issue in |
I'm new to VegaLite and trying to use it to plot a histogram of datetimes. I have a dataframe, df2, that has a column "time" containing datetimes. I want to save the figure as a png. I'm using REPL in a command window on linux, and calling my Julia script using include(scriptname.jl). In the script, a module, I import VegaLite. When I try to save as a png file I get the error: CanvasRenderer is missing a valid canvas or context.
I have installed Canvas.jl, and am using Julia Version 1.5.3 with a new install of VegaLite.
Any ideas why I get this error, and how I can produce a png file?
I call:
df2 |> VegaLite.@vlplot(:bar, x="yearmonthdate(time):o", y="count()") |> VegaLite.save("hist_start_day.png")
Then I receive the error:
If I instead try to save as an html file, then it works properly. Also, if I have "using VegaLite" in my script, it does not correct the error. I tried to install vega-cli, but there does not seem to be any julia package similar to that name.
The text was updated successfully, but these errors were encountered: