图表:chart.ChartAreas.add抛出异常:System.NotImplementedException

时间:2017-01-24 11:52:19

标签: charts reference f#

我正在检查this个问题,并试图运行答案中给出的snippet。我按照他们在评论中讨论的那样做了,但仍然得到例外" NotImplemented"。然后我继续this教程,尝试运行他们的代码并得到相同的例外。我注意到两个地方都在谈论正确的引用,但我不知道它们的意思。我把它缩小了,并且想通了,每次我尝试使用图表时都会抛出这种行为。"某些东西":

#r "System.Windows.Forms.DataVisualization.dll"

open System
open System.Drawing
open System.Windows.Forms
open System.Windows.Forms.DataVisualization.Charting

let chart = new Chart(Dock = DockStyle.Fill)
let form = new Form(Visible = true, Width = 700, Height = 500)
//this throws the exception:
chart.ChartAreas.Add(new ChartArea("MainArea"))

1 个答案:

答案 0 :(得分:2)

如果您在Mono上运行此功能,我建议您查看F# Charting,因为它有GTK package跨平台工作。