open Plotly.NET open Plotly.NET.ImageExport [] let main argv = let chromePathEnvOpt = System.Environment.GetEnvironmentVariable("GOOGLE_CHROME") |> Option.ofObj let chromePathOpt: string option = if argv.Length >= 1 then Some (argv[0]) else chromePathEnvOpt match chromePathOpt with | Some chromePath -> PuppeteerSharpRendererOptions.localBrowserExecutablePath <- Some chromePath let chart = Chart.Point ( x = [ 0 .. 10 ], y = [ 0 .. 10 ] ) |> Chart.withTitle "Hello world!" try do chart |> Chart.savePNG("test") with e -> eprintfn "Error saving PNG: %s" e.Message | None -> eprintfn "Usage: or define GOOLE_CHROME with path to binary" 0