Plotly.NET.ImageExport 7.0.0

dotnet add package Plotly.NET.ImageExport --version 7.0.0
                    
NuGet\Install-Package Plotly.NET.ImageExport -Version 7.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plotly.NET.ImageExport" Version="7.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plotly.NET.ImageExport" Version="7.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Plotly.NET.ImageExport" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Plotly.NET.ImageExport --version 7.0.0
                    
#r "nuget: Plotly.NET.ImageExport, 7.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Plotly.NET.ImageExport@7.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Plotly.NET.ImageExport&version=7.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Plotly.NET.ImageExport&version=7.0.0
                    
Install as a Cake Tool

Plotly.NET.ImageExport

Render Plotly.NET charts as PNG, JPEG, or SVG images using a headless browser powered by PuppeteerSharp.

Install

dotnet add package Plotly.NET.ImageExport --version 7.0.0

Version 7 targets .NET Standard 2.0 and depends on Plotly.NET 6.x, which NuGet installs automatically. Use a compatible .NET application runtime and an operating system that can run the browser described below.

Export a chart

This F# script writes chart.png in the current directory:

#r "nuget: Plotly.NET.ImageExport, 7.0.0"

open Plotly.NET
open Plotly.NET.ImageExport

let chart =
    Chart.Line([ (1., 2.); (2., 4.); (3., 3.) ])
    |> Chart.withDisplayOptions(
        DisplayOptions.init(PlotlyJSReference = PlotlyJSReference.Full)
    )

chart |> Chart.savePNG("chart", Width = 800, Height = 450)

Pass a path without an extension; the save functions append .png, .jpg, or .svg. The output directory must already exist and be writable. The example embeds plotly.js so the browser does not need to fetch it from a CDN.

Output formats

Format Save to a file Return an image string
PNG Chart.savePNG Chart.toBase64PNGString — PNG data URI
JPEG Chart.saveJPG Chart.toBase64JPGString — JPEG data URI
SVG Chart.saveSVG Chart.toSVGString — SVG markup

These functions accept Width, Height, and Scale options, defaulting to 600, 600, and 1.0. Corresponding Async functions, such as Chart.savePNGAsync, return tasks that you can await.

Browser requirements

The default renderer uses PuppeteerSharp 24.40.0 to download a compatible Chrome browser when needed and launch it for each export. Browser setup requires network access and a writable browser download/cache location. The host must permit browser processes and provide the required operating-system libraries; see the PuppeteerSharp prerequisites.

To use a preinstalled compatible Chrome/Chromium executable and skip the automatic download, set PuppeteerSharpRendererOptions.localBrowserExecutablePath to Some "/absolute/path/to/chrome" before exporting. Launch and navigation settings are available through PuppeteerSharpRendererOptions.launchOptions and PuppeteerSharpRendererOptions.navigationOptions.

Charts that reference external images, fonts, map resources, or a plotly.js CDN may still need network access during rendering.

See the image export guide for more examples and the release notes for version changes.

Licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Plotly.NET.ImageExport:

Package Downloads
Benchly

Package Description

Softellect.Analytics

Softellect Analytics...

QualIQon

QualIQon - Visual quality control for computational proteomics

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Plotly.NET.ImageExport:

Repository Stars
bitfaster/BitFaster.Caching
High performance, thread-safe in-memory caching primitives for .NET
Version Downloads Last Updated
7.0.0 0 10/29/2026
7.0.0-preview.1 343 7/29/2025
6.1.0 396,115 9/4/2024
6.0.0 6,632 5/27/2024
5.0.1 77,134 7/25/2023
5.0.0 1,510 7/14/2023
4.0.0 67,333 3/21/2023
3.0.0 13,125 6/15/2022
2.0.0 1,742 4/28/2022
2.0.0-preview.18 711 3/4/2022
2.0.0-preview.17 20,830 2/8/2022
2.0.0-preview.16 17,581 11/27/2021
2.0.0-preview.15 408 11/16/2021
2.0.0-preview.14 338 11/12/2021
2.0.0-preview.13 353 11/12/2021
2.0.0-preview.12 401 11/8/2021
2.0.0-preview.11 407 11/4/2021
2.0.0-preview.10 454 10/11/2021
2.0.0-preview.9 451 9/30/2021
Loading failed

- bump version range of Plotly.NET to [6.0.0, 7.0.0)
- **Breaking:** Plotly.NET.ImageExport assemblies are no longer strong-named. See the Plotly.NET 6.0.0 release notes for context and migration options.
- Update PuppeteerSharp dependency to 24.40.0
- Dev tooling: target framework for test projects updated to `net10.0`