I can't work out how to change the font on the Axes in FSharpChart.WithArea.
This is the shortest example I could come up with that displays the problem (on my machine, at least).
#r "System.Windows.Forms.DataVisualization.dll"
#r "MSDN.FSharp.Charting.dll"
open System.Windows.Forms.DataVisualization.Charting
open MSDN.FSharp.Charting
open System.Drawing
let font = new Font("Wingdings", 10.0F)
FSharpChart.FastLine([(0.,1.);(10., 10.)])
|> FSharpChart.WithArea.AxisX(LabelStyle = new LabelStyle(Font = font))
|> FSharpChart.WithCreate
This is a bug in the library. If you want to fix it yourself, download the source code and find a line that defines
typesToClone
. It should look something like this:This defines a list of types whose properties are copied when creating a chart. The problem is that the name
LabelStyle
refers to a type in the F# Charting Library's source code rather than to the .NET chart controls typeSystem.Windows.Forms.DataVisualization.Charting.LabelStyle
. It can be fixed by using the full type name:I'll send this information to the current maintainers of the library to make sure the next version includes a fix for this. Thanks for reporting the issue!