-
Notifications
You must be signed in to change notification settings - Fork 91
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
With Plotly version >= 2.0.0-beta9, FSharp.Formatting Evaluator does not return a plot #262
Comments
i think this might have to do with fsharp.formatting not working well with .net 6. i have had many problems with it recently as well. It is very unlikely an error on our end though, as the docs of Plotly.NET are built with fsdocs as well, just with .net 5. |
I did some digging across some blogs and docs i maintain, here are some versions that work together. It seems like overall the more complex the repo, the harder it is to make fsdocs working well for all kinds of evaluations, but here are some combinations that should work: Plotly.NET repo docs:
Other examples: https://github.com/fslaborg/datasets
https://github.com/CSBiology/CSBlog
|
Thank you for kindly documenting these configurations where it works. The CSBlog is my exact local setup, which was helpful to see. Overall, I can sometimes get preview.16 to work, but it's not reliable and fails more often than not. It seems to work more often (but not always) with a clean folder ( I don't have a solution but I'll add a comment with the solution if I find one. An oddity: I have seen a page using preview.16 graphs work with |
For reference,
Anyway, I'll let you know if I figure it out. |
@bvenn I was looking at the great fslab website just now and noticed that your qvalues page has this problem with plotly charts not being evaluated. See the The workflows appear to be using dotnet 5.0.102 and Ubuntu, which is a different toolchain than the one I've used when seeing it locally. |
Thanks @nhirschey, we're in the process of fixing it right now 👍 |
We also noticed that the watch mode seems broken after the first rendering. The evaluator fails to report any cell on the second try.
Have you tried a fresh render for beta9 or was it a sequential test from 8 to 9? |
Going from 8 -> 9 I was iterating through versions using Just now I was trying to reproduce beta9 failures in a fresh repo and beta9 worked. BUT, then while watch is running I switched to beta8 and the evaluator no longer worked. I switched back to beta9 and it worked. Then I tried beta5 and that didn't work either. So in fact it seems like maybe the issue is that it fails whenever you switch plotly versions within a docs build? Does that make sense? Update: #r "nuget: Plotly.NET, 2.0.0-beta9"
open Plotly.NET
let x = [1.; 2.; 3.; 4.; 5.; 6.; 7.; 8.; 9.; 10.; ]
let y = [2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.]
let line1 = Chart.Line(x,y)
(** try 1*)
line1 |> GenericChart.toChartHTML
(***include-it-raw***)
(** try 2 *)
line1 |> GenericChart.toChartHTML
(***include-fsi-output***) |
Fits in the issues we see when referencing different versions of a lib across different scripts. Looks like there is not an isolated execution context per script in fsdocs, or maybe some things get cached wrong |
I'll close this because there is nothing we can do from the plotly.net side of things - the problem is on the fsharp.formatting side. |
Description
Do you know if it is possible to generate fsdocs content with plots using nuget versions of Plotly.NET >= beta9?
Related to fsprojects/FSharp.Formatting#635, I was trying to upgrade some fsdocs content to the new Plotly.NET version and the plots were not evaluated. The fsdocs evaluator returned "No value returned by any evaluator".
It looks like the change happens between Plotly.NET versions beta8 (works) and beta9 (doesn't work).
Repro steps
I can reproduce it with a simple script and calling the FSharp.Formatting evaluator directly:
The plot gets made with beta8:
The plot is not made with either beta9 or preview.16:
Or using the 14.0.1 version of the fsdocs tool itself:
Expected behavior
Working version with beta 8 using the 14.0.1 version of the fsdocs tool itself:
Known workarounds
Use old versions of Plotly.NET
Related information
The text was updated successfully, but these errors were encountered: