Forum > Graphics

Best way to represent square waves

(1/2) > >>

ollopa:
Hello,

I have some waveform data from a logic analyzer that I would like to load and display with Lazarus, but I'm not sure what the best component to use would be.  I don't have any experience working with graphics in Lazarus, so I'm seeking advice before fumbling around on my own. 

Here are some examples of the type of graphs I'd like to be able to draw:

http://www.ep.com.pl/antoniak/sla/sla_counter.gif
http://www.usbee.com/sxlanew.gif
http://www.hobbylab.us/Oscilloscope/Help/Images/FmLan.png

I don't think this should be too difficult.  I noticed there are some standard chart components that might work well.  I'm just hoping somebody can tell me if that's a good way to go or if maybe there is a better way.  I need to have the label for each waveform be to the left side of the chart area and the waveforms need to be stacked one on top of the other.  I'll also need to scroll and have a horizontal time axis. 

The last item that might not be as obvious in the examples I posted are the two vertical cursors for measuring the time interval between two data points.  I don't think cursors are a part of the standard charts and I'll need advice on how to implement them.

Thanks in advance to anyone who can offer suggestions   :)

-ollopa

mmab:

The component Tchart fits to your needs.
If you need a very speedy plotter, you could use hardware accelerated graphic lib. such as opengl, directx etc.


ollopa:
Any suggestions for implementing cursors with Tchart?

mmab:

Please look at Tchart paint procedure.
You can put cursors (vertical) lines using canvas.line procedure to the end of paint procedure.

It's not difficult to implement.


Ask:
Sorry for the late reply, I missed your post because TAChart was not mentioned in it.
If you still need help with using TAChart in your application, please use mailinglist
to ensure that your message will be noticed.


--- Quote ---Please look at Tchart paint procedure.
You can put cursors (vertical) lines using canvas.line procedure to the end of paint procedure.

--- End quote ---

TAChart already has "TLine" series (which are different from "TLineSeries"),
that can draw vertical and horizontal lines on you chart, so there is no need to
modify the Paint method.

Navigation

[0] Message Index

[#] Next page

Go to full version