public DataPointSelection() { chart = new SFChart(); SFCategoryAxis primary = new SFCategoryAxis(); primary.LabelPlacement = SFChartLabelPlacement.BetweenTicks; primary.Title.Text = new NSString("Month"); chart.PrimaryAxis = primary; chart.SecondaryAxis = new SFNumericalAxis() { ShowMajorGridLines = false }; chart.SecondaryAxis.Title.Text = new NSString("Sales"); dataModel = new ChartSelectionDataSource(); chart.DataSource = dataModel as SFChartDataSource; chart.Delegate = new ChartSelectionDelegate(); chart.AddChartBehavior(new SFChartSelectionBehavior()); label = new UILabel(); label.Text = "Month : Mar, Sales : $ 53"; label.Font = UIFont.FromName("Helvetica", 13f); label.TextAlignment = UITextAlignment.Center; this.control = this; this.AddSubview(chart); this.AddSubview(label); }
public DataPointSelection () { chart = new SFChart (); SFCategoryAxis primary = new SFCategoryAxis (); primary.LabelPlacement = SFChartLabelPlacement.BetweenTicks; primary.Title.Text = new NSString ("Month"); chart.PrimaryAxis = primary; chart.SecondaryAxis = new SFNumericalAxis (){ ShowMajorGridLines = false }; chart.SecondaryAxis.Title.Text = new NSString ("Sales"); dataModel = new ChartSelectionDataSource (); chart.DataSource = dataModel as SFChartDataSource; chart.Delegate = new ChartSelectionDelegate (); chart.AddChartBehavior (new SFChartSelectionBehavior()); label = new UILabel (); label.Text = "Month : Mar, Sales : $ 53"; label.Font = UIFont.FromName("Helvetica", 13f); label.TextAlignment = UITextAlignment.Center; this.control = this; this.AddSubview (chart); this.AddSubview (label); }