Page 1 of 1
Histogram Queries
Posted: Tue Nov 11, 2008 5:01 am
by 14047415
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.
Posted: Tue Nov 11, 2008 9:17 am
by narcis
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!