Skip to content

Commit a1b438a

Browse files
committed
fix #394 :
- Add a mutable navigationOptions member to PuppeteerSharpRendererOptions - Enables setting `Timeout` on that object, note that large charts may take extremely long to render
1 parent f152f49 commit a1b438a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Plotly.NET.ImageExport/PuppeteerSharpRenderer.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module PuppeteerSharpRendererOptions =
2020
let mutable localBrowserExecutablePath =
2121
None
2222

23+
let mutable navigationOptions = NavigationOptions()
2324

2425
type PuppeteerSharpRenderer() =
2526

@@ -68,7 +69,12 @@ type PuppeteerSharpRenderer() =
6869
let! page = browser.NewPageAsync() |> Async.AwaitTask
6970

7071
try
71-
let! _ = page.SetContentAsync(patchHtml width height scale format html) |> Async.AwaitTask
72+
let! _ =
73+
page.SetContentAsync(
74+
html = patchHtml width height scale format html,
75+
options = PuppeteerSharpRendererOptions.navigationOptions
76+
)
77+
|> Async.AwaitTask
7278
let! imgHandle = page.WaitForExpressionAsync("window.plotlyImage") |> Async.AwaitTask
7379
let! imgStr = imgHandle.JsonValueAsync<string>() |> Async.AwaitTask
7480
return imgStr

0 commit comments

Comments
 (0)