TAChart is a charting LGPL component for Lazarus (TeeChart LineSerie like).
Its main caracteristics are :
- Unlimited number of curves
- Unlimited number of points
- Graph legend
- Graph title
- Axis labels
- Interactive zoom
- Cross hair or vertical cross hair cursor with point measure
- Line drawing between points
- Point drawing on each point
- Different point shapes (square,circle, cross, diagonal cross and star)
- Color each point and line
- Mirror on X axis
- Auto or manual graph limits
- Linear least square fitting
- Smart marks drawing
- Vertical and horizontal line graph type
- Easily extensible to new graph types
The download contains the component, an installation package and a demo application, that illustrates the features of the component along with some instrumentation for evaluating the chart on a given system.
This component was designed for cross-platform applications.
Here is an exemple of TAChart displaying a noisy line (in blue), a fitted line (in black) and a cross hair:
LGPL (please contact the author if the LGPL doesn't work with your project licensing)
The latest stable release can be found on the Lazarus CCR Files page.
- Version 1.0 2005/04/06
- Version 1.1 2005/06/10
- TTAChart.GetNewColor added to automate color choice. - A lot of bug corrections.
- Version 1.2 2006/02/01
- New graphe simple type : Horizontal or vertical line - New point shapes - Bug correction for Linux - Bug correction for cross hair
Dependencies / System Requirements
Issues: Tested on Windows and Linux.
- Create the directory lazarus\components\tagraph
- On this directory, unzip the files from tagraph\lazarus\component of the zip file
- Open lazarus
- Open the package ta.lpk with Component/Open package file (.lpk)
- (Click on Compile only if you don't want to install the component into the IDE)
- Click on Install
Drop the component on a form. Change some properties as you like and use this code to add a curve :
procedure TForm1.Button1Click(Sender: TObject); var Serie:TTASerie; i:Integer; begin Serie:=TTASerie.Create(TAChart1); TAChart1.AddSerie(Serie); Serie.ShowLines:=True; Serie.ShowPoints:=False; Serie.Title:='Sinus'; for i:=-500 to 499 do Serie.AddXY(i/10,Sin(i/10)*10,clBlack); end;
Use this code to add a horizontal line :
procedure TForm1.Button12Click(Sender: TObject); var TALine:TTALine; begin TALine:=TTALine.Create(TAChart1); TAChart1.AddSerie(TALine); TALine.LineStyle:=lsHorizontal; TALine.Position:=10.231; TALine.Visible:=True; end;
See the example project TestOfTAGraph for additional examples of component usage. See a complex application example written in Delphi6PE at the adress : http://www.martinole.org/Waves.html
The TestOfTAGraph Example Application
The TestOfTAGraph application requires TAGraph to be installed in order to compile and operate. It shows how to use many of the TAGraph features.
- Open TestOfTaGraph.lpi