                    Delphi 2.01 PIECHART Component

This Delphi 2.01 PieChart component is part of my ShowMan disk space 
usage program.  It is placed in the public domain by me, but reamins 
copyright of David Taylor, Edinburgh, 1996.  This unit is not required 
to run ShowMan, but would be required to recompile ShowMan.

Background

I needed a simple pie-chart unit before the arrival of Delphi when
developing an earlier 16-bit version of ShowMan.  The problem of 
detecting just where the mouse had been clicked had also interested me
when developing a simple darts for Windows program (this will not be
publically released) and a darts board does look quite like a pie 
chart.

The requirement was for a pie chart that could display text strings 
(i.e. directory or file names) which had an associated value, i.e.
the file or directory size.  In addition, a list box can be associated 
with the pie chart to give a textual display of the data.  Double
clicking a pie segment will result in the caller being notified.  In 
the ShowMan program, this results in a new directory being opened, or
the parent directory if a file rather than a directory is clicked.  
You can code similar behaviour into the list box, should you wish.

Data loading

To get the data into the pie-chart a TStringList is used, and it is 
assumed that the strings will contain at least a numeric value, and
an optional display label:

  12  Carrots
   8  Bananas
  15  Apples
   6  Pears
   5

The items will be sorted in ascending value order, and the value can 
have leading spaces.  It is assumed to be a number that can be read 
with the Delphi VAL procedure.

What is provided?

In addition to the pie chart unit, there is a simple test program 
in PIE_TEST directory.

Usage

You install the PieChart component just like any other.  I suggest
placing the PIECHART.* files in your normal Delphi library, or you can
put them into their own directory, and add this to your Delphi library 
path.  Use the Component, Install, Add menu.

Contacting the author

Please note that whilst I cannot deal with any problems you may have 
using this unit, I'd welcome any comments or suggestions you might have
since I don't have a lot of experience writing components....

Release notes:

V1.0.0  1996 May 26  First public version
V1.0.2  1996 Dec 08  Revised the Icon to match the chart colours better


E-mail: david.taylor@gecm.com
1996 December 08
