5

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?

ahala
  • 4,683
  • 5
  • 27
  • 36

1 Answers1

5

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()
Tomas Petricek
  • 240,744
  • 19
  • 378
  • 553