Histogram Queries

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
drillright40
Newbie
Newbie
Posts: 57
Joined: Mon Nov 19, 2007 12:00 am

Histogram Queries

Post by drillright40 » Tue Nov 11, 2008 5:01 am

Hi,

1.How do we change the NumOfBins property on Histogram Programmatically.We also tried changing this property in the code but observed that there was no change in the plotting of Histogram.


2.Our requirement is to display only X Axis Cursor.So can we disable the Y Axis Cursor in the Cursor Tool.

3.If i set the Min and Max value using the SetMinMax , it is not reflecting in the Histogram.It takes the Min Max in the data.What else do we need to do for this.

Thanks
Sanyog.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Nov 11, 2008 9:17 am

Hi Sanyog,
1.How do we change the NumOfBins property on Histogram Programmatically.We also tried changing this property in the code but observed that there was no change in the plotting of Histogram.
You need to do this as shown in the What's New?\Welcome !\New Functions\Histogram Function example in the features demo, available at TeeChart's program group.
2.Our requirement is to display only X Axis Cursor.So can we disable the Y Axis Cursor in the Cursor Tool.
Ok, you can set its style like this:

Code: Select all

			cursor1.Style = Steema.TeeChart.Tools.CursorToolStyles.Vertical;
3.If i set the Min and Max value using the SetMinMax , it is not reflecting in the Histogram.It takes the Min Max in the data.What else do we need to do for this.
This works fine for me here using this code:

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			tChart1.Aspect.View3D = false;
			tChart2.Aspect.View3D = false;

			Steema.TeeChart.Styles.Points points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
			points1.FillSampleValues(1000);

			Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart2.Chart);

			Steema.TeeChart.Functions.HistogramFunction histogram1 = new Steema.TeeChart.Functions.HistogramFunction(tChart2.Chart);
			
			bar1.Function = histogram1;
			bar1.DataSource = points1;
			bar1.Marks.Visible = false;

			histogram1.NumBins = 10;
			histogram1.Recalculate();

			tChart2.Axes.Bottom.SetMinMax(500, 1000);
		}
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply