RMC_AddYAxis function.
Add a Y axis to a region of an existing chart

Syntax
nResult (LONG) = RMC_AddYAxis(
ByVal nCtrlId (LONG),
ByVal nRegion (LONG),
Optional ByVal nAlignment (LONG),
Optional ByVal nMinvalue (DOUBLE),
Optional ByVal nMaxvalue (DOUBLE),
Optional ByVal nTickcount (LONG),
Optional ByVal nFontsize (LONG),
Optional ByVal nTextcolor (LONG),
Optional ByVal nLinecolor (LONG),
Optional ByVal nLinestyle (LONG),
Optional ByVal nDecimalDigits (LONG),
Optional ByRef sText (ASCCIZ),
Optional ByRef sLabels (ASCCIZ),
Optional ByVal nLabelAlignment (LONG)
)
Parameter
nCtrlId (LONG)
Unique ID of the chart control, to which the Y axis belongs.
nRegion (LONG)
Region to which the Y axis belongs.
nAlignment (LONG)
Alignment of the Y axis as an Y axis alignment constant. If omitted or 0: RMC_YAXISLEFT
nMinvalue (DOUBLE)
Minimum value of the Y axis. See Remarks
nMaxValue (DOUBLE)
Maximum value of the Y axis. See Remarks
nTickcount (LONG)
Number of lines and, in conjunction, of labels of the Y axis. If omitted or 0: 11
nFontsize (LONG)
Fontsize of the data labels. If omitted or 0: 8
nTextColor (LONG)
Textcolor of the data labels as a Color...constant. If omitted or 0: ColorBlack
nLineColor (LONG)
Linecolor as a Color...constant. If omitted or 0: ColorBlack
nLineStyle (LONG)
Style of the lines as a linestyle constant. If omitted or 0: RMC_LINESTYLESOLID
nDecimalDigits (LONG)
The number of decimal digits (between 0 and 9), which shall be used for printing the labels. New: Setting this parameter to -1 formats the labels in scientific notation. If omitted or 0: no decimal digits are used.
sUnit (ASCIIZ)
Unit which will be painted behind the labels (like , $, EURO and so on), maximum length is 15 chars.
sText (ASCIIZ)
Text for illustrations of the Y axis, maximum length is 100 chars. The text will be printed bottom to top (if alignment of the Y axis is RMC_YAXISLEFT) ore top to bottom (if alignment is RMC_YAXISRIGHT).
As default the text will be printed in the same fontsize as defined in parameter nFontSize. But you can set the font's size and weight independently: add a backslash (\) at the end of the text, followed by a number and/or the char b, if you want to have the text printetd bold.
Example: "This is the text\12b" will print the text in 12 points and bold.
"This is the text\b" will print it in the same size as the labels, but bold.
sLabels (ASCCIZ)
On default the labels of the axes are numeric ones, which get calculated from parameters nMinValue and nMaxValue in concjunction with nTickcount. Instead of these numeric values you can have string labels: the labels must be separated either with * or | ("Label1*Label2*Label3"). The maximum length of each label can be 50 chars.
Note: If you don't want any labels, simply pass one single dash (-), which prevents also painting of the numeric labels.
nLabelAlignment (LONG)
Alignment of the labels, in case you use string labels: RMC_TEXTCENTER (Default), RMC_TEXTLEFT or RMC_TEXTRIGHT.
Return value
0
No error, function succeeded.
RMC_ERROR_CTRLID
Wrong control ID (0 or no chart with this control ID was found).
RMC_ERROR_MAXREGION
The region index exceeds the maximum possible numbers of regions (6) within a chart control.
RMC_ERROR_WRONGREGION
The region index is inexistent in the chart control.
RMC_ERROR_XYAXIS
Alignment parameter for the Y axis was wrong.
RMC_ERROR_ALLOC
Error while allocating memory for the axis text.
Remarks
You can RMChart let calculate the minimum and maximum values for the Y axis on basis of the data passed as DataY-parameter by RMC_AddXYSeries(). If you want to set these values explicit, assure that they comprise the data, which shall be painted. The minimum value can be any number, but the maximium value must be greater than the minimum value. If the maximum value is less than the minimum value, RMChart will ignore both values and automatic calculation will take place.

If you want a second Y axis, just call the function twice, of course with an converse axis alignment.
Impportant: X and Y axes must always have a counterpart on the other side, they can only exist as a pair of axes. It's not possible for example to have one X axis and two Y axes. For each X axis must exsit a Y axis, for each Y axis a X axis.