我已经seq<Nullable<int>>
并且需要创建漂亮的情节,但没有空值。这是我的代码:
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
这是我的愿景:
如何跳过空值?我不想用最近的东西替换它们,我需要从图表中跳过它们。有什么解决方案吗?