I have seq<Nullable<int>> and need to create nice plot, but without null values.
Here is my code:
open System
#r """..\packages\FSharp.Charting.0.90.14\lib\net40\FSharp.Charting.dll"""
#load """..\packages\FSharp.Charting.0.90.14\FSharp.Charting.fsx"""
open FSharp.Charting
//in a real world replaced by .csv with empty values
let seqWithNullInt = seq[Nullable 10 ; Nullable 20 ; Nullable (); Nullable 40; Nullable 50]
//let seqWithNullInt = seq[ 10 ; 20 ; 30; 40; 50] //works fine
let bothSeq = seqWithNullInt |> Seq.zip {1..5}
Chart.Line bothSeq // Error because of nullable int
And here is my vision:
How to skip null values? I don't want to replace them by nearest or something, I need to skip them from chart.. Is there any solution?

Something like this might work (note that I've used
Optionvalues instead of nullables, since that's more idiomatic in F#):This will output
[(1,10),(2,20) ; (4,40),(5,50)]. I don't know the FSharp.Charting API offhand so I can't tell you which function will take that list of X,Y pairs and draw the graph you want, but it should be relatively straightforward to get from there to your graph.