ChartDataCreate

<< Click to Display Table of Contents >>

Navigation:  Charts >

ChartDataCreate

Previous pageReturn to chapter overviewNext page

Creates an empty ChartData-Object, prepared to hold the numeric data and properties related to the numeric data. The ChartData object stores the numeric data of a chart. You can create multiple charts of different Chart-Types (like: Line Chart, Bar Chart, Pie Chart, etc.) out of one ChartData object. All charts which have assigned the same ChartData object, will display the same ChartData in a different style.

method TVPEChartData [pointer] VPE.ChartDataCreate(

long Columns,

long Rows

)

long Columns

number of columns that shall be reserved

long Rows

number of rows that shall be reserved

Returns:

VCL

the handle to the created ChartData object. In case of an error (out of memory) the handle is null (0).

ActiveX, .NET, Java, ...

a newly created TVPEChartData object reference. This object provides several methods and properties to add data to rows and columns, and to specify the color and appearance of each row. In case of an error (out of memory) the returned object reference is null.

Remarks:

The created ChartData object may only be used within the context of the document where it was created. Don’t use a ChartData object in a different document, this will cause a GPF (General Protection Fault).

Example:

VCL:

hData: Pointer

hData = Doc.ChartDataCreate(2, 4)

 

ActiveX, .NET, Java, …:

dim Data as TVPEChartData

Data = Doc.ChartDataCreate(2, 4)

Creates a ChartData object with two columns (for example Apples and Bananas), where each column can hold 4 numeric data values ( = rows).