#ifndef	_DATAPLOT_H
#define	_DATAPLOT_H
///Comments last updated by Joseph on 03/12/2007
	/// ML 5/24/2007 QA70-8342 RECALCULATING_WHISKERS_ETC_ON_PD_DLG_CHANGE
/** >Internal Origin Objects
*/

/// YuI 12/21/07 QA7-10854 MOVE_HISTOGRAM_TO_VC
// compiling out
#ifdef	OC_STATS_DATA_PLOT
/// end MOVE_HISTOGRAM_TO_VC

class	 OC_REGISTERED StatDataPlot	:	public	DataPlot
{ 
public:
	StatDataPlot();
	~StatDataPlot();
	
public:
	/**
	*/
	/// ML 5/24/2007 QA70-8342 RECALCULATING_WHISKERS_ETC_ON_PD_DLG_CHANGE
	//BOOL	UpdatePercentileDataset();
	BOOL	UpdatePercentileDataset(int nOptions = STATPLOTUPDATE_DEFAULT);
	/// end RECALCULATING_WHISKERS_ETC_ON_PD_DLG_CHANGE

	/**
	*/
	int		GetSourceDataSize();
	
	/**
	*/
	BOOL	GetBinMinMax(double& dMin, double& dMax, double& dStep);
	
	/**
	*/
	BOOL	GetStatResults(double& dMin, double& dMax, double& dMean, double& dSD, double& dSE, double& dLC, double& dUC);
	
	/**
	*/
	BOOL	FrequencyCount(vector<uint>& vCounts);
	
	/**
	*/
	BOOL	Percentiles(vector& vPercentiles);
	
	/**
	*/
	BOOL	GetTickLabel(string& strLabel);
	
	/**
	*/
	TreeNode	GetStatsTree(TreeNode& trHistogram);
	
	/**
	*/
	string		GetStatsTreeStorageTag(BOOL& bOperation = NULL);
protected:
	/**
	*/
	BOOL	GetPercentileDataset(Dataset& ds);

	/// YuI 08/11/06 CATEGORICAL_SUPPORT_FOR_STAT_PLOTS
	/**
	*/
	BOOL	GetSourceData(vector& vSource);
	
	/**
	*/
	BOOL	GetStatsResults(DescStatResults& dsr, double& dMin, double& dMax);
	/**
	*/
	
	/// ML 5/24/2007 QA70-8342 RECALCULATING_WHISKERS_ETC_ON_PD_DLG_CHANGE
	//BOOL	UpdateStatsTree(TreeNode& trStats, BOOL& bUpdated);
	BOOL	UpdateStatsTree(TreeNode& trStats, BOOL& bUpdated, int nOptions = STATPLOTUPDATE_DEFAULT);
	/// end RECALCULATING_WHISKERS_ETC_ON_PD_DLG_CHANGE
	
	/**
	*/
	BOOL	UpdateBoxAndWhiskerInfoInStatsTree(TreeNode& trStats);
	
	/**
	*/
	BOOL	UpdateBoxAndWhiskerInfoInStatsTree(TreeNode& trStats, int nBoxType, double dBoxCoeff, int nWhiskerType, double dWhiskerCoeff);
	
	/**
	*/
	BOOL	GetBoxAndWhiskerType(int& nBoxType, double& dBoxCoeff, int& nWhiskerType, double& dWhiskerCoeff);
	
	/**
	*/
	BOOL	UpdateBoxInfoInStatsTree(TreeNode& trStats, int nBoxType, double dBoxCoeff, vector& vPercentiles, DescStatResults& dsr);
	
	/**
	*/
	BOOL	UpdateWhiskerInfoInStatsTree(TreeNode& trStats, int nWhiskerType, double dWhiskerCoeff, vector& vPercentiles, DescStatResults& dsr, double dMin, double dMax);
	/// end CATEGORICAL_SUPPORT_FOR_STAT_PLOTS

	/**
	*/
	/// ML 5/24/2007 QA70-8342 RECALCULATING_WHISKERS_ETC_ON_PD_DLG_CHANGE
	//BOOL		UpdatePercentileDatasetEx(Dataset& ds);
	BOOL		UpdatePercentileDatasetEx(Dataset& ds, int nOptions = STATPLOTUPDATE_DEFAULT);
	/// end RECALCULATING_WHISKERS_ETC_ON_PD_DLG_CHANGE

	
private:
	/**
	*/
	void	CreatePercentileDataset(Dataset& ds);
	
};
/// YuI 12/21/07 QA7-10854 MOVE_HISTOGRAM_TO_VC
// compiling out
#endif //	OC_STATS_DATA_PLOT
/// end MOVE_HISTOGRAM_TO_VC

#endif //	_DATAPLOT_H
