How to put captions to the axes of a chart

Discussion around the SDL Component Suite
Post Reply
User avatar
hlohning
Posts: 20
Joined: Fri Sep 04, 2020 4:17 pm

How to put captions to the axes of a chart

Post 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 38051 times

If you have more than one scale per axis you can use the array properties ScalePropsX and ScalePropsY.
---
Hans Lohninger
Epina GmbH
Retz, Austria
Post Reply