Recent

Author Topic: Tachart : Accessing to series ...  (Read 5545 times)

Gozaki

  • Newbie
  • Posts: 4
Tachart : Accessing to series ...
« on: January 06, 2011, 02:53:21 pm »
Hello !

Newcomer to Lazarus, I've a question regarding the Tachart Component.
How to do something like that :

form1.chart1.Series.Items[nbrtrace].AddXY(i*step,j,'',clRed);

Thanks

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Tachart : Accessing to series ...
« Reply #1 on: January 06, 2011, 03:11:20 pm »
Could you explain what does it mean?

Gozaki

  • Newbie
  • Posts: 4
Re: Tachart : Accessing to series ...
« Reply #2 on: January 06, 2011, 03:36:20 pm »
Sure !

I'm reading a binary file (using streams) containing interleaved oscilloscope traces. There is 16 traces in the file. I've thus created a chart with 16 series. I would like to add points to the chart series using such code :

For i:= 0 to tracenumber do
 for j:=0 to xypointsnumber do
    chart.serie.items.addXY (x,y,'',clred)

Thanks

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Tachart : Accessing to series ...
« Reply #3 on: January 06, 2011, 03:39:02 pm »
Perhaps you can add them like this:

Code: [Select]
TBarSeries(chart1.Series[nbrtrace]).AddXY(i*step,j,'',clRed);

Gozaki

  • Newbie
  • Posts: 4
Re: Tachart : Accessing to series ...
« Reply #4 on: January 06, 2011, 03:57:32 pm »
It's working ! Thanks a lot !

 

TinyPortal © 2005-2018