// Methods
 internal PaneCollection(ChartControl owner)
 {
     Owner     = owner;
     StockPane = new Pane("STOCK", Owner, Chart.visualSettings.BackgroundImageResourceName)
     {
         PercentHeight   = 100f,
         TitleBoxVisible = false
     };
     PositionList.Add(StockPane);
     XAxisPane = new XAxisPane(Owner);
 }
        internal void Draw(Graphics g, Rectangle clipRectangle)
        {
            GraphicsContainer container;

            foreach (Pane pane in PositionList)
            {
                if (clipRectangle.IntersectsWith(pane.Bounds))
                {
                    container = g.BeginContainer();
                    g.SetClip(pane.Bounds);
                    g.TranslateTransform(pane.Left, pane.Top);
                    pane.PrepareToDraw(g);
                    g.EndContainer(container);
                }
            }
            XAxisPane xAxisPane = XAxisPane;

            if (Chart.YAxisAlignment == YAxisAlignment.Right)
            {
                xAxisPane.Bounds = new Rectangle(0, xAxisPane.Top, Chart.ClientRect.Width - Chart.YAxisWidth,
                                                 xAxisPane.Height);
            }
            else
            {
                xAxisPane.Bounds = Chart.YAxisAlignment == YAxisAlignment.Left ?
                                   new Rectangle(Chart.YAxisWidth, xAxisPane.Top, Chart.ClientRect.Width - Chart.YAxisWidth, xAxisPane.Height) :
                                   new Rectangle(Chart.YAxisWidth, xAxisPane.Top, Chart.ClientRect.Width - (Chart.YAxisWidth * 2), xAxisPane.Height);
            }
            if (clipRectangle.IntersectsWith(xAxisPane.Bounds))
            {
                container = g.BeginContainer();
                g.SetClip(xAxisPane.Bounds);
                g.TranslateTransform(xAxisPane.Left, xAxisPane.Top);
                xAxisPane.Draw(g);
                g.EndContainer(container);
            }
            foreach (Pane pane3 in PositionList)
            {
                if (clipRectangle.IntersectsWith(pane3.Bounds))
                {
                    container = g.BeginContainer();
                    g.SetClip(pane3.Bounds);
                    g.TranslateTransform(pane3.Left, pane3.Top);
                    pane3.Draw(g);
                    g.EndContainer(container);
                }
            }
        }