Plotly.NET 6.0.0
Plotly.NET
Create interactive plotly.js charts in .NET. Plotly.NET provides an F# API for building, styling, combining, and rendering charts, with lower-level access to traces, layouts, and configuration. This is the core library used by the other Plotly.NET packages.
Installation
dotnet add package Plotly.NET --version 6.0.0
The library targets .NET Standard 2.0. For an idiomatic C# API, install Plotly.NET.CSharp as well.
Quick start
In an F# project with the package installed:
open Plotly.NET
let chart =
Chart.Line(
x = [ 1; 2; 3; 4 ],
y = [ 2; 5; 3; 8 ]
)
|> Chart.withTitle "My first chart"
chart |> Chart.saveHtml "chart.html"
Open chart.html in a browser to interact with the chart. Use chart |> Chart.show
to save a temporary HTML file and open it in your default browser automatically.
For an .fsx script, add #r "nuget: Plotly.NET, 6.0.0" before the example.
By default, the HTML loads plotly.js from a CDN and needs an internet connection. See display options for using an embedded or local plotly.js reference.
Related packages
- Plotly.NET.CSharp: C# chart factories and extension methods.
- Plotly.NET.Interactive: inline chart display in .NET Interactive / Polyglot Notebooks.
- Plotly.NET.ImageExport: programmatic static image export.
Documentation and support
- Examples and tutorials
- API reference
- Release notes and migration information
- Source code and issue tracker
Plotly.NET is licensed under the MIT license.
Showing the top 20 packages that depend on Plotly.NET.
| Packages | Downloads |
|---|---|
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts.
|
53 |
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts.
|
52 |
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts.
|
51 |
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts.
|
49 |
|
QuantConnect.Research
QuantConnect LEAN Engine: Research Project - Core implementation for jupyter research environment
|
49 |
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts.
|
47 |
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts
|
47 |
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts.
|
46 |
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts.
|
45 |
|
QuantConnect.Research
QuantConnect LEAN Engine: Research Project - Core implementation for jupyter research environment
|
45 |
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts.
|
44 |
|
Plotly.NET.Interactive
A .NET Interactive Kernel Extension for displaying Plotly.NET charts
|
44 |
|
QuantConnect.Research
QuantConnect LEAN Engine: Research Project - Core implementation for jupyter research environment
|
44 |
This version removes C# interop from the core F# Plotly.NET library, offloading those implementations directly to the native C# lib Plotly.NET.CSharp:
Milestone link with all the fixed/closed issues
Breaking:** Plotly.NET assemblies are no longer strong-named. Maintaining a strong-named build chain has caused recurring friction (see #452, #371, and the broader discussion at StephenCleary/AsyncEx#129) and forced us to maintain a re-packaged signed fork of Giraffe.ViewEngine (giraffe-fsharp/Giraffe.ViewEngine#23). Consumers that still need strong-named binaries can use brutaldev/StrongNameSigner to sign assemblies post-build.
As a consequence, the html dsl dependency switches back from Giraffe.ViewEngine.StrongName 2.0.0-alpha1 to upstream Giraffe.ViewEngine 1.4.0. The namespace is unchanged, so user code is not affected.
- #504: Upgrade DynamicObj to
[8.0.0, 9.0.0), raising its transitive FSharp.Core minimum to 10.1.300. No Plotly.NET source adaptations were required. The upgrade includes revised hashing and equality for custom properties containing F# option values; ordinary optional chart arguments are unwrapped before storage. - Bump bundled plotly.js to 2.28.0
- #459: Breaking: Rename nine
ColorKeywordcases. The old names have been removed; replace usages and pattern matches using the mapping below. RGB values are unchanged, includingLightSlateGrayandLightSlateGrey, which both map to(119, 136, 153). | Removed name | Replacement | | --- | --- | |Darkolivegreen|DarkOliveGreen| |Honeydew|HoneyDew| |Hotpink|HotPink| |LightAalmon|LightSalmon| |LightAeaGreen|LightSeaGreen| |LightAkyBlue|LightSkyBlue| |LightAlateGray|LightSlateGray| |LightslateGrey|LightSlateGrey| |Skyblue|SkyBlue| - #477: Fix tick-font serialization for parallel categories and parallel coordinates charts, and add
StyleParam.Shape.HSplinefor horizontal spline paths in parallel categories plots. - #441: Encoded typed array support — plotly.js 2.28 introduced a base64 representation for numeric arrays. Plotly.NET supports it for selected trace fields and chart constructors:
- New
EncodedTypedArraytype (inPlotly.NET) carrying a base64 payload (bdata), a dtype tag (dtype), and an optional shape for multi-dimensional data. Supported dtypes:Float64,Float32,Int32,UInt32,Int16,UInt16,Int8,UInt8,UInt8Clamped. - Convenience constructors:
EncodedTypedArray.ofFloat64Array,ofFloat32Array,ofInt32Array,ofUInt32Array,ofInt16Array,ofUInt16Array,ofInt8Array,ofUInt8Array,ofUInt8ClampedArray— all accept a 1-D .NET array and an optionalshapeparameter for multi-dimensional layouts. - Encoded fields added across the trace style modules (
Trace2DStyle,Trace3DStyle,TracePolarStyle,TraceGeoStyle,TraceMapboxStyle,TraceTernaryStyle,TraceCarpetStyle,TraceDomainStyle,TraceSmithStyle), covering data arrays (XEncoded,YEncoded,ZEncoded, etc.), metadata arrays (IdsEncoded,CustomDataEncoded,MultiTextEncoded,SelectedPointsEncoded), error bar arrays (ArrayEncoded,ArrayminusEncoded), and trace-specific fields (e.g.Q1Encoded/MedianEncoded/Q3Encodedon BoxPlot,OpenEncoded/HighEncoded/LowEncoded/CloseEncodedon OHLC/Candlestick,OpacityScaleEncodedon Surface/Volume/IsoSurface,IntensityEncoded/IEncoded/JEncoded/KEncodedon Mesh3D, dimensionValuesEncodedon Splom/ParallelCoord). - Encoded overloads added to selected F#
Chartroot functions (e.g.Chart.Scatter,Chart.Bar,Chart.Waterfall,Chart.Histogram,Chart.BoxPlot,Chart.Violin,Chart.OHLC,Chart.Candlestick,Chart.Splom,Chart.Histogram2D,Chart.Heatmap,Chart.Contour,Chart.Scatter3D,Chart.Surface,Chart.Mesh3D,Chart.Cone,Chart.StreamTube,Chart.Volume,Chart.IsoSurface,Chart.ScatterPolar,Chart.BarPolar,Chart.ScatterGeo,Chart.ChoroplethMap,Chart.ScatterMapbox,Chart.ChoroplethMapbox,Chart.DensityMapbox,Chart.ScatterTernary,Chart.Carpet,Chart.ScatterCarpet,Chart.ContourCarpet,Chart.ScatterSmith,Chart.Pie,Chart.FunnelArea,Chart.Sunburst,Chart.Treemap,Chart.Icicle) and selected derived convenience helpers (e.g.Chart.Point,Chart.Line,Chart.Spline,Chart.Bubble,Chart.Area,Chart.SplineArea,Chart.StackedArea,Chart.Range,Chart.Funnel,Chart.Histogram,Chart.StackedBar,Chart.PointDensity,Chart.PointPolar,Chart.PointGeo,Chart.PointMapbox,Chart.PointTernary,Chart.PointSmith,Chart.PointCarpet,Chart.Doughnut). - Shared Sankey node/link objects accept encoded positions, source/target/value, and supported numeric metadata. Encoded values replace corresponding plain values when both are supplied in the same init/style call. Labels remain plain strings.
- One-dimensional samples do not need a shape; matrix inputs use an explicitly shaped flat payload. Strings, arbitrary objects, decimal, and 64-bit integer encoding are outside the supported dtype set. Image pixels and helpers that compute from plain inputs (such as Pareto, Residual, and AnnotatedHeatmap) have no direct encoded overload.
- The C# package exposes a selected subset of direct chart conveniences, documented in its release notes and the encoded-array guide. This release does not claim all-chart parity or measured encoding performance gains.
- Sankey node alignment —
StyleParam.SankeyNodeAlignsupports Left, Right, Center, and Justify throughSankeyNodesand the F# / C# chart conveniences. - Virtual-WebGL — existing
DisplayOptions.AdditionalHeadTagscan load the optional WebGL 1 virtualization script before plotly.js; the encoded-array guide shows the script ordering. - #500: Internal refactor — split the monolithic
Chart.fsinto per-chart-family files (Chart2D_Scatter.fs,Chart2D_Bar.fs, etc.) for better maintainability. No API changes. - Set comparison charts — new composite charts for visualizing set membership and intersections (in
ChartComposite): Chart.Venndraws a Venn diagram comparing two or three sets (set1,set2, optionalSet3), annotating each region with its member count. Axes are locked to a 1:1 pixel ratio so the circles always render round, and colors/labels/text font are customizable.Chart.UpSetdraws an UpSet plot for an arbitrary number of sets: an intersection matrix, an intersection-size bar chart, and a set-size bar chart, with optional per-intersection attribute plots viaSetData/SetDataChartsTitle.- Both take plain
#seq<string>/#seq<#seq<string>>set inputs (treated as sets internally; duplicates ignored) and support the standardUseDefaultsparameter. - Dev tooling: target framework for build/test projects updated to
net10.0; NuGet dependency updates (Newtonsoft.Json 13.0.4, Deedle 5.0.0, FSharp.Data 8.1.7, FAKE 6.1.4, Microsoft.NET.Test.Sdk 18.x).
.NET Standard 2.0
- DynamicObj (>= 8.0.0 && < 9.0.0)
- FSharp.Core (>= 10.1.403)
- Giraffe.ViewEngine (>= 1.4.0)
- Newtonsoft.Json (>= 13.0.4)
| Version | Downloads | Last updated |
|---|---|---|
| 6.0.0 | 5 | 10/30/2026 |
| 6.0.0-preview.2 | 32 | 06/18/2026 |
| 6.0.0-preview.1 | 50 | 04/04/2026 |
| 5.1.0 | 49 | 04/04/2026 |
| 5.0.0 | 51 | 04/02/2026 |
| 4.2.0 | 40 | 04/04/2026 |
| 4.1.0 | 47 | 04/04/2026 |
| 4.0.0 | 55 | 04/04/2026 |
| 4.0.0-preview.4 | 50 | 04/04/2026 |
| 4.0.0-preview.3 | 50 | 04/04/2026 |
| 4.0.0-preview.2 | 45 | 04/04/2026 |
| 4.0.0-preview.1 | 49 | 04/04/2026 |
| 3.0.1 | 44 | 04/04/2026 |
| 3.0.0 | 52 | 04/04/2026 |
| 2.0.0 | 50 | 04/04/2026 |
| 2.0.0-preview.18 | 45 | 04/04/2026 |
| 2.0.0-preview.17 | 43 | 04/04/2026 |
| 2.0.0-preview.16 | 41 | 04/04/2026 |
| 2.0.0-preview.15 | 42 | 04/04/2026 |
| 2.0.0-preview.14 | 43 | 04/04/2026 |
| 2.0.0-preview.13 | 40 | 04/04/2026 |
| 2.0.0-preview.12 | 45 | 04/04/2026 |
| 2.0.0-preview.11 | 44 | 04/04/2026 |
| 2.0.0-preview.10 | 44 | 04/04/2026 |
| 2.0.0-preview.9 | 42 | 04/04/2026 |
| 2.0.0-preview.8 | 45 | 04/04/2026 |
| 2.0.0-preview.7 | 47 | 04/04/2026 |
| 2.0.0-preview.6 | 45 | 04/04/2026 |
| 2.0.0-preview.5 | 44 | 04/04/2026 |
| 2.0.0-preview.4 | 44 | 04/04/2026 |
| 2.0.0-preview.3 | 47 | 04/04/2026 |
| 2.0.0-preview.2 | 48 | 04/04/2026 |
| 2.0.0-preview.1 | 42 | 04/04/2026 |
| 2.0.0-beta9 | 43 | 04/04/2026 |
| 2.0.0-beta8 | 40 | 04/04/2026 |
| 2.0.0-beta7 | 42 | 04/04/2026 |
| 2.0.0-beta6 | 31 | 04/04/2026 |
| 2.0.0-beta5 | 42 | 04/04/2026 |
| 2.0.0-beta4 | 44 | 04/04/2026 |
| 2.0.0-beta3 | 45 | 04/04/2026 |
| 2.0.0-beta2 | 51 | 04/04/2026 |
| 2.0.0-beta1 | 48 | 04/04/2026 |
| 2.0.0-beta | 45 | 04/04/2026 |
| 2.0.0-alpha5 | 44 | 04/04/2026 |
| 2.0.0-alpha4 | 39 | 04/04/2026 |
| 2.0.0-alpha3 | 41 | 04/04/2026 |
| 2.0.0-alpha2 | 46 | 04/04/2026 |