RMC_AddVolumeBarSeries function.
Add a volume bar chart series to a region of an existing chart

Syntax
nResult (LONG) = RMC_AddVolumeBarSeries(
ByVal nCtrlId (LONG),
ByVal nRegion (LONG),
Optional ByRef nFirstDataValue (DOUBLE),
Optional ByVal nDataValuesCount (LONG),
Optional ByRef nFirstPPCValue (LONG),
Optional ByVal nPPCValuesCount (LONG),
Optional Byval nColor (LONG),
Optional Byval nWhichDataAxis (LONG)
)
Parameter
nCtrlId (LONG)
Unique ID of the chart control, to which the series belongs.
nRegion (LONG)
Region to which the series belongs.
nFirstDataValue (DOUBLE)
The first element of an one-dimensional array, which holds the series data. If you want to add the data later with RMC_SetSeriesData(), simply pass 0.
nDataValuesCount (LONG)
The total number of elements in the data array or zero, if you want to add the data later.
nFirstPPCValue (LONG)
First element of an one-dimensional array with the amount of data points for each column. See Remarks
nPPCValuesCount (LONG)
The total number of elements in the PointsPerColumn-array.
nColor (LONG)
Color of the bars as a Color... constant. If omitted or 0: One of the internal color values, which corresponds to the series index, where the first added series has the index 1, the second the index 2 and so on.
nWhichDataAxis (LONG)
Decides, to which data axis the series is connected. 1 for the first, 2 for the second axis (if existent). First and second means the order, in which the axis via RMC_AddDataAxis() was added to the region. If omitted or 0: 1
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_MAXSERIES
The actual series exceeds the maximum possible numbers of series (15) within a region.
RMC_ERROR_ALLOC
Error while allocating memory for the data.
Remarks
Volume bars are always vertical lines with a stroke width of 2 pixels.
The lower region of "2 regions.rmc" shows volume bars.

The length of the PointsPerColumn-array. can be:
  • zero (= undimensioned) - in this case the volume bars will be painted evenly across the grid. This leads to imprecise results and should be avioded. If you want to use this option, pass 0 as parameter nPPCValuesCount.
  • one - in this case the value in the only array element determines how many data points will be painted in every column.
  • equal to the amount of columns on the label axis - in this case each element determines how many data points will be painted in the correspondent column.
In terms of greatest exactness you always should use the third way.