xamarin.forms - Trying to add OxyPlot to a Xamarin Forms xaml Page -


im trying include oxyplot xamarin.forms-project

this xaml.cs file im building plotmodel.

private void generateplot()     {         var points = new list<datapoint>         {             new datapoint(0, 0),             new datapoint(10, 5),             new datapoint(20, 10),             new datapoint(30, 16),             new datapoint(40, 12),             new datapoint(50, 19)         };         var points2 = new list<datapoint>         {             new datapoint(0, 0),             new datapoint(10, 7),             new datapoint(20, 8),             new datapoint(30, 8),             new datapoint(40, 20),             new datapoint(50, 25)         };         var m = new plotmodel();         m.plottype = plottype.xy;         m.invalidateplot(true);         m.title = "hello oxy";         m.resetallaxes();         var ls1 = new lineseries();         var ls2 = new lineseries();         ls1.itemssource = points;         ls2.itemssource = points2;          m.series.add(ls1);         m.series.add(ls2);         var _opv = new oxyplotview         {             widthrequest = 300,             heightrequest = 300,             backgroundcolor = color.aqua         };         _opv.model = m;         plmodel = m;     } 

in code works fine when put oxyplotmodel _opy stacklayout. when im going add xaml this:

 <oxy:plotview model="{binding model}" verticaloptions="center" horizontaloptions="center" /> 

im getting following exception:

system.reflection.targetinvocationexception: exception has been thrown target of invocation. ---> system.typeinitializationexception: exception thrown type initializer oxyplot.xamarinforms.plotview ---> system.missingmethodexception: method not found: 'xamarin.forms.bindableproperty.create'. 

does know can use oxyplot xaml?

thank

make sure version of oxyplot have compatible version of forms have.

i've had manually download oxyplot source , update xamarin.forms nuget in past.


Popular posts from this blog