public bool loadData(PieChartData pieChartData) {

            this.pieChart = new ChartDirector.PieChart(this.Size.Width, this.Size.Height); 

			switch (this.validateData(pieChartData)) {
				case DataValidation.INVALID:
					this.drawInvalidChart("Invalid Data");
					return false;
				case DataValidation.EXCEEDS100PERCENT:
					this.drawInvalidChart("Sum of all percent values exceeds 100%");
					return false;
				case DataValidation.VALID:
					//if (!this.compareTo(pieChartData)) {
						//this.drawInvalidChart("Valid DATA, GREAT!!!");
						this.chartData = pieChartData;
						this.drawChart();
					//}
					return true;
			}
			return false; //unknown case
		}
		private bool compareTo(PieChartData pieChartData) {
			
			if (this.chartData == null || !this.chartData.Title.Equals(pieChartData.Title) || 
				this.chartData.Data.Length != pieChartData.Data.Length) {
			
				return false;
			}

			for (int i = 0; i < this.chartData.Data.Length; i++) {

				if (this.chartData.Data[i] != pieChartData.Data[i] || !this.chartData.Labels[i].Equals(pieChartData.Labels[i]))
					return false;
			}

			return true;
		}
		private DataValidation validateData(PieChartData pieChartData) {

			if (pieChartData == null || pieChartData.ChartType != ChartType.PIE || pieChartData.Data == null || 
				pieChartData.Labels == null || pieChartData.Data.Length != pieChartData.Labels.Length) {

				return DataValidation.INVALID;
			}
			else {
				double sum = 0;
				foreach (double num in pieChartData.Data)
					sum += num;

				if (sum > 100)
					return DataValidation.EXCEEDS100PERCENT;
				else
					return DataValidation.VALID;
			}
		}