Bug in HistogramFunction?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
AIS
Newbie
Newbie
Posts: 70
Joined: Wed Jun 25, 2008 12:00 am

Bug in HistogramFunction?

Post by AIS » Fri Jul 11, 2008 2:52 pm

Hello,

i have a problem with a HistogramFunction. If the Function only get a DataTable with one value it calculate something wrong. See the Code below to better understand what i mean:

Code: Select all

Steema.TeeChart.TChart tChart = new Steema.TeeChart.TChart();
tChart.Dock = DockStyle.Fill;
tChart.Aspect.View3D = false;
this.Controls.Add(tChart);

DataTable data = new DataTable();

Steema.TeeChart.Styles.Points baseData = new Steema.TeeChart.Styles.Points();
Steema.TeeChart.Styles.Histogram histogram = new Steema.TeeChart.Styles.Histogram();
Steema.TeeChart.Functions.HistogramFunction histoFunc = new Steema.TeeChart.Functions.HistogramFunction();
            
data.Columns.Add(new DataColumn("Y", typeof(double)));
data.Rows.Add(5);
//data.Rows.Add(5); // delete comment to see difference

baseData.DataSource = data;
baseData.YValues.DataMember = "Y";
histogram.Function = histoFunc;
histogram.DataSource = baseData;

tChart.Series.Add(baseData);
tChart.Series.Add(histogram);
case 1:
The DataTable have one Value (5) and the Point is drawn correctly at X:0 and Y:5. But the Histogram show, that there is one Y=0 value. Correctly it musst show one Y=5 value.

case 2:
The DataTAble have two Values (5,5) and the Points are drawn correctly at X:0,Y:5 and X:1,Y:5. The Histogram also correctly show two Y=5 values.

I would think this is a bug, or is there any property, which is not set?

Thanks in advance!

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

Post by Narcís » Fri Jul 11, 2008 3:02 pm

Hi AIS,

I'm afraid this is a bug (TF02013240) which I've added to the list to be fixed for next releases.
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

AIS
Newbie
Newbie
Posts: 70
Joined: Wed Jun 25, 2008 12:00 am

Post by AIS » Fri Jul 11, 2008 3:15 pm

Hi Narcís,

i think an analog problem has the HorizBox, if there only is one value in a DataTable. In that case occurs a "System.IndexOutOfRangeException".

Bye!

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

Post by Narcís » Fri Jul 11, 2008 5:47 pm

Hi AIS,

Yes, this is a known issue that has been fixed for next maintenance release.
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