ChartDirector 7.1 (C++ Edition)

Layer.addDataSet


Usage

DataSet *addDataSet(DoubleArray data, int color = -1, const char *name = 0);

Description

Adds a data set to the chart layer.

Arguments

ArgumentDefaultDescription
data(Mandatory)An array of numbers representing the data set.
color-1The color to draw the data item. -1 means that the color is automatically selected from the palette.
name""The name of the data set. The name will be used in the legend box, if one is available. An empty string means the data set has no name.

Return Value

A DataSet object representing the data set added. You may use the methods of this object to fine-tune how the data set is drawn on the chart.