Example3_2.ChartStyle.AddChartStyle C# (CSharp) Method

AddChartStyle() public method

public AddChartStyle ( Graphics g ) : void
g System.Drawing.Graphics
return void
        public void AddChartStyle(Graphics g)
        {
            // Draw ChartArea and PlotArea:
            Pen aPen = new Pen (ChartBorderColor, 1f);
            SolidBrush aBrush = new SolidBrush (ChartBackColor);
            g.FillRectangle (aBrush, ChartArea);
            g.DrawRectangle (aPen, ChartArea);
            aPen = new Pen (PlotBorderColor, 1f);
            aBrush = new SolidBrush (PlotBackColor);
            g.FillRectangle (aBrush, PlotArea);
            g.DrawRectangle (aPen, PlotArea);
            aPen.Dispose ();
            aBrush.Dispose ();
        }

Usage Example

Example #1
0
        public override void DrawRect(System.Drawing.RectangleF dirtyRect)
        {
            var g = new Graphics();

            g.Clear(backColor);

            cs.ChartArea = this.ClientRectangle;
            AddData();
            SetPlotArea(g);
            cs.AddChartStyle(g);
            dc.AddLines(g, cs);
            g.Dispose();
        }
All Usage Examples Of Example3_2.ChartStyle::AddChartStyle