Histogram

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ceasa
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am

Histogram

Post by ceasa » Wed Dec 28, 2005 4:28 pm

I have a graph with a fast line serie and another histogram serie.
i want assign to the histogram the fast line serie but i dont know.
The values in the histogram havent a interval......where i can fix the interval in the histogram for the values of the fast line serie? i suspose the histogram is a count of values in a interval the values.

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

Post by Narcís » Thu Dec 29, 2005 9:27 am

Hi ceasa,

I'm not 100% sure of what you are trying to achieve. However, the code below may be enough for you. In that snippet, Series1 is a THistogramSeries and Series2 is a TFastLineSeries.

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var i: Integer;
begin
  Series2.Clear;
  for i:=0 to Series1.Count-1 do
    Series2.AddXY(Series1.XValue[i],Series1.YValue[i]);
end;
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

David Novo
Newbie
Newbie
Posts: 71
Joined: Fri Jul 02, 2004 4:00 am
Location: Culver City
Contact:

Post by David Novo » Sat Jan 07, 2006 6:46 am

As you mentioned, to create a histogram you have to define a bin width from your raw data.

Its quite straightforward to process the data yourself into bins, and then create a new binned series in TCHART.

Post Reply