public AddChartStyle ( |
||
g | ||
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 ();
}
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(); }