我不知道如何在FSharpChart.WithArea中更改坐标轴上的字体。
这是我能想到的显示问题的最短示例(至少在我的机器上)。
#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发布于 2011-07-27 00:43:39
这是库中的一个错误。如果您想自己修复它,请下载源代码并找到一行定义typesToClone的代码。它应该看起来像这样:
let typesToClone =
[ typeof<LabelStyle>; typeof<Axis>; typeof<Grid>; typeof<TickMark>
typeof<ElementPosition>; typeof<AxisScaleView>; typeof<AxisScrollBar>; ]这定义了在创建图表时复制其属性的类型的列表。问题是名称LabelStyle引用的是F#图表库源代码中的类型,而不是.NET图表控件类型System.Windows.Forms.DataVisualization.Charting.LabelStyle。它可以通过使用完整的类型名称来修复:
let typesToClone =
[ typeof<System.Windows.Forms.DataVisualization.Charting.LabelStyle>;
typeof<Axis>; typeof<Grid>; typeof<TickMark>
typeof<ElementPosition>; typeof<AxisScaleView>; typeof<AxisScrollBar>; ]我会将此信息发送给该库的当前维护者,以确保下一个版本包含对此的修复。感谢您报告此问题!
https://stackoverflow.com/questions/6832127
复制相似问题