when using F# chart control library, how can I specify the text of the legend? for instance:
FSharpChart.Line [ for f in 0.0 .. 0.1 .. 10.0 -> cos f ]
|> FSharpChart.WithLegend()
shows a legend with text "GenericChart_Series_1". How can I change the text?
You can specify the legend using the Name
property of the chart object. The property can be set when calling the Line
member:
FSharpChart.Line([ for f in 0.0 .. 0.1 .. 10.0 -> cos f ], Name = "Cos")
|> FSharpChart.WithLegend()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With