As you already figured out, using Series.observations
gives you a sequence of key-value pairs from the series that you can then pass to Chart.Line
etc.
This is definitely something that should not be needed and you can make the code simpler using extension method that lets you automatically plot a series:
[<AutoOpen>]
module FsLabExtensions =
type FSharp.Charting.Chart with
static member Line(data:Series<'K, 'V>, ?Name, ?Title, ?Labels, ?Color, ?XTitle, ?YTitle) =
Chart.Line(Series.observations data, ?Name=Name, ?Title=Title, ?Labels=Labels, ?Color=Color, ?XTitle=XTitle, ?YTitle=YTitle)
If you include this, you can plot series directly:
let s = series [ for x in 0.0 .. 0.1 .. 1.0 -> x, sin x ]
Chart.Line(s)
You can also reference Deedle & F# Charting through our experimental package "FsLab" that includes these overloads (see here)