public ChartCanvas(RectangleF rect) : base(rect) { ContentMode = UIViewContentMode.Redraw; this.AutoresizingMask = UIViewAutoresizing.All; this.BackColor = Color.Wheat; PlotPanel = new PlotPanel(rect); this.AddSubview(PlotPanel); // Set Form1 size: // this.Width = 350; // this.Height = 300; // Subscribing to a paint eventhandler to drawingPanel: PlotPanel.Paint += new PaintEventHandler(PlotPanelPaint); cs = new ChartStyle(this); dc = new DataCollection(); // Specify chart style parameters: cs.Title = "Bar Chart"; // Vertical cs.XLimMin = 0f; cs.XLimMax = 5f; cs.YLimMin = 0f; cs.YLimMax = 25f; cs.XTick = 1f; cs.YTick = 5f; cs.BarType = ChartStyle.BarTypeEnum.VerticalOverlay; //cs.BarType = ChartStyle.BarTypeEnum.VerticalStack; // Horizontal cs.XLimMin = 0f; cs.XLimMax = 25f; cs.YLimMin = 0f; cs.YLimMax = 5f; cs.XTick = 5f; cs.YTick = 1f; //cs.BarType = ChartStyle.BarTypeEnum.HorizontalOverlay; cs.BarType = ChartStyle.BarTypeEnum.HorizontalStack; }
public ChartCanvas(CGRect rect) : base(rect) { ContentMode = UIViewContentMode.Redraw; AutoresizingMask = UIViewAutoresizing.All; BackColor = Color.Wheat; PlotPanel = new PlotPanel(rect); AddSubview (PlotPanel); PlotPanel.Paint += PlotPanelPaint; cs = new ChartStyle(this); dc = new DataCollection(); // Specify chart style parameters: cs.Title = "Bar Chart"; // Vertical cs.XLimMin = 0f; cs.XLimMax = 5f; cs.YLimMin = 0f; cs.YLimMax = 25f; cs.XTick = 1f; cs.YTick = 5f; cs.BarType = ChartStyle.BarTypeEnum.VerticalOverlay; // Horizontal cs.XLimMin = 0f; cs.XLimMax = 25f; cs.YLimMin = 0f; cs.YLimMax = 5f; cs.XTick = 5f; cs.YTick = 1f; //cs.BarType = ChartStyle.BarTypeEnum.HorizontalOverlay; cs.BarType = ChartStyle.BarTypeEnum.HorizontalStack; }