<html>
<title>NiceChart Component</title>
<style type="text/css">
<!--
body, td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt}
-->
</style>
<body bgcolor="#FFFFFF" text="#000000">
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="6"><b><font size="4">NiceChart
v1.10</font></b></font><br>
© 2008, Priyatna<br>
Bandung - Indonesia</p>
<p><a href="http://www.priyatna.org/">http://www.priyatna.org/</a><br>
<a href="mailto:me@priyatna.org">mailto:me@priyatna.org</a></p>
<p><a href="#intro">Introduction</a><br>
<a href="#history">Version History</a><br>
<a href="#license">License</a><br>
<a href="#install">Installation</a><a href="#methods"><br>
Methods</a><br>
<a href="#properties">Properties</a> <br>
<a href="#contact">Contacts</a></p>
<p><font size="1">Version: 1.10 <br>
Release Date: January 12, 2008</font><font size="1"><br>
</font></p>
<p> </p>
<font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b><a name="intro"></a></b></font>
<hr>
<p></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b>Introduction</b></font></p>
<p>Once I need a chart component that can shows interpolated lines for one of
my <a href="http://www.fieldma.com/">project</a>. I don't need a sophisticated
full-featured chart, I just need a simple one with basic functionalities. Don't
find a way to do it with standard Delphi TChart component, I decided to write
my own.</p>
<p>Currently it has three graph styles: lines, smooth lines with B-Splines, and
bars. It has multilined title, legend, automatic y-axis, and supports multiple
series. It also can produce a monochrome version of the graph using monochromatic
brushes. Those features are sufficient for my programming needs.</p>
<p>I learned a lot from creating this component. I learned the algorithm to pick
axis value range that are aligned to zero from an arbitrary set of values. I
also learned some linear interpolation algoritms, although currently only B-splines
that is accomodated in this component. And finally I understand why there's
only a handful chart component out there.</p>
<p> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b><a name="history"></a></b></font>
</p>
<hr>
<p></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b>Version History</b></font></p>
<p> <b>Version 1.1 (January 12nd, 2008)</b><br>
- bug fixed: title not centered<br>
- bug fixed: empty series<br>
- soft colors<br>
<br>
<b>Version 1.0 (May 26th, 2007)</b><br>
Initial Release</p>
<p> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b><a name="license"></a></b></font>
</p>
<hr>
<p> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b>License</b></font></p>
<p>This library is released under Mozilla Public License. You can use it in your
freeware, shareware or commercial softwares. You can send your modification
to me, and if I decide to include it in the main distribution, I will add your
name as a contributor. You can read full licensing information <a href="License.txt">here</a>.
</p>
<p> </p>
<font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b><a name="install"></a></b></font>
<hr>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b>Installation</b></font></p>
<p>There is no special process to install it on Delphi. Just open <b>NiceChartD7.dpk</b>
on Delphi IDE and press Install button. I use Delphi 7. If you use another Delphi
version, you may have to make some minor changes.</p>
<p>The component will appear in <b>priyatna.org</b> tab.</p>
<p> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b><a name="methods"></a></b></font>
</p>
<hr>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b>Methods</b></font></p>
<p>There are some main methods of the component:</p>
<ul>
<li><b>procedure</b> BeginUpdate;<br>
Call this method to prevent control updating its content. This is useful when
you want to add bulky data to the chart. Don't forget to call EndUpdate when
you are done supplying data.<br>
<br>
</li>
<li><b>procedure</b> EndUpdate;<br>
Call this method to reenable update. You must call BeginUpdate prior to call
this method.<br>
<br>
</li>
<li><b>function</b> AddSeries(AKind: TSeriesKind): TNiceSeries;<br>
Add a new series to the chart. A series can be a bar, line or smooth line
type.<br>
<br>
</li>
<li><b>function</b> ClientToChart(const X, Y: Integer; var AX, AY: Double):
Boolean; <br>
Call this function to get X-axis and Y-axis value from mouse position. The
X and Y parameters are the mouse position, and the corresponding X-axis and
Y-axis values are stored in AX and AY variables. This function returns True
if the supplied mouse position is within the X-axis and Y-axis range. Otherwise,
it returns False.<br>
<br>
</li>
<li><b>procedure</b> RemoveSeries(ASeries: TNiceSeries);<br>
Removes a series from the chart.<br>
<br>
</li>
<li><b>procedure</b> Clear;<br>
Removes all series from the chart.<br>
<br>
</li>
<li><b> function</b> CreateMetafile: TMetafile;<br>
Creates metafile (WMF) from the chart. This function is useful when you want
to save the content of the chart to a file.<br>
<br>
</li>
<li><b>procedure</b> CopyToClipboard;<br>
Copies the content of the chart to the clipboard. The content can be pasted
in any application as a graphic image.</li>
</ul>
<p> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b><a name="properties"></a></b></font>
</p>
<hr>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b>Properties</b></font></p>
<p>There are some main properties of the component:</p>
<ul>
<li><b>property</b> Series[Index: Integer]: TNiceSeries;<br>
A collection of series that is contained in the chart.<br>
<br>
</li>
<li><b>property</b> SeriesCount: Integer;<br>
Specifies how many series are in the chart.<br>
<br>
</li>
<li><b>property</b> ShowLegend: Boolean;<br>
Shows or hides legend. Set to True to show the legend, or set to False to
hide it. <br>
<br>
</li>
<li><b>property</b> ShowTitle: Boolean;<br>
Shows or hides title. Set to True to show the title, or set to False to hide
it. <br>
<br>
</li>
<li><b>property</b> ShowXGrid: Boolean;<br>
Shows or hides horizontal grid. Set to True to show the gris, or set to False
to hide it.<br>
<br>
</li>
<li><b>property</b> ShowYGrid: Boolean;<br>
Shows or hides vertical grid. Set to True to show the gris, or set to False
to hide it. <br>
<br>
</li>
<li><b>property</b> Title: string;<br>
Specifies title of the chart. You can use a multilined title separated by
#13 (carriage return).<br>
<br>
</li>
<li><b>property</b> TitleFont: TFont;<br>
Specifies title font name, size, color and styles (bold, italic, underline
or strike-out).<br>
<br>
</li>
<li><b>property</b> AxisXTitle: string;<br>
Specifies horizontal axis title.<br>
<br>
</li>
<li><b>property</b> AxisYTitle: string;<br>
Specifies vertical axis title.<br>
<br>
</li>
<li><b>property</b> AxisXOnePerValue: Boolean;<br>
Forces the chart to treat each x-axis value as a different value, so all point
or bar can be viewed even though they have same x value.<br>
<br>
</li>
<li><b>property</b> AxisXScale: Single;<br>
You can scale the horizontal axis so it shows different values than the original
data. This is useful, for example, if you want to supply the data in real
values, but want to show the axis in thousands. In this case, simply set this
property to 1000.<br>
<br>
</li>
<li><b>property</b> AxisYScale: Single;<br>
Same as the above, but this is for vertical axis.<br>
<br>
</li>
<li><b>property</b> Monochrome: Boolean;<br>
If set to True, the chart will be drawn in monochrome, using different brush
pattern for bars. Otherwise, it will be drawn in color. Colors and brush patterns
for each series are automatically choosen by the component.<br>
</li>
</ul>
<p> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b><a name="contact"></a></b></font>
</p>
<hr>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b>Contacts</b></font></p>
<p>Don't hesitate to report any bug or whish to me:<br>
</p>
<p>Priyatna<br>
Bandung - Indonesia</p>
<p><a href="http://www.priyatna.org/">http://www.priyatna.org/</a><br>
<a href="mailto:me@priyatna.org">mailto:me@priyatna.org</a></p>
<p> </p>
</html>