twm's homepage logo
From someone who traveled abroad to learn appreciating his own country ...
dummzeuch.de chart for Delphi 7 and Kylix 3
Deutsch English
Google
Search dummzeuch.de
Search WWW

Introduction

This is a free (MPL) Delphi component package (actually two, a designtime and a runtime package) containing some charts. They can not compete with commercial products like TeeChart from Steema Software but they do what I needed.

This is not 100% original work, I used Paul Warren's Homegrown Charts as a basis, but I extended them significantly. Paul has allowed me to release the result with a different name under the Mozilla Public Licence.

Features

The package contains three components

  • TdzXYChart
  • TdzPieChart (not finished)
  • TdzPolynomialDataseries

TdzXYChart

TdzXYChart can draw a two dimensional chart using different formats for lines and points. It automatically scales the axes. It can also draw a bar chart. The number of data series containing the values is virtually unlimited. A special chart type called ctAlternateLine allows to have lines from -infinity to +infinity (think quality control charts). The point styles psUpArrow and psDownArror allow to mark specific points with an up or down arrow.

New in version 2.1.0 is the ability to draw multi value data series as High/Low High/Low/Open/Close and Candle charts.

TdzPieChart

TdzPieChart is not finished. I have only added a few methods and properties to make it compatible with the new design but also commented out some of Paul's original code to get it to compile at all. If you need a working pie chart, you might be better off using the one from Paul. Of course you can extend and fix this component yourself and send me a patch, I will gladly include it into my package. Maybe I will even make it work myself at some future time, if need arises.

TdzPolynomialDataseries

TdzPolynomialDataseries is a data series component for drawing curves based on a polynom (you remember those from maths classes, don't you? y = ax^2 + bx + c). It includes a property editor for specifying the factors.

Non-Features

Neither of the charts has any interactive capabilities, so zooming or moving the display using the mouse is not possible. Of course you could add these functions yourself. ;-)

Please note that this package has only been tested with Delphi 7 and Kylix 3. Since it makes use of subcomponents I doubt that it will even compile with anything older than Delphi 6. I don't plan to support any older Delphi versions.

Update

NOTE: In dzCharts 2.1 I have changed the TXYChart.Grid property from being an enum to being a subcomponent. If you have already used dzCharts 2.0 in some of your forms, you will get an access violation when you try to open them. This is due to Delphi trying to use the enum stored in the dfm file as an object. To fix this, open your .dfm file in a text editor (e.g. Notepad), search for all lines containing the Grid property and delete them. After that it should be possible to open the forms in Delphi again. If your .dfm file is in binary format, you must use the convert utility that comes with Delphi to convert it to text (and back, if you still want binary format).

There are lots of new things in version 2.1.0, but unfortunately I only recently started to document the changes. The most important change is that dzChart now supports not only single value data series but also multi value data series (see u_dzDataSeries). Also the callback events for adding horizontal/vertical lines and up/down arrows have been replaced by a new chart type ctAlternatingLine and a new point style (psUpArrow, psDownArrow). I think this is much more convenient than my original solution. Scaling the axes has also been improved, see the Scale subcomponent of the axis.

Installation

  • Load dzchart-d7.bpl or dzchart-k3.bpl respectively into the ide
  • Each bpl contains 3 projects:
    • dummzeuchchart-??.dpk - the runtime package
    • dcldummzeuchchart-??.dpk - the designtime package
    • ChartTest.dpr - a test / demo program
  • adjust output paths for the projects
  • compile dummzeuchchart-??.dpk and dcldummzeuchchart-??.dpk
  • install dcldummzeuchchart-??.dpk

There should now be an additional page "dummzeuch.de" on the component palette containing three components: dzPieChart, dzPolynomialDataseries and dzXYChart.

(If you don't understand these instructions, this package probably isn't for you since you need more than basic Delphi skills to make use of it.)

Uninstallation

If you don't like what you get, you can easily remove the packages by deleting the *.bpl files and telling the ide to not load them when it complains on startup that it can't find them. You might also want to check the library path under tools / options and remove the source directory from it.

Usage

Drop a TdzXYChart and a TdzPolynomialDataseries on a form, set the latter's Chart property to the chart. You should now see a parabola (y = x^2) displayed on the chart. You can add more dataseries if you like.

To display your own data you need to write an object implementing the IdzDataseries interface. See the source code for details.

Documentation is supplied in the source code itself in a format suitable for PasDoc (http://pasdoc.sf.net), use ":" as marker.

Licence

Version: MPL 1.1

The contents of this package are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this package except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original package is dummzeuch.de Charts.

The Initial Developer of the Original package is

Thomas Mueller <chart@dummzeuch.de>.

Portions created by the Initial Developer are Copyright (C) 2003 the Initial Developer. All Rights Reserved.

Contributor(s):

  • Paul Warren

Warranty

There is absolutely NO WARRANTY for this package. You use it AT YOUR OWN RISK.

Download

You can download dzchart from http://dzchart.berlios.de. There is also Subversion access to the latest sources available.

BerliOS Developer Logo

This document was generated using AFT v5.095

last updated: 2012-10-14 twm
Post to del.icio.us Best Viewed With Open EyesValid XHTML 1.0!