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(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 = 0.5f;
            dc.StockChartType = DataCollection.StockChartTypeEnum.Candle;
        }
Example #2
0
        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;
        }