Page 1 of 1

Histogram

Posted: Wed Dec 28, 2005 4:28 pm
by 8437686
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.

Posted: Thu Dec 29, 2005 9:27 am
by narcis
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;

Posted: Sat Jan 07, 2006 6:46 am
by 9338026
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.