Inheritance: MonoMac.AppKit.NSView
Example #1
0
        // Shared initialization code
        void Initialize()
        {
            this.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
            BackColor             = Color.Wheat;
            PlotPanel             = new PlotPanel(Frame);

            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";

            cs.XLimMin = 0f;
            cs.XLimMax = 25f;
            cs.YLimMin = 0f;
            cs.YLimMax = 5f;
            cs.XTick   = 5f;
            cs.YTick   = 1f;


            // Vertical
            //cs.BarType = ChartStyle.BarTypeEnum.Vertical;


            // Horizontal
            //cs.BarType = ChartStyle.BarTypeEnum.HorizontalOverlay;
            cs.BarType = ChartStyle.BarTypeEnum.HorizontalStack;
        }
        // Shared initialization code
        void Initialize()
        {
            this.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
            BackColor = Color.Wheat;
            PlotPanel = new PlotPanel(Frame);

            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";

            cs.XLimMin = 0f;
            cs.XLimMax = 25f;
            cs.YLimMin = 0f;
            cs.YLimMax = 5f;
            cs.XTick = 5f;
            cs.YTick = 1f;

            // Vertical
            //cs.BarType = ChartStyle.BarTypeEnum.Vertical;

            // Horizontal
            //cs.BarType = ChartStyle.BarTypeEnum.HorizontalOverlay;
            cs.BarType = ChartStyle.BarTypeEnum.HorizontalStack;
        }