ScaleBreakStyle,FSharpChart为0.60

时间:2012-02-24 20:07:04

标签: charts f# data-visualization fsharpchart f#-charting

我正在尝试使用FSharpChart创建一个包含缩放中断的图表。我找到了example for asp.net,我试图为F#重写。但是,结果图表没有任何缩放中断但具有正常的y轴。这是我的代码:

#r @"libs\MSDN.FSharpChart.dll.0.60\lib\MSDN.FSharpChart.dll"
#r @"System.Windows.Forms.DataVisualization"

open MSDN.FSharp.Charting
open System.Windows.Forms.DataVisualization.Charting

let c = [2;4;40000;3] |> FSharpChart.Line

c.Area.AxisY.ScaleBreakStyle.Enabled <- true
c.Area.AxisY.ScaleBreakStyle.CollapsibleSpaceThreshold <- 25
c.Area.AxisY.ScaleBreakStyle.LineWidth <- 2
c.Area.AxisY.ScaleBreakStyle.StartFromZero <- StartFromZero.Auto
c.Area.AxisY.ScaleBreakStyle.Spacing <- 2.0

FSharpChart.Create c

感谢您的帮助!如果从命令行运行它,则不起作用 - 必须在fsi中(以便它继续运行)。

0 个答案:

没有答案