Sign in Join
Wiki copytemporary

RingChart and AnalogWatch: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11> **Warning:** The chart components needed by this component have been removed from Lazarus in version 1.4. Since this time this page is outdated.
22
3-\
4-
53## About
64
75*TRingChart* component is an elliptic Sectors Chart that we can consider a twin of the LCL TChart Component in the sense that has the same structure, particularly for the data input structure, but the rest is original.
86
97**What's new?**
108
1191. it is accurate in the sense that every sector surface is really proportionated to his pie percentage (TCanvas.RadialPie is similar but not exact for area) so if a green sector value is 17.27% of total values the green area is the 17.27% of the total ellipse area;
12102. it allows to include:
1311 - label (value and/or percentage)
1412 - legend (none, inside or outside)
15133. it manage value as double (not only integer)
16144. it allows:
1715 - change a single sector (Name or label, Value and color)
1816 - delete a single sector;
19175. it can appeares as a ring sectorized or a Pie (very rough)
2018
2119*TAnalogWatch* is a graphic component that use a timer to show the current time in analog way. Just put it on a form. You can personalize the watch with your fovourites colors. An OnAppointment notify event has been added in the latest version that is triggered when the current time is equal to MeetTime (please read carefully the readme.txt file). From the version 0.3 (thanks to Seth Grover) the Watch has differents "mode":
2220
23211. "Clock" - the current default mode
24222. "Stopwatch" - behaves like a stopwatch (you set the mode to stopwatch mode and then set StopwatchRunning to true or false to start/stop the stopwatch)
25233. "Defined" mode - simply displays the time you tell it to display with the DefinedTime property.
2624
2725Furthermore there are some properties that hide/shows thinks like the tick marks, the digits on the clock face, and each hand individually . The zip file contains a Lazarus Package that allows you to easy install the components (just compile and install). Furthermore, there is a simple example that shows how to use the components.
2826
2927These components have been tested on win32 and linux (gtk1) but it should be cross-platform.
3028
3129## Screenshot
3230
3331Here are how they appear. RingChart is with these setting:
3432
3533- Legend:=lpOutSide;
3634- KindOfLabel:=klBoth;
3735- Ring:=true;
3836
39-<figure>
40-<img src="Ringandwatch.png" title="Ringandwatch.png" />
41-<figcaption>Ringandwatch.png</figcaption>
42-</figure>
37+![](/wiki-images/c/c0/Ringandwatch.png)
4338
4439## Author
4540
4641Salvatore Coppola
4742
4843## License
4944
5045modified LGPL same as Lazarus LCL license (see the COPYING.LGPL and the COPYING.modifiedLGPL that come with this package or the same files that come with the Lazarus distro)
5146
5247## Download
5348
5449The latest release can be found on the [Lazarus CCR Files page](http://sourceforge.net/projects/lazarus-ccr/files/RingChart%20and%20AnalogWatch/)
5550
5651## Change Log
5752
5853- Version 0.1 2005/11/22
5954- Version 0.2 2006/02/26
6055- Version 0.3 2007/04/13
6156
6257## Dependencies / System Requirements
6358
6459- FCL and LCL that come with Lazarus
6560
6661Status: Beta
6762
6863## Installation
6964
7065- Unpack the zip file where you want, for instance "mylazarus\mycomponents": you will find "mylazarus\mycomponents\ringwatch" that contain the files package and the example
7166- Open lazarus
7267- Open the package ringwatch.lpk with Component/Open package file (.lpk)
7368- (Click on Compile only if you don't want to install the component into the IDE)
7469- Click on Install
7570- After installation the components will be available in the *Misc* tab of the IDE.
7671
7772## Usage
7873
7974After installed, you will find in 'Misc' tab of the Lazarus Compontens 2 new components:
8075
8176*RingChart*: Drop the components on a form. Change some properties as you like and use this code to fill the Chart (how many sectors you want):
8277
8378``` pascal
8479procedure TForm1.Button1Click(Sender: TObject);
8580begin
8681 RingChart1.Clear;
8782 RingChart1.AddSector('Red', 25.5, clRed);
8883 RingChart1.AddSector('Fuchsia', 12.2, clFuchsia);
8984 RingChart1.AddSector('Green', 15, clGreen);
9085 RingChart1.AddSector('Yellow', 4, clYellow);
9186 RingChart1.AddSector('Aqua', 20, clAqua);
9287 RingChart1.AddSector('Cream', 6.33, clCream);
9388end;
9489```
9590
9691*AnalogWatch*: Put it on a form Set colors as you want. If you assign the OnAppointment don't forget to set the MeetTime. You can use the MeetTime property Editor registered in the Lazarus IDE to easy assign his value or simply set it in the OI
9792
9893## The ringchartwatch Example Application
9994
10095The ringchartwatch.lpi example is included in the example directory Install the ringwatch package Before to compile and run it with Lazarus and FPC
10196
10297## See also
10398
10499- [[TAChart]]
105100
106101---
107102*From the Free Pascal wiki, page "RingChart and AnalogWatch", as it stood on 2020-02-25 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
108103Category: Charting
109104Category: Components
110105Category: Lazarus-CCR

Back to history