使用F#图表控件库时,如何指定图例文本?例如:
FSharpChart.Line [ for f in 0.0 .. 0.1 .. 10.0 -> cos f ]
|> FSharpChart.WithLegend()
Run Code Online (Sandbox Code Playgroud)
显示带有文本"GenericChart_Series_1"的图例.我该如何更改文字?
您可以使用Name图表对象的属性指定图例.调用该Line成员时可以设置该属性:
FSharpChart.Line([ for f in 0.0 .. 0.1 .. 10.0 -> cos f ], Name = "Cos")
|> FSharpChart.WithLegend()
Run Code Online (Sandbox Code Playgroud)