これを達成するには、チャートをラップしてFSharp.Charting.ChartTypes.ChartControl正しいドッキングに注意する必要があります。またChart、 from FSharp.Charting とChartfromを混在させないでくださいSystem.Windows.Forms.DataVisualization.Charting。
良い出発点は、現在の FSharp.Charting v0.90.5 で動作する次の完全に機能するサンプルです。System.Drawingおよびへの参照も必要ですSystem.Windows.Forms。
open System
open FSharp.Charting
open FSharp.Charting.ChartTypes
open System.Drawing
open System.Windows.Forms
[<STAThread; EntryPoint>]
let main args =
let myChart = [for x in 0.0 .. 0.1 .. 6.0 -> sin x + cos (2.0 * x)]
|> Chart.Line |> Chart.WithYAxis(Title="Test")
let myChartControl = new ChartControl(myChart, Dock=DockStyle.Fill)
let lbl = new Label(Text="my label")
let form = new Form(Visible = true, TopMost = true, Width = 700, Height = 500)
form.Controls.Add lbl
form.Controls.Add(myChartControl)
do Application.Run(form) |> ignore
0