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 (this);
// Specify chart style parameters:
cs.Title = "Chart of GE Stock";
cs.XTickOffset = 1;
cs.XLimMin = -1f;
cs.XLimMax = 20f;
cs.YLimMin = 32f;
cs.YLimMax = 36f;
cs.XTick = 2f;
cs.YTick = .5f;
dc.StockChartType = DataCollection.StockChartTypeEnum.Candle;
}