Description
All exports executed with Plotly.NET.ImageExport.PuppeteerSharpRenderer scale the image dimensions by a factor of 2. This is actually hard-coded in the following line:
|
+ $".then(x => Plotly.toImage(x, {{ format: '{StyleParam.ImageFormat.toString format}', scale: 2, width: {width}, height: {height} }}))" |
Repro steps
Any export a chart using PuppeteerSharpRenderer triggers the issue. This is true for JPEG, PNG and even SVG.
Chart.savePNG("temp", Width = 270., Height = 270.) will produce an image of size 540*540
Expected behavior
I'd expect the default scale ratio to be 1. An optional argument could be introduced, in order to export with a different scale ratio (in order to increase the resolution for instance), but I think the default should export exactly the same image as the one that could have been produced in the HTML page.
Actual behavior
The dimensions of the exported image are twice the ones that are passed in the arguments.
Known workarounds
Others parameters can be changed (such as exporting to half of the expected size), but the image does not look exactly the same, and this doesn't feel like a correct API.
Related information
Irrelevant.
Description
All exports executed with
Plotly.NET.ImageExport.PuppeteerSharpRendererscale the image dimensions by a factor of 2. This is actually hard-coded in the following line:Plotly.NET/src/Plotly.NET.ImageExport/PuppeteerSharpRenderer.fs
Line 44 in 9bd08f6
Repro steps
Any export a chart using
PuppeteerSharpRenderertriggers the issue. This is true for JPEG, PNG and even SVG.Chart.savePNG("temp", Width = 270., Height = 270.)will produce an image of size 540*540Expected behavior
I'd expect the default scale ratio to be 1. An optional argument could be introduced, in order to export with a different scale ratio (in order to increase the resolution for instance), but I think the default should export exactly the same image as the one that could have been produced in the HTML page.
Actual behavior
The dimensions of the exported image are twice the ones that are passed in the arguments.
Known workarounds
Others parameters can be changed (such as exporting to half of the expected size), but the image does not look exactly the same, and this doesn't feel like a correct API.
Related information
Irrelevant.