using System;
using System.Collections;
using System.Drawing;
using System.Runtime.Serialization;
using System.Windows.Forms;

using Chart;

namespace DataPerformerUI
{


	
	public class PanelChart : Panel
	{
		protected ChartPerformer performer;
		
		public PanelChart(int[,] insets)
		{
			performer = new ChartPerformer(this, insets);
			Paint += new PaintEventHandler(onPaint);
			Resize += new EventHandler(onResize);
			BackColor = Color.White;
		}

		protected PanelChart()
		{
		}
		
		public ChartPerformer Performer
		{
			get
			{
				return performer;
			}
		}
		
		protected void onPaint(object sender, PaintEventArgs e)
		{
			performer.Paint(e.Graphics);
		}

		protected void onResize(object sender, EventArgs e)
		{
			performer.Resize();
			performer.RefreshAll();
		}

	}

}

