Click here to Skip to main content
15,891,431 members
Articles / Web Development / ASP.NET

Race to Linux - Race 3: Reports Starter Kit using Mono SqlServer/Firebird

Rate me:
Please Sign up or sign in to vote.
2.33/5 (2 votes)
30 Sep 20052 min read 53K   328   15  
Reports Starter Kit port to Linux using Mono
using System;
using System.Collections;
using System.Diagnostics;
using System.Drawing;

namespace ASPNET.StarterKit.Chart
{
	//*********************************************************************
	//
	// ChartItem Class
	//
	// This class represents a data point in a chart
	//
	//*********************************************************************

	public class ChartItem 
	{
		private string _label;
		private string _description;
		private float _value;
		private Color _color;
		private float _startPos;
		private float _sweepSize;

		private ChartItem()	{}
		
		public ChartItem(string label, string desc, float data, float start, float sweep, Color clr)
		{
			_label = label;
			_description = desc;
			_value = data;
			_startPos = start;
			_sweepSize = sweep;
			_color = clr;
		}

		public string Label 
		{
			get{ return _label; }
			set{ _label = value; }
		}

		public string Description 
		{
			get{ return _description; }
			set{ _description = value; }
		} 

		public float Value 
		{
			get{ return _value; }
			set{ _value = value; }
		}

		public Color ItemColor 
		{
			get{ return _color; }
			set{ _color = value; }
		}

		public float StartPos
		{
			get{ return _startPos; }
			set{ _startPos = value; }
		}

		public float SweepSize
		{
			get{ return _sweepSize; }
			set{ _sweepSize = value; }
		}
	}

	//*********************************************************************
	//
	// Custom Collection for ChartItems
	//
	//*********************************************************************

	public class ChartItemsCollection : CollectionBase 
	{
		public ChartItem this[int index] 
		{
			get{ return (ChartItem)(List[index]); }
			set{ List[index] = value; }
		}
 
		public int Add(ChartItem value) 
		{
			return List.Add(value);
		}
 
		public int IndexOf(ChartItem value) 
		{
			return List.IndexOf(value);
		}
 
		public bool Contains(ChartItem value) 
		{
			return List.Contains(value);
		}

		public void Remove(ChartItem value) 
		{
			List.Remove(value);
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Uruguay Uruguay
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions