fsharpchart

How to display an FSharp.Charting graph in an existing form?

白昼怎懂夜的黑 提交于 2020-01-21 03:40:27
问题 I don't understand how to create a chart control and place the chart in an existing form. All the examples I found on the web show the chart in a new form but I would like to add the chart to one of my existing forms. I'm thinking of something like this: let form = new Form(Text="My form") let lbl = new Label(Text="my label") let chart = Chart.Area ["a", 10; "b", 20] form.Controls.Add lbl form.Controls.Add chart // ---> The type 'ChartTypes.GenericChart' is not compatible with the type

How to display an FSharp.Charting graph in an existing form?

不问归期 提交于 2019-11-30 15:22:22
I don't understand how to create a chart control and place the chart in an existing form. All the examples I found on the web show the chart in a new form but I would like to add the chart to one of my existing forms. I'm thinking of something like this: let form = new Form(Text="My form") let lbl = new Label(Text="my label") let chart = Chart.Area ["a", 10; "b", 20] form.Controls.Add lbl form.Controls.Add chart // ---> The type 'ChartTypes.GenericChart' is not compatible with the type 'Control' Application.Run(form) Thanks! In order to achieve this you should wrap your chart into FSharp