ChartDirector Ver 5.0 (PHP Edition)

XYChart.addBarLayer2

Usage

addBarLayer2([ dataCombineMethod [, depth ]])

Description

Adds an empty bar layer to the XYChart.
This method is typically used to add multiple data sets to a single bar layer. First an empty bar layer is created, then the data sets can be added using Layer.addDataSet.
The dataCombineMethod parameter specifies how to combine the data sets together in the bar layer. The followings methods are supported:

Constant | Value | Description
--- | --- | ---
Side | 3 | The data sets are combined by plotting the bars side by side.
Stack | 1 | The data sets are combined by stacking up the bar segments.

Overlay

0

The data sets are combined similar to stacked bars. However, in Overlay, one data set is assumed to already include the other data set. For example, if the data sets are "average" and "peak", the "peak" cannot be stacked on top of "average", because the "peak" already contains "average". In the Overlay style, only "peak - average" is stacked on top of "average", and so the total bar length will be "peak".

Percentage | 4 | The data sets are combined similar to stacked bars, except that the data in a bar are scaled so that they summed to 100. In other words, all stacked bars will be of the same length. A bar segment within a bar represents the percentage of the data item relative to sum of all the data items in the stacked bar.

Arguments

Argument | Default | Description
--- | --- | ---
dataCombineMethod | Side | The method to combine the data sets together in the bar layer.
depth | 0 | The 3D depth of the bar layer.

Return Value

A BarLayer object representing the bar layer created.

© 2009 Advanced Software Engineering Limited. All rights reserved.