VpeChartDataAddValue

<< Click to Display Table of Contents >>

Navigation:  Charts >

VpeChartDataAddValue

Previous pageReturn to chapter overviewNext page

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

void VpeChartDataAddValue(

VpeHandle hDoc,

VpeHandle hData,

int column,

double value

)

VpeHandle hDoc

Document Handle

VpeHandle hData

handle of ChartData object

int column

column, where to add the value

double value

value to add

Example:

VpeHandle hData

hData = VpeChartDataCreate(hDoc, 2, 4)

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

 

VpeChartDataAddValue(hDoc, hData, 0, 10)

VpeChartDataAddValue(hDoc, hData, 0, 20)

VpeChartDataAddValue(hDoc, hData, 0, 30)

VpeChartDataAddValue(hDoc, hData, 0, 40)

 

VpeChartDataAddValue(hDoc, hData, 1, 5)

VpeChartDataAddValue(hDoc, hData, 1, 10)

VpeChartDataAddValue(hDoc, hData, 1, 15)

VpeChartDataAddValue(hDoc, hData, 1, 20)

 

Now the internal data table of the ChartData 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