Introduction
License
Disclaimer
Files
Install components
How to start
Contact me
This is a set of 32 bit Delphi components and classes for 2D plot. It is relatively simple. It is more gauge then presentation element. The main features are:
The main component is Tsp_XYPlot derived from the TCustomControl. It has embedded four axis of class Tsp_Axis which constitute field for the data presentation. Data are presented on plot by object of class which must be derived from Tsp_DataSeries=class(TComponent).
Tsp_XYPlot and Tsp_Axis provide base plot functionality like auto scale, zoom and pan and
so on. The Data Series interact with a Tsp_XYPlot and implements data drawing and provide internal data storage or connection with external data. An example of these components is Tsp_XYLine which keep data as XY pairs in the dynamic array and paints lines between data points and/or points markers. There are also Tsp_SpectrLines and Tsp_ndsXYLine in the SGraph. How to write your own series see in notes.
Plot also can has and controls components inherited from Tsp_PlotMarker.
Plot marker draws something on the plot using axis coordinate system. An example of these components are Tsp_LineMarker and Tsp_ImageMarker.
The component files are freeware. You may copy those files as long as you COPY
ALL OF THEM. You cannot distribute source of main units in modified form, except unit
for your data series.
Copyright © 1998-2001, Sergei P. Pod'yachev.
This software and the accompanying files are provided "As Is" and without any warranties as to performance of merchantability or any other warranties whether expressed or implied. The Author cannot and does not guarantee that any functions contained in the Software will be error free. The author is not liable for any damages resulting from the use and misuse of the component.
Root directory contans SGraph source files
sgr_misc.pas Auxiliary unit, used by sgr_def.dcu.
sgr_scale.pas Auxiliary unit, there is implementation of the plot axis
ancestor.
sgr_def.pas Main unit. There are Tsp_xyPlot, Tsp_Axis,
Tsp_DataSeries and Tsp_PlotMarker.
sgr_data.pas Data series for Tsp_xyPlot derived from Tsp_DataSeries.
sgr_eds.pas Additional data series for Tsp_xyPlot.v.2.4
sgr_mark.pas Plot markers for Tsp_xyPlot derived from Tsp_PlotMarker. v.2.3
sgr_reg.pas Registers components, used to install
components.
sgr_reg.dcr Resource file with components
icons.
sgr.dpk Packet source,
can be used to install components ( Delphi 3 ).
sgr4.dpk Packet source, can be
used to install components ( Delphi 4).
sgr5.dpk Packet source, can be
used to install components ( Delphi 5).
sgr.res Need to
compile sgr.dpk file.
subdirectory \doc contains SGraph documentation
here this file your read, I also encourage you to read notes.
subdirectory \help contains help files:
sgr_def.hlp Components help file
sgr_def.cnt Help context file
sgr_defi.cnt Help context file to make link from
Delphi3.cnt file to SGraph help.
sgr_def.toc Help context file to include in the master table (Delphi 5)
subdirectory demo contains files of demo program.
I recommend to see demo program, there are some extensions of SGraph (print, legend).
You have to use unzip program which preserve long file name or you must correct names manually if they was cut. Place to one directory all SGraph source files. If you want place components on other then "Sample" tab, then edit sgr_reg.pas.
Run Delphi. Click Install Component menu item. Do not forget that Delphi must find directory where you place component files (see Search Path). Press Add button and open sgr_reg.pas
You can install components by Install Component menu item and sgr_reg.pas file. You also can use sgr.dpk packet file. In this case, click Open menu item and select sgr.dpk, then press Compile button in packet editor, when packet will be compiled press Install button. If Delphi did know components directory, add it to Library Path on the Library Page of the Environment Options dialog.
You can install components by Install Component menu item and add sgr_reg.pas file. You also can use sgr4.dpk (sgr5.dpk) packet file. In this case, click Open menu item and select sgr4.dpk (sgr5.dpk), then press Compile button in packet editor, when packet will be compiled press Install button. If Delphi did know components directory, add it to Library Path
To install help file for Delphi 3
I also recommend to add to the Include section of the DELPHI3.CNT file this line
:Include sgr_defi.cnt
For Delphi 5 use Customize... menu item in the Help menu to add help for SGraph. For this case there is special content file sgr_def.toc.
After installation I recommend to compile demo program to check components. It also demonstrates some possibilities of SGraph and contains some extensions like print dialog.
Place the plot component and data series component on the form, set Plot property of data series to link it with plot. Play with visual properties of plot and series. While select properties press <F1> key to see help file topic. Please set true-type font to Font property of plot if you want have vertical axis captions. There is also some notes of SGraph using.
I'm glad about any kind of serious feedback!
If there are will be new components version, they will be uploaded to Torry's Delphi Pages and Delphi Super Page. There is also my WWW homepage where also you can find latest
versions of sgraph. If you have any suggestions especially about the bug mentioned - send
me e-mail.
I wish to thank to Peter Kravtsov for comprehensive advise to add DataTime format of ticks label and Mauro J. Cavalcanti for the useful discussions and suggestions. A would like to thank to all who wrote me good words about SGraph.
My best wishes.
Sergei P. Pod'yachev. Novosibirsk, Russia.
e-mail : pod0@mail.ru.
WWW: pod0.chat.ru
www.iae.nsk.su/~lab12/pod