【发布时间】:2011-06-03 02:54:30
【问题描述】:
使用F# chart control library时,如何指定图例的文字? 例如:
FSharpChart.Line [ for f in 0.0 .. 0.1 .. 10.0 -> cos f ]
|> FSharpChart.WithLegend()
显示带有文本“GenericChart_Series_1”的图例。如何更改文本?
【问题讨论】:
使用F# chart control library时,如何指定图例的文字? 例如:
FSharpChart.Line [ for f in 0.0 .. 0.1 .. 10.0 -> cos f ]
|> FSharpChart.WithLegend()
显示带有文本“GenericChart_Series_1”的图例。如何更改文本?
【问题讨论】:
您可以使用图表对象的Name 属性指定图例。该属性可以在调用Line成员时设置:
FSharpChart.Line([ for f in 0.0 .. 0.1 .. 10.0 -> cos f ], Name = "Cos")
|> FSharpChart.WithLegend()
【讨论】: