本文介绍了FSharpCharting和FSharp编译代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我是FSharp的新手,我一直在玩FSharp.

http://fsharp.github.io/FSharp.Charting/ReferencingTheLibrary.html


虽然我能够在FSharp Interactive中轻松运行图表,但我不了解的是如何使用这段代码并使用F#解决方案创建的主程序文件将其改编为在常规Windows编译中运行.简而言之,我如何获得这些 要编译和构建的图表-鉴于我了解F#脚本文件不是标准编译或F#软件包构建的一部分.得到一些答案和也许一些代码向我展示如何将图表数据连接到 常规Windows窗体或Web窗体程序.我正在Windows 8 Pro上使用Visual Studio 2012.

因此,这段代码片段:

///

open FSharp . 图表

图表 . Line [ 用于 x in 跨度> 0 .. 10 - > x x * x ]

///

似乎可以在带有F#交互式功能的F#脚本中正常工作-我需要知道如何将生成的图表合并到常规的Windows窗体程序中

.......

NB(我也曾在Visual Studio 2013预览版上尝试过Fsharp,但Fsharp程序似乎在编译程序而不是仅使用脚本时使用BullGuard引起病毒警报).

谢谢

Simon Rodwell UK

解决方案


Hi there,

I am new to FSharp and I have been playing around a bit with the FSharp.Charting wrap around stuff from:

http://fsharp.github.io/FSharp.Charting/ReferencingTheLibrary.html


While I am able to run charts easily in FSharp Interactive what I don't understand is how you then take this code and adapt it to run in a regular windows compilation using the main program file that an F# solution creates.  In short how to I get these charts to compile and build - given that I understand F# Script files are not part of the standard compilation or build for an F# package.  It would be great to get some answers and maybe some code that shows me how to hook up this charting data into a regular Windows form or web form program. I am using Visual Studio 2012 on Windows 8 Pro. 

So while this snippet of code:

///

open FSharp.Charting

Chart.Line [for x in 0 .. 10 ->x, x*x ]

///

seems to work fine in an F# script with F# interactive - I need to know how to incorporate the chart that this generates into a regular windows forms program

.......

NB (I tried Fsharp out on Visual Studio 2013 preview as well but Fsharp programs seem to cause a virus alert with BullGuard when compiling a program rather than just using a script).

Thanks

Simon Rodwell UK

解决方案


这篇关于FSharpCharting和FSharp编译代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 23:27