ChartDirector 7.0 (Python 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:

ConstantValueDescription
Side3The data sets are combined by plotting the bars side by side.
Stack1The data sets are combined by stacking up the bar segments.
Overlay0The 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".
Percentage4The 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

ArgumentDefaultDescription
dataCombineMethodSideThe method to combine the data sets together in the bar layer.
depth0The 3D depth of the bar layer.

Return Value

A BarLayer object representing the bar layer created.