예제 #1
0
 public void AddSeries(ISeries s, ISeriesPainter painter)
 {
     if (parent != null)
     {
         parent.AddSeries(s, painter);
         return;
     }
     series.Add(s);
     painter.Performer = this;
     painters[s]       = painter;
     foreach (ChartPerformer ch in children)
     {
         ISeriesPainter p = painter.Clone() as ISeriesPainter;
         ch.AddSeries(s, p);
     }
 }
예제 #2
0
 /// <summary>
 /// Adds a performer
 /// </summary>
 /// <param name="performer">Performer to add</param>
 public void Add(ChartPerformer performer)
 {
     if (performer == this)
     {
         throw new Exception();
     }
     if (performer.parent != null)
     {
         throw new Exception();
     }
     children.Add(performer);
     performer.parent = this;
     foreach (ISeries s in painters.Keys)
     {
         performer.AddSeries(s, painters[s]);
     }
 }