In this tutorial we will walk through creating a chart in the browser, from an F# script running in Visual Studio Code.
We assume that:
and Ionide Paket are installed.
First, create a new F# script file: Script.fsx
.
Copy-paste the following code into the editor:
#r "nuget: XPlot.Plotly"
open XPlot.Plotly
[ 1 .. 10 ] |> Chart.Line |> Chart.Show
Select all of the code you pasted in and press Alt
+Enter
to execute it.
That's it! You should see a chart popping up in your browser.
Notes