Page 1 of 1

How to put captions to the axes of a chart

Posted: Mon Jan 11, 2021 2:36 pm
by hlohning
Recently I was asked how to put captions to the axes of a chart (TRChart). The answer is quite simple: use the properties Scale1X and Scale1Y. These properties offer a subproperty "Caption". Assuming that the chart component is called "RC" the following two statements

Code: Select all

RC.Scale1X.Caption := 'Randic-Ix';
RC.Scale1Y.Caption := 'boil.point';
will generate the following captions of the axes:

chart_axes_caption.png
chart_axes_caption.png (10.25 KiB) Viewed 25003 times

If you have more than one scale per axis you can use the array properties ScalePropsX and ScalePropsY.