Second y-Axis for RChart

Problem I need to draw a second y-axis on the right side of RChart using a different scale. How can I do this?
Solution Starting with release 8.0 RChart offers up to 16 independent axes. If you are using a release prior to 8.0 you may use the following work-around:

Create two RCharts, one being your main chart (RChart1), the other one (RChart2) being used solely as a supplier for a second and independent axis. Set the properties of the two RCharts as follows:

RChart1.YaxPos := yapLeft;
RChart1.RRim := 1;

RChart2.YaxPos := yapRight;
RChart2.RRim := 80;
RChart2.LRim := 0;
RChart2.Scale1X.LabelType := ftNoScales;

Now position RChart2 in a way that its right y-axis lies exactly over the right axis of RChart1. Select RChart2 and send it to the background. This will create an RChart having apparently two independent y-axis. You may draw on RChart1 as usual, while setting the scale of the second axis as needed.


Last Update: 2006-01-13