public ChartCanvas(CGRect rect) : base(rect) { ContentMode = UIViewContentMode.Redraw; AutoresizingMask = UIViewAutoresizing.All; BackColor = Color.Wheat; PlotPanel = new PlotPanel(rect); AddSubview(PlotPanel); // Subscribing to a paint eventhandler to drawingPanel: PlotPanel.Paint += PlotPanelPaint; cs = new ChartStyle(this); dc = new DataCollection(); cm = new ColorMap(100, 180); // Specify chart style parameters: cs.Title = "Bar Chart"; cs.XLimMin = 0f; cs.XLimMax = 5f; cs.YLimMin = 0f; cs.YLimMax = 10f; cs.XTick = 1f; cs.YTick = 2f; cs.BarType = ChartStyle.BarTypeEnum.Vertical; }
public ChartCanvas(RectangleF rect) : base(rect) { ContentMode = UIViewContentMode.Redraw; this.AutoresizingMask = UIViewAutoresizing.All; this.BackColor = Color.Wheat; PlotPanel = new PlotPanel(rect); this.AddSubview(PlotPanel); // Subscribing to a paint eventhandler to drawingPanel: PlotPanel.Paint += new PaintEventHandler(PlotPanelPaint); cs = new ChartStyle(this); dc = new DataCollection(); cm = new ColorMap(100, 180); // Specify chart style parameters: cs.Title = "Bar Chart"; cs.XLimMin = 0f; cs.XLimMax = 5f; cs.YLimMin = 0f; cs.YLimMax = 10f; cs.XTick = 1f; cs.YTick = 2f; cs.BarType = ChartStyle.BarTypeEnum.Vertical; }