ChartDataAddValue

<< Click to Display Table of Contents >>

Navigation:  Charts >

ChartDataAddValue

Previous pageReturn to chapter overviewNext page

[VCL only]

Adds a new value to the specified column of the ChartData object specified in the parameter hData.

method void VPE.ChartDataAddValue(

pointer hData,

long Column,

double Value

)

pointer hData

handle to ChartData object

long Column

column, where to add the value

double Value

value to add

Example:

hData: Pointer

hData = 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).

 

Doc.ChartDataAddValue(hData, 0, 10)

Doc.ChartDataAddValue(hData, 0, 20)

Doc.ChartDataAddValue(hData, 0, 30)

Doc.ChartDataAddValue(hData, 0, 40)

 

Doc.ChartDataAddValue(hData, 1, 5)

Doc.ChartDataAddValue(hData, 1, 10)

Doc.ChartDataAddValue(hData, 1, 15)

Doc.ChartDataAddValue(hData, 1, 20)

 

Now the internal data table of the Chart Data object will look like this:

 

Column 0

Column 1

row 0

10

5

row 1

20

10

row 2

30

15

row 3

40

20