Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Charts: chart.ChartAreas.add throws the exception: System.NotImplementedException

I was checking out this question and tried to run the snippet that was given in the answer. I did as they discussed in the comments and still got the exception "NotImplemented". I then proceeded to this tutorial, tried to run their code and got the same exeption. I noticed both places talking about correct referencing, but I don't know what they mean by it. I've narrowed it down and figured out, that the execption is thrown every time I try to use chart."something":

#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"))
like image 276
Thomas Avatar asked Feb 19 '26 18:02

Thomas


1 Answers

I would suggest looking at F# Charting if you are running this on Mono, as it has a GTK package that works cross platform.

like image 189
Stuart Avatar answered Feb 21 '26 15:02

Stuart