Difference between revisions of "TAChart"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
 
{{TAChart}}
 
{{TAChart}}
 
'''This component is out of date, for a more recent version look into lazarus Aditional Tab.'''
 
  
 
=== About ===
 
=== About ===
TAChart is a charting LGPL component for Lazarus (TeeChart LineSerie like).  
+
TAChart is a charting LGPL component for Lazarus (TeeChart like).
 +
It contains the functions that Philippe Martinole developed for the TeleAuto project and lots
 +
of changes introduced by Luis Rodrigues while porting the Epanet application from Delphi to Lazarus.
  
 
Its main caracteristics are :
 
Its main caracteristics are :
 
+
* Pie Series
* Unlimited number of curves
+
* Bar Series
* Unlimited number of points
+
* Area Series
* Graph legend
+
* Line Series (can work as Point Series)
* Graph title
+
* Unlimited number of graphs
* Axis labels
+
* Unlimited number of points
* Interactive zoom
+
* Graph legend
* Cross hair or vertical cross hair cursor with point measure
+
* Graph title
* Line drawing between points
+
* Graph footer
* Point drawing on each point
+
* Axis labels
* Different point shapes (square,circle, cross, diagonal cross and star)
+
* Interactive zoom
* Color each point and line
+
* Reticule or vertical reticule with point measure
* Mirror on X axis
+
* Mirror on X axis
* Auto or manual graph limits
+
* Auto or manual graph limits
* Linear least square fitting
+
* Smart marks drawing
* Smart marks drawing
+
* Vertical and horizontal line graph type
* Vertical and horizontal line graph type
+
* Easily extensible to new graph types
* Easily extensible to new graph types
 
  
  
Line 39: Line 38:
  
 
=== Author ===
 
=== Author ===
 +
[[User:LFRodrigues|Luís Rodrigues]]
 +
 
[[User:Marty|Philippe Martinole]]  
 
[[User:Marty|Philippe Martinole]]  
  
=== License ===
 
[http://www.opensource.org/licenses/lgpl-license.php LGPL] (please contact the author if the LGPL doesn't work with your project licensing)
 
 
   
 
   
 
=== Download ===
 
=== Download ===
The latest stable release can be found on the [http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=177586 Lazarus CCR Files page].
+
The latest stable release can be found on the in the lazarus SVN repository (The component is on Lazarus Aditional Tab)
 +
 
 +
The old code developed by Philippe is Here: [http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=177586 Lazarus CCR Files page].
  
 
=== Change Log ===
 
=== Change Log ===
* Version 1.0 2005/04/06
+
* 27/08/2007 - Bugfixes and Implement Inverted Axis (by Helio Rocha-Pinto)
* Version 1.1 2005/06/10
+
* 12/03/2007 - Bugfixes and implement ShowInLegend
  - TTAChart.GetNewColor added to automate color choice.
+
* 01/01/2007 - Initial Release
  - 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 ===
 
* None
 
 
 
Status: Stable
 
 
 
Issues:
 
Tested on Windows and Linux.
 
 
 
=== Installation ===
 
* 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
 
  
 
=== Usage ===
 
=== Usage ===
Drop the component on a form. Change some properties as you like and use this code to add a curve :
+
See included example in Lazarus source in (Lazarus Install Dir)/components/tachart/demo/
 
 
<delphi>
 
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;
 
</delphi>
 
Use this code to add a horizontal line :
 
 
 
<delphi>
 
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;
 
</delphi>
 
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.
 
 
 
'''Installation'''
 
* Open TestOfTaGraph.lpi
 
* compile
 
* run
 

Revision as of 16:24, 27 August 2007

Deutsch (de) English (en) español (es) français (fr) português (pt) русский (ru) українська (uk) 中文(中国大陆)‎ (zh_CN)

About

TAChart is a charting LGPL component for Lazarus (TeeChart like). It contains the functions that Philippe Martinole developed for the TeleAuto project and lots of changes introduced by Luis Rodrigues while porting the Epanet application from Delphi to Lazarus.

Its main caracteristics are :

* Pie Series
* Bar Series
* Area Series
* Line Series (can work as Point Series)
* Unlimited number of  graphs
* Unlimited number of points
* Graph legend
* Graph title
* Graph footer
* Axis labels
* Interactive zoom
* Reticule or vertical reticule with point measure
* Mirror on X axis
* Auto or manual graph limits
* 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.

Screenshot

Here is an exemple of TAChart displaying a noisy line (in blue), a fitted line (in black) and a cross hair:


Tachart.png

Author

Luís Rodrigues

Philippe Martinole


Download

The latest stable release can be found on the in the lazarus SVN repository (The component is on Lazarus Aditional Tab)

The old code developed by Philippe is Here: Lazarus CCR Files page.

Change Log

  • 27/08/2007 - Bugfixes and Implement Inverted Axis (by Helio Rocha-Pinto)
  • 12/03/2007 - Bugfixes and implement ShowInLegend
  • 01/01/2007 - Initial Release

Usage

See included example in Lazarus source in (Lazarus Install Dir)/components/tachart/demo/