First YValue using THistogramFunction is nonsense
Posted: Fri Jan 25, 2008 2:43 pm
The fist YValue of Serie1 is much to high.
It seems always to be : 1000 - rest of all. Where is the bug ?
Example (Delphi 5 enterprise, TeeChart pro 8 VCL)
unit Main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Series, TeEngine, ExtCtrls, TeeProcs, Chart, StdCtrls, TeeHistogram;
type
TForm1 = class(TForm)
Chart1: TChart;
Series1: TBarSeries;
Series2: TPointSeries;
Panel1: TPanel;
Fill: TButton;
Histogram: TButton;
procedure FillClick(Sender: TObject);
procedure HistogramClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FillClick(Sender: TObject);
var i :integer;
begin
for i:=0 to 100 do
Series2.AddXY ( random(1000),random(1000) );
end;
procedure TForm1.HistogramClick(Sender: TObject);
begin
Series1.SetFunction(THistogramFunction.create(Self));
Series1.DataSource:=Series2;
end;
end.
It seems always to be : 1000 - rest of all. Where is the bug ?
Example (Delphi 5 enterprise, TeeChart pro 8 VCL)
unit Main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Series, TeEngine, ExtCtrls, TeeProcs, Chart, StdCtrls, TeeHistogram;
type
TForm1 = class(TForm)
Chart1: TChart;
Series1: TBarSeries;
Series2: TPointSeries;
Panel1: TPanel;
Fill: TButton;
Histogram: TButton;
procedure FillClick(Sender: TObject);
procedure HistogramClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FillClick(Sender: TObject);
var i :integer;
begin
for i:=0 to 100 do
Series2.AddXY ( random(1000),random(1000) );
end;
procedure TForm1.HistogramClick(Sender: TObject);
begin
Series1.SetFunction(THistogramFunction.create(Self));
Series1.DataSource:=Series2;
end;
end.