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);
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!