You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[running and writing tests](#running-and-writing-tests)
27
23
-[docs](#docs)
28
-
-[Contributors](#contributors)
29
-
-[Library license](#library-license)
24
+
-[Contributors](#contributors)
25
+
-[Library license](#library-license)
26
+
-[FAQ](#faq)
27
+
28
+
# What is Plotly.NET?
29
+
30
+
Plotly.NET is an Interactive charting library for **.NET** programming languages 📈🚀.
31
+
32
+
It is built on top of plotly.js and provides several API layers for creating, styling and rendering ✨**beatiful data visualizations**✨.
33
+
34
+
To get a deep-dive into the rationale behind the design choices of Plotly.NET, check out our [F1000Research paper](https://doi.org/10.12688/f1000research.123971.1)!
30
35
36
+

37
+
38
+
In short, Plotly.NET consists of multiple API layers and packages:
39
+
40
+
-`Plotly.NET` - The core API is written in F# and provides multiple API layers to create and style charts - from the high-level, type-safe `Chart` API to low-level direct chart object manipulation. It is the foundation for all other packages.
41
+
42
+
-`Plotly.NET.Interactive` - This package provides interactive formatting extensions for .NET interactive notebooks.
43
+
44
+
-`Plotly.NET.ImageExport` - This package provides extensions for Plotly.NET to render charts as static images programmatically.
45
+
46
+
-`Plotly.NET.CSharp` - This package provides an idiomatic C# API. Note that you can use the core API in C#, this package just removes some friction at some places.
31
47
# Installation
32
48
33
-
The most recent Plotly.NET package is [](https://www.nuget.org/packages/Plotly.NET/).
49
+
You can get all Plotly.NET packages via nuget:
34
50
35
-
Plotly.NET also provides several extension packages:
| Description | Interactive formatting extension for .NET interactive notebooks| programmatic static image export | idiomatic C# API. Note that you can use the core API in C#, this package just removes some friction at some places. [See bindings progress](https://github.com/plotly/Plotly.NET/issues/296)|
The landing page of our docs contains everything to get you started fast, check it out [📖 here](http://plotly.github.io/Plotly.NET/)
124
+
<br>
125
+
126
+
To enable Plotly.NET in a polyglot notebook for C#, reference the `Plotly.NET.Interactive` and `Plotly.NET.CSharp` packages:
127
+
128
+
```csharp
129
+
#r"nuget: Plotly.NET.Interactive"
130
+
#r"nuget: Plotly.NET.CSharp"
131
+
```
132
+
133
+
To display a chart, just end a C# cell with it:
134
+
135
+
```csharp
136
+
usingPlotly.NET.CSharp;
137
+
138
+
Chart.Point<int, int, string>(
139
+
x: Enumerable.Range(0,11),
140
+
y: Enumerable.Range(0,11)
141
+
)
142
+
```
143
+

144
+
145
+
## Samples and tutorials
146
+
147
+
You can find extensive documentation with samples and tutorials of the core `Plotly.NET` library [📖 here](http://plotly.github.io/Plotly.NET/).
94
148
95
149
## Full library reference
96
150
97
-
The API reference is available [📚 here](http://plotly.github.io/Plotly.NET/reference/index.html)
151
+
The API reference for all packages is available [📚 here](http://plotly.github.io/Plotly.NET/reference/index.html)
98
152
99
153
The documentation for this library is automatically generated (using FSharp.Formatting) from *.fsx and *.md files in the docs folder. If you find a typo, please submit a pull request!
100
154
@@ -112,7 +166,7 @@ Check the [build project](https://github.com/plotly/Plotly.NET/blob/dev/build) t
112
166
# Build only
113
167
./build.cmd
114
168
115
-
# Full release buildchain: build, test, pack, build the docs, push a git tag, publish thze nuget package, release the docs
169
+
# Full release buildchain: build, test, pack, build the docs, push a git tag, publish the nuget package, release the docs
116
170
./build.cmd release
117
171
118
172
# The same for prerelease versions:
@@ -132,6 +186,10 @@ build.sh prerelease
132
186
133
187
```
134
188
189
+
### running and writing tests
190
+
191
+
please refer to the detailed readme in the [tests folder](./tests/README.md)
192
+
135
193
### docs
136
194
137
195
The docs are contained in `.fsx` and `.md` files in the `docs` folder. To develop docs on a local server with hot reload, run the following in the root of the project:
@@ -155,3 +213,33 @@ Plotly.NET is a community maintained open source projects. Big thanks to all con
155
213
## Library license
156
214
157
215
The library is available under the [MIT license](https://github.com/plotly/Plotly.NET/blob/dev/LICENSE).
216
+
217
+
# FAQ
218
+
219
+
<details>
220
+
<summary>Why are there two separate packages for C# and F#?</summary>
221
+
222
+
<br>
223
+
224
+
These packages are not separate, Plotly.NET.CSharp is built **on top** of Plotly.NET.
225
+
226
+
`Plotly.NET` (written in F#) is the main project. It is designed with interoperability in mind, and it is possible to use it from C#.
227
+
228
+
Over the years, some friction between F# and C# have surfaced that cannot be overcome in the F# codebase. For more info, take a look at this issue where we discuss the topic: https://github.com/plotly/Plotly.NET/issues/285
229
+
230
+
The `Plotly.NET.CSharp` package (written in C#, using the F# API internally) is a thin wrapper around the core API. It is not necessary to use it, but it can make the API more idiomatic and ergonomic for C# users.
231
+
</details>
232
+
233
+
<details>
234
+
<summary>Can i use Plotly.NET in [insert your UI library here]?</summary>
235
+
236
+
<br>
237
+
238
+
It depends. Plotly.NET creates JSON for consumption by the plotly.js library. The actual rendering is done by plotly.js, in an environment where javascript can be run.
239
+
240
+
This means that your UI libs needs some way of displaying html and executing javascript to be compatible with Plotly.NET. That is true for most UI libs though, [here for example is a POC for Blazor]().
241
+
242
+
For Windows Forms and WPF you could use a WebView control to display the charts.
243
+
244
+
You could also use Plotly.NET.ImageExport in your backend to create static images of your charts and serve those in your UI.
0 commit comments