Fox32
Fox32

Reputation: 13560

MonoTouch Core-Plot Binding

I have trouble with using the Core-Plot library in MonoTouch. I use this as a starting point for my MonoTouch binding. For me it seems the binding isn't finished.

I miss classes like CPXYGraph and CPGraphHostingView... Probably I don't need the CPXYGraph class, but how do I create an instance of CPGraph?

Does anyone succesfully used Core-Plot in MonoTouch and/or have an example?

Wich other solutions for plotting in MonoTouch would you recommend? (I can't use the google chart api, because it isn't guaranted that an Internet connection is available)

Edit:

Here is some example code I have problems with:

CPTheme theme = CPTheme.ThemeNamed("Plain Black"); // Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type.
CPGraph graph = (CPGraph)theme.NewGraph();

I use the Core Plot Alpha Release 0.2.2 version and link with:

-gcc_flags "-L${ProjectDir} -lCorePlot -force_load "${ProjectDir}/libCorePlot.a" -ObjC"

Upvotes: 3

Views: 1164

Answers (1)

miguel.de.icaza
miguel.de.icaza

Reputation: 32694

If you wait for the second alpha of MonoTouch 4.0, you will be able to run the new sample that I added to the build which has a full working setup and I added various plot types that were missing.

Upvotes: 3

Related Questions