-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Description
Description
I want to use Plotly.NET.ImageExport
to statically export a graph as an image. When I run the application, my program runs for a very long time without any results.
Repro steps
Create a new F# project in console mode and add the dependencies to Plotly.NET and Ploty.NET.ImgeExport:
$ dotnet new console -lang F#
$ dotnet add package Plotly.NET
$ dotnet add package Plotly.NET.ImageExport
Then write any code that exports an image:
open Plotly.NET.ImageExport
open Plotly.NET
let test path =
let xs = [ 0.0 .. 9.0 ]
let ys = Seq.map (fun x -> x ** 2.0) xs
Chart.Scatter(xs, ys, StyleParam.Mode.Lines_Markers)
|> Chart.saveJPG path
printfn "Exporting the graph..."
do test "test.jpg"
printfn "Done!" // never appears
Expected behavior
I expect it to generate an image, and especially for my application to stop, it seems to loop.
Actual behavior
After 10 minutes of waiting, I stopped my program because nothing happens.
Known workarounds
I came across this issue. My application did indeed generate a local chromium, so I referred Plotly to it:
open Plotly.NET.ImageExport
open Plotly.NET
do
PuppeteerSharpRendererOptions.localBrowserExecutablePath <-
Some ".local-chromium/Linux-884014/chrome-linux/chrome"
let test path =
let xs = [ 0.0 .. 9.0 ]
let ys = Seq.map (fun x -> x ** 2.0) xs
Chart.Scatter(xs, ys, StyleParam.Mode.Lines_Markers)
|> Chart.saveJPG path
printfn "Exporting the graph..."
do test "test.jpg"
printfn "Done!" // never appears
I have tried absolute and relative path, but the problem remains the same.
Related information
- Operating system: Linux, Pop!_OS
- .NET Runtime: version 6.0.301