                    Delphi PIECHART Component

This Delphi PieChart component is part of my ShowMan disk space usage program.  
It is placed in the public domain by me, but remains Copyright  David J Taylor, 
Edinburgh, 1996-7.  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 publicly 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. folder 
or file names) which had an associated value, i.e. the file or folder 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 folder being 
opened, or the parent folder if a file rather than a folder 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 an item value, and an optional item 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 the TESTBED 
folder.

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 folder, 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....

E-mail:  david.taylor@gecm.com
Web page: http://www.users.globalnet.co.uk/~hermes02


Release notes:

V1.0.0  1996 May 26  First public version
V1.1.0  1996 Dec 08  Revised the Icon to match the chart colours better
V1.2.0  1997 Feb 08  Add right-click response
                     Add ClickedString property
V1.2.4  1997 Mar 15  Minor bug fix for widely varying segment sizes
V1.2.6  1997 Apr 12  Add Canvas property as public to allow copying chart
V1.3.0  1997 May 12  Version for Delphi 3.0
                     Make Colours an array rather than 6 values, keep as properties
                     Define both 32 x 32 and 16 x 16 icons
V1.3.2  1997 May 18  Derive from MultiColourControl (from TGraphicControl)
                     Allow for up to 8 colours, user defined
                     Add chart outline if no data (for inital "ghost" display)
                     Update with Howard Harvey's ideas
V1.4.0  1997 Dec 05  Compile with Delphi 3.02
                     Allow negative numbers in source data
                       - treat as positive for display, copy as-is to list box
                       - display in a "background", ghosted light grey colour


1997 December 05
