gErr grLibInputGraphData

(Graph_t* br, UInt32 xValue,
  UInt32 yValue, UInt16 group,
  Char* legend)

[MANDATORY]:fills data values to the graph data structure and ensures faulty data is not input.

Documentation

[MANDATORY]:fills data values to the graph data structure and ensures faulty data is not input. This function must be called once for every set of data. e.g.

if( grLibInputGraphData(br,30,2004,0,"Yahoo") != grLibNone) return grLibInvData;

if( grLibInputGraphData(br,40,2004,1,"ATT") != grLibNone) return grLibInvData;

if( grLibInputGraphData(br,50,2001,2,"MSN") !=grLibNone) return grLibInvData;

Parameters:
br - pointer to the data structure
xValue - specifies the X axis value associated with the data
yValue - specifies the Y axis value associated with the data (set to 0 for Pie Graphs)
group - Specifies a particular category the data point belongs to. To understand the significance of group, see the programmer's manual.In the above example, notice that the group value changes and a new legend is used -- so there are 3 bars, each with different color, and each specifying a different internet provider (yahoo,msn,att.)
Returns:
gErr if inconsistent values are entered Note
Graph Lib uses the parameter MAX_DATA_POINTS to do an initial dynamic allocation for the data point information stored in the graph data structure. If the points being input exceeds this then this function returns silently with the error code of grLibBeyondMaxBound
Cautionary Note
For PIE Graphs, the yValue should be set to 0 and the xValue should have the actual data value. yValue does not make sense for Pie graphs and if you have some value it may hamper graph functioning!

Alphabetic index



This page was generated with the help of DOC++.