Question

I'm newbie to haskell.

while wxFreeChart page in wxCode says it supports all wx ports, I have no any idea about how to use it in haskell

Was it helpful?

Solution

It's a C++ library, so you'd have to bind it yourself if you want to use it from Haskell; this is unlikely to be practical, as binding C++ libraries to Haskell is a difficult task. (Indeed, wxHaskell itself is based on a custom "binding" of wxWidgets to pure C.)

You should probably figure out another way to accomplish the same task, or if you really need to use wxFreeChart, write your GUI directly in C++. You could still use Haskell for the core logic using the FFI.

wxWidgets ports aren't relevant here; they're the parts that glue wxWidgets to a windowing system like Windows, GTK+, etc.

If you're not overly tied to wxWidgets, you could check out the Chart library, which can be used with Gtk2Hs. I haven't used it myself, but it seems quite polished.

OTHER TIPS

I'm an author of wxFreeChart. Under "All ports" i meant, Windows, MacOS X, Gtk+, Universal ports.

wxHaskell is not directly supported, and there are no plans to support it. If wxFreeChart will work with wxHaskell, it's great. But, i'm not sure about it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top