public DoughnutChartView () { SFChart chart = new SFChart (); chart.Title.Text = new NSString ("Doughnut Chart Title"); chart.Legend.Visible = true; ChartDoughnutDataSource dataModel = new ChartDoughnutDataSource (); chart.DataSource = dataModel as SFChartDataSource; this.control = chart; }
public DoughnutChartView(string title) { List<ChartData> chartData = new ChartDataRepository ().chartDataCollection; string chartTitle = title; SFChart chart = new SFChart (); //chart.Title.Text = new NSString (title); //chart.Title.Font = UIFont.SystemFontOfSize (20, UIFontWeight.Bold); chart.Title.TextAlignment = UITextAlignment.Center; chart.Legend.Visible = true; chart.Legend.DockPosition = SFChartLegendPosition.Float; chart.Legend.Orientation = SFChartLegendOrientation.Horizontal; chart.Legend.OffsetX = 10; chart.Legend.OffsetY = 380; // chart.Legend.LabelStyle.Font = UIFont.SystemFontOfSize (11); // chart.Legend.IconHeight = 25; // chart.Legend.IconWidth = 25; ChartDoughnutDataSource dataModel = new ChartDoughnutDataSource (chartData, chartTitle); chart.DataSource = dataModel as SFChartDataSource; this.control = chart; }