Using FSharp.Charting from a .fs program, when a plot is displayed it blocks the execution of rest of the program. Is there a way to generate non blocking charts? E.g. I would want both the following to be displayed in separate windows and also have the rest of the program execute.
Chart.Line(Series1) |> Chart.Show // Chart 1
// do some work
Chart.Line(Series2) |> Chart.Show // display this in a second window
// continue executing the rest while the above windows are still open.
Can you provide more details on how you are calling
Chart.Line? E.g. in the REPL, via FSLab, in winforms, in wpf?The following doesn't block for me when working in an fsx file. The other way would be to wrap it in an async block, which is useful if you're doing some long-running computation or accessing a database.
Add:
MS Docs and F# Fun&Profit
Compiled example: