Hi ,
I am trying to display simple graph using oxyPlot in Xamarin forms.
I am displaying a page when i launch the app
using System;
using Xamarin.Forms;
using OxyPlot;
using OxyPlot.Series;
using OxyPlot.Axes;
using System.Collections.Generic;
namespace graph
{
public class firstPage : ContentPage
{
public firstPage ()
{
var Points = new List
{
new DataPoint(0, 4),
new DataPoint(10, 13),
new DataPoint(20, 15),
new DataPoint(30, 16),
new DataPoint(40, 12),
new DataPoint(50, 12)
};
var m = new PlotModel ("Titleee");
m.PlotType = PlotType.XY;
var s = new LineSeries ();
s.ItemsSource = Points;
m.Series.Add (s);
var opv = new OxyPlotView {
WidthRequest = 300, HeightRequest = 300,
BackgroundColor = Color.Aqua
};
opv.Model = m;
Content = new StackLayout {
Children = {
opv
}
};
}
}
}
but I am getting error in OxyPlotView.Any body knows how to fix this.I am attaching my project structure as well.