示例#1
0
 // Shared initialization code
 void Initialize()
 {
     this.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
     BackColor             = Color.Wheat;
     dc         = new DataCollection();
     cs         = new ChartStyle(this);
     cs.XLimMin = 0f;
     cs.XLimMax = 6f;
     cs.YLimMin = -1.1f;
     cs.YLimMax = 1.1f;
 }
示例#2
0
 public void AddLines(Graphics g, ChartStyle cs)
 {
     // Plot lines:
     foreach (DataSeries ds in DataSeriesList)
     {
         if (ds.LineStyle.IsVisible == true)
         {
             Pen aPen = new Pen(ds.LineStyle.LineColor, ds.LineStyle.Thickness);
             aPen.DashStyle = ds.LineStyle.Pattern;
             for (int i = 1; i < ds.PointList.Count; i++)
             {
                 g.DrawLine(aPen, cs.Point2D((PointF)ds.PointList[i - 1]),
                            cs.Point2D((PointF)ds.PointList[i]));
             }
             aPen.Dispose();
         }
     }
 }
 public void AddLines(Graphics g, ChartStyle cs)
 {
     // Plot lines:
     foreach (DataSeries ds in DataSeriesList)
     {
         if (ds.LineStyle.IsVisible == true)
         {
             Pen aPen = new Pen(ds.LineStyle.LineColor, ds.LineStyle.Thickness);
             aPen.DashStyle = ds.LineStyle.Pattern;
             for (int i = 1; i < ds.PointList.Count; i++)
             {
                 g.DrawLine(aPen, cs.Point2D((PointF)ds.PointList[i - 1]),
                                  cs.Point2D((PointF)ds.PointList[i]));
             }
             aPen.Dispose();
         }
     }
 }
 // Shared initialization code
 void Initialize()
 {
     this.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
     BackColor = Color.Wheat;
     dc = new DataCollection();
     cs = new ChartStyle(this);
     cs.XLimMin = 0f;
     cs.XLimMax = 6f;
     cs.YLimMin = -1.1f;
     cs.YLimMax = 1.1f;
 }