RingChart and AnalogWatch

From Lazarus wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


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.

What's new?

  1. 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;
  2. it allows to include:
    • label (value and/or percentage)
    • legend (none, inside or outside)
  3. it manage value as double (not only integer)
  4. it allows:
    • change a single sector (Name or label, Value and color)
    • delete a single sector;
  5. it can appeares as a ring sectorized or a Pie (very rough)

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). 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.

These components have been tested on win32 and linux but it should be cross-platform.


Here are how they appear. RingChart is with these setting:

  • Legend:=lpOutSide;
  • KindOfLabel:=klBoth;
  • Ring:=true;



Salvatore Coppola


modified 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)


The latest stable release can be found on the Lazarus CCR Files page

Change Log

  • Version 0.1 2005/11/22

Dependencies / System Requirements

  • FCL and LCL that come with Lazarus

Status: Beta


  • 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
  • Open lazarus
  • Open the package ringwatch.lpk with Component/Open package file (.lpk)
  • Click on Compile
  • Click on Install


After installed, you will find in 'Misc' tab of the Lazarus Compontens 2 new components:

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):

procedure TForm1.Button1Click(Sender: TObject);

AnalogWatch: Just put it on a form and set colors as you want

The ringchartwatch Example Application

The ringchartwatch.lpi example is included in the example directory Install the ringwatch package Before to compile and run it with Lazarus and FPC