Chapter 15:
Getting/Setting Data
 

_SetGraphRowColData(); Set data in the spreadsheet cell for the graph

 

_SetGraphRowColPageData(); Set data in the spreadsheet cell for the graph

 

AccGraphDataStatus(); Verify a graph's data set

 

GetDataFormatID(); Get Data Format ID

 

GetDataRange(); Get Data Range

 

GetGraphDataInfo(); Get Graph Data Information

 

GetGraphFootNote(); Get Graph Footnote

 

GetGraphGroupsLabel(); Get Graph Groups Label

 

GetGraphGroupsTitle(); Get Graph Groups Title

 

GetGraphPage(); Get Graph Page

 

GetGraphRowColData(); Get Graph Row/Column Data

 

GetGraphRowColPageData(); Get Graph Row/Column Page Data

 

GetGraphRowColString(); Get Graph Row/Column String

 

GetGraphSeriesLabel(); Get Graph Series Label

 

GetGraphSeriesTitle(); Get Graph Series Title

 

GetGraphSubTitle(); Get Graph Subtitle

 

GetGraphTitle(); Get Graph Title

 

GetGraphY1AxisTitle(); Get Graph Y1-Axis Title

 

GetGraphY2AxisTitle(); Get Graph Y2-Axis Title

 

GetGraphY3AxisTitle(); Get Graph Y3-Axis Title

 

GetGraphY4AxisTitle(); Get Graph Y4-Axis Title

 

GetGroupHeaderString(); Get Group Header String

 

GetRawLimits(); Get Raw Limits

 

GetSeriesHeaderString(); Get Series Header String

 

SetDataRange(); Set Data Range

 

SetGraphData(); Set Graph Data

 

SetGraphDataInfo(); Set Graph Data Information

 

SetGraphFootNote(); Set Graph Footnote

 

SetGraphGroupsLabel(); Set Graph Groups Label

 

SetGraphGroupsTitle(); Set Graph Groups Title

 

SetGraphLabels(); Set Graph Labels

 

SetGraphRowColData(); Set Graph Row/Column Data

 

SetGraphRowColString(); Set Graph Row/Column String

 

SetGraphSeriesLabel(); Set Graph Series Label

 

SetGraphSeriesTitle(); Set Graph Series Title

 

SetGraphSubTitle(); Set Graph Subtitle

 

SetGraphTitle(); Set Graph Title

 

SetGraphY1AxisTitle(); Set Graph Y1-Axis Title

 

SetGraphY2AxisTitle(); Set Graph Y2-Axis Title

 

SetGraphY3AxisTitle(); Set Graph Y3-Axis Title

 

SetGraphY4AxisTitle(); Set Graph Y4-Axis Title

   

_SetGraphRowColData()

 

This function sets the data in the spreadsheet cell for the graph identified by pGraph.

Syntax:

BOOLEAN16 PUBLIC
_SetGraphRowColData (
     void FAR *pGraph,
     INT16 nRow,
     INT16 nCol,
     REAL64 *prValue
);

Input:

pGraph: Graph Pointer returned by AllocGraphPtr()

 

nRow: Series/Row number for the data.

 

nCol: Group/Column number for the data

 

prValue: Pointer to the value to store in the cell. Use NULL to indicate missing or not-applicable data.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

real value successfully stored

 

FALSE=

could not store the value correctly

Notes:

This functions gets the cell record information to maintain the current format and justification when the string is set in the cell. This function is more powerful than SetGraphRowColData() which can not handle missing or non-applicable data.

Example:

// ensure that pointer really exists
if(pGraph->Storage.GraphData.lpfnGetData)
{
     // read the data value for this cell
     if (!(*pGraph->Storage.GraphData.lpfnGetData)
          (nSeriesLoop, nGroupsLoop, &rCellData,
          pGraph->Storage.GraphData.lClientData ))
               rCellData = 0.0;
     // in case callback doesn't have data
}
if(!(_SetGraphRowColData(pGraph,nSeriesLoop,nGroupsLoop,
     &rCellData)))bRetValue = FALSE;

Also See:

_SetGraphRowColPageData(), SetGraphRowColData()

_SetGraphRowColPageData()

 

This function sets the data in the spreadsheet cell for the graph identified by pGraph.

Syntax:

BOOLEAN16 PUBLIC
_SetGraphRowColPageData (
     GraphPtr pGraph,
     INT16 nRow,
     INT16 nCol,
     INT16 nPage,
     REAL64 *prValue
);

Input:

pGraph: Graph Pointer returned by AllocGraphPtr()

 

nRow: Series/Row number for the data.

 

nCol: Group/Column number for the data

 

nPage: Page number for the data

 

prValue: Pointer to the value to store in the cell. Use NULL to indicate missing or empty data.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

real value successfully stored

 

FALSE=

could not store the value correctly

Also See:

_SetGraphRowColData()

   

AccGraphDataStatus()

 

This function verifies a graph's data set.

Syntax:

INT16 PUBLIC
AccGraphDataStatus (
     GraphPtr G
);

Input:

G: Pointer to a graph whose data status is to be returned

Return:

INT16:

 

Value

Description

 

E00_OK

Successful/No error.

 

EAC_NULL_DATARANGE

No data range defined.

 

EAC_NO_DATA

Not enough numbers for this chart

 

EAC_NEG_LOG

Negative number(s) against a log scale.

 

EAC_ZERO_LOG

Zero number(s) against a log scale.

 

EAC_TOOFEW_SERIES

Multiple series required

 

EAC_TOOFEW_GROUPS

Multiple groups required

Example:

if(AccGraphDataStatus(pGraph) > 0)
{
     r = rcBounds;
     ClipRect(&r);
     EraseRect(&r);
.
.
.

   

GetDataFormatID()

 

This function returns the data format ID assigned by the A2D_DATAFORMAT or A3D_DATAFORMAT attributes.

Syntax:

INT16 PUBLIC GetDataFormatID(
     GraphPtr pGraph
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

Return:

INT16; Data Format ID

   

GetDataRange()

 

This function gets the data in the internal data array that will be used to draw the graph. The data must have been set by SetData() before actually using it. SetDataRange() must also be called before drawing the graph.:

Syntax:

INT16 PUBLIC
GetDataRange (
     GraphPtr pGraph,
     INT16 *prULC,
     INT16 *pcULC,
     INT16 *prLRC,
     INT16 *pcLRC
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

prULC: defines first row where the data will be copied in the data array

 

pcULC: defines first column where data will be copied in the data array

 

prLRC: defines last row where the data will be copied in the data array

 

pcLRC: defines last column where the data will be copied in the data array

Return:

INT16: Zero

Example:

// Get DataRange
// --------------
short nLeft, nTop, nRight, nBottom;
m_pChart->GetDataRange( &nLeft,
     &nTop, &nRight, &nBottom );
m_RangeSeriesStart = nTop;
m_RangeSeriesEnd = nBottom;
m_RangeGroupStart = nLeft;
m_RangeGroupEnd = nRight;

Notes:

The data is represented internally as a 2 dimensional spreadsheet. pnColStart and pnRowStart represent the upper-left data cell. pnColStop and pnRowStop represent the lower-right data cell.

Also See:

SetDataRange()

GetGraphDataInfo()

 

This function sets pGraphData to the callback function currently attached to the graph pGraph.

Syntax:

void PUBLIC
GetGraphDataInfo (
     GraphPtr pGraph,
     GraphDataPtr pGraphData
);

Input:

pGraph: Pointer to graph created by AllocGraphPtr()

 

pGraphData: Place to store pointer to callback function. See the GraphDataInfo structure in Appendix A.

Return:

None

Notes:

See the GraphDataInfo data structure in Appendix A.

Example:

BOOLEAN16 PUBLIC
InitDataCallBacks(
     HANDLE hInst, GraphPtr pGraph)
{
     GraphDataInfo graphData;
     /* Look up Data information connected to graph*/
     GetGraphDataInfo(pGraph, &graphData);
     /*
     ** If data information doesn't exist,
     create thunks as necessary */
     if (!graphData.lpfnGetData) {
     graphData.lpfnGetString =
     LOCAL_GetStringCallback;
     graphData.lpfnGetLabel =
     LOCAL_GetLabelCallback;
     graphData.lpfnGetData =
     LOCAL_GetDataCallback;
     graphData.lpfnSetPage =
     LOCAL_SetPageCallback;
     graphData.lpfnRealToString =
     LOCAL_RealToStrCallback;

Also See:

SetGraphDataInfo()

   

GetGraphFootNote()

 

This function gets the footnote for the Graph. The Footnote is usually placed at the bottom (typically, right corner) of the chart. Use SetGraphFootnote() to define a chart's footnote string. Use the A_LOCATE_FOOTNOTE and A_SHOW_FOOTNOTE attributes to show/hide and reposition the footnote.

Syntax:

BOOLEAN16 PUBLIC
GetGraphFootNote (
     GraphPtr pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where graph footnote can be stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string value returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphFootnote()

   

GetGraphGroupsLabel()

 

This function gets the group label for group nCol and stores it in the location identified by szValue. In 2D charts, group labels typically are drawn along the bottom of a vertical chart or left side of a horizontal chart. In 3D charts, group labels appear along the group floor axis. Use SetGraphGroupsLabel() to define group label strings.

Syntax:

BOOLEAN16
GetGraphGroupsLabel (
     GraphPtr pGraph,
     INT16 nCol,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

nCol: Group number

 

szValue: Pointer to a string where graph groups label can be stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string value returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphGroupsLabel()

GetGraphGroupsTitle()

 

This function gets the graph's group title string. In a 3D chart, the groups title is placed near the group labels. It typically summarizes what the labels are about. In a Pie chart, the groups title label appears below the pie (it usually describes the pie). Use SetGraphGroupsTitle() to define a groups title.

Syntax:

BOOLEAN16 PUBLIC
GetGraphGroupsTitle (
     GraphPtr pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where group title will be stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string value returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphGroupsTitle()

   

GetGraphPage()

 

This function returns the current spreadsheet page number.

Syntax:

INT32 PUBLIC
GetGraphPage (
     GraphPtr pGraph
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

Return:

INT32: the current spreadsheet page number

   

GetGraphRowColData()

 

This function gets the data in the spreadsheet cell for the graph.

Syntax:

BOOLEAN16 PUBLIC
GetGraphRowColData (
     GraphPtr pGraph,
     INT16 nRow,
     INT16 nCol,
     REAL64 *prValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

nRow: Series number for the data

 

nCol: Group number for the data

 

prValue: Pointer to a location to store the data from nRow/nCol

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

real value returned successfully

 

FALSE=

couldn't find the value correctly or EMPTY or STRING CELL

Also See:

GetGraphRowColPageData(), GetGraphRowColString(), SetGraphRowColData(), _SetGraphRowColData()

GetGraphRowColPageData()

 

This function gets the data in the spreadsheet cell for the graph.

Syntax:

BOOLEAN16 PUBLIC
GetGraphRowColPageData (
     GraphPtr pGraph,
     INT16 nRow,
     INT16 nCol,
     INT16 nPage,
     REAL64 *prValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

nRow: Series number for the data

 

nCol: Group number for the data

 

nPage: Page number for the data

 

prValue: Pointer to a location to store the data from nRow/nCol/nPage

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

real value returned successfully

 

FALSE=

couldn't find the value correctly or EMPTY or STRING CELL

Also See:

GetGraphRowColData(), GetGraphRowColString()

GetGraphRowColString()

 

This function gets the string data in the spreadsheet cell for the graph.

Syntax:

BOOLEAN16 PUBLIC GetGraphRowColString (
     GraphPtr pGraph,
     INT16 nRow,
     INT16 nCol,
     char FAR *lpValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

nRow: Series number for the data

 

nCol: Group number for the data

 

lpValue: Pointer to a location to store the string from nRow/nCol

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

GetGraphRowColData(), SetGraphRowColString()

   

GetGraphSeriesLabel()

 

This function gets the chart's series labels. The integer (nRow) specifies which series to get. In 2D charts, series labels usually appear in the legend area. In 3D charts, series labels appear along the series floor axis. Use setGraphSeriesLabel() to define a series label.

Syntax:

BOOLEAN16 PUBLIC GetGraphSeriesLabel (
     GraphPtr pGraph,
     INT16 nRow,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

nRow: Series number for the data

 

szValue: Pointer to a location to store the label for nRow

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphSeriesLabel()

GetGraphSeriesTitle()

 

This function gets the chart's series title. In a 3D chart, the series title is placed near the series labels and usually summarizes what the labels are about. Use SetGraphSeriesTitle() to define a series title string.

Syntax:

BOOLEAN16 PUBLIC
GetGraphSeriesTitle (
     GraphPtr pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a location to store the series title

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphSeriesTitle()

   

GetGraphSubTitle()

 

This function gets the subtitle for the graph. The subtitle is often placed below the chart's title. Use SetGraphSubTitle() to define a subtitle string. Use the A_LOCATE_SUBTITLE and A_SHOW_SUBTITLE attributes to show/hide and reposition the subtitle.

Syntax:

BOOLEAN16
GetGraphSubTitle (
     GraphPtr pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where graph subtitle can be stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphSubTitle()

   

GetGraphTitle()

 

This function gets the title for the graph. The title is usually placed at the top of the chart. Use SetGraphTitle() to define a title string. Use the A_LOCATE_TITLE and A_SHOW_TITLE attributes to show/hide and reposition the title.

Syntax:

BOOLEAN16 PUBLIC
GetGraphTitle (
     GraphPtr pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where graph title can be stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphTitle()

   

GetGraphY1AxisTitle()

 

This function gets the Y1-axis title for the graph. The Y1-axis title usually displays near the Y1-axis. In a standard vertical bar chart, the Y1 axis is the vertical axis on the left side. Use SetGraphY1AxisTitle() to define a Y1-axis title string. Use the A2D_SHOW_TITLE_Y1 attribute to show/hide the Y1-axis title.

Syntax:

BOOLEAN16 PUBLIC
GetGraphY1AxisTitle (
     GraphPtr pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where the axis title can be stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphY1AxisTitle()

   

GetGraphY2AxisTitle()

 

This function gets the Y2-axis title for the graph. The Y2-axis title usually displays near the Y2-axis. In a standard vertical bar chart, the Y2-axis is a second vertical axis on the right side. Use SetGraphY2AxisTitle() to define a Y2-axis title string. Use the A2D_SHOW_TITLE_Y2 attribute to show/hide the Y2-axis title.

Syntax:

BOOLEAN16 PUBLIC
GetGraphY2AxisTitle (
     GraphPtr pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where the axis title can be stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphY2AxisTitle()

   

GetGraphY3AxisTitle()

 

This function gets the Y3-axis title for the graph. Use SetGraphY3AxisTitle() to define a Y3-axis title string. Use the A2D_SHOW_TITLE_Y3 attribute to show/hide the Y3-axis title.

Syntax:

BOOLEAN16 PUBLIC
GetGraphY3AxisTitle (
     GraphPtr pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where the axis title can be stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphY3AxisTitle()

   

GetGraphY4AxisTitle()

 

This function gets the Y4-axis title for the graph. Use SetGraphY4AxisTitle() to define a Y4-axis title string. Use the A2D_SHOW_TITLE_Y4 attribute to show/hide the Y4-axis title.

Syntax:

BOOLEAN16 PUBLIC
GetGraphY4AxisTitle (
     GraphPtr pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where the axis title can be stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string returned successfully

 

FALSE=

couldn't find the value correctly

Also See:

SetGraphY4AxisTitle()

   

GetGroupHeaderString()

 

This function stores the header string for series s in the buffer at szBuffer.

Syntax:

INT16 PUBLIC
GetGroupHeaderString (
     GraphPtr G,
     INT16 s,
     PCHAR szBuffer
);

Input:

G: Graph Pointer

 

s: Group header requested

 

szBuffer: Must be at least MAXSTRLEN long

Return:

INT16:

 

Value

Description

 

E00_OK =

Successful

 

Any other value =

Failure

Also See:

GetGroupHeaderPos()

   

GetRawLimits()

 

This function returns the minimum and maximum values of the data set attached to a particular value. For example, this function might set pfRawMin to 3.5 and pfRawMax to 85 even though the Y1 scale goes from 0..100. This function returns the raw value that is exactly from the user's data set.

Syntax:

INT16 PUBLIC
GetRawLimits (
     GraphPtr G,
     INT16 nAxisReq,
     REAL64 FAR * pfRawMin,
     REAL64 FAR * pfRawMax
);

Input:

G: Full graph pointer

 

nAxisReq: Axis requested (see DataAxisRef enum)

 

pfRawMin: Raw axis minimum

 

pfRawMax: Raw axis maximum

Return:

INT16: E00_OK or E00_RANGE_ERROR

Also See:

DetermineScale()

   

GetSeriesHeaderString()

 

This function stores the header string for series s in the caller supplied buffer (szBuffer).

Syntax:

INT16 PUBLIC
GetSeriesHeaderString (
     GraphPtr G,
     INT16 s,
     PCHAR szBuffer
);

Input:

G: Full Graph pointer

 

s: Series header requested

 

szBuffer: Must be at least MAXSTRLEN long

Return:

INT16: E00_OK = success/Any other value = error

Also See:

GetSeriesHeaderPos()

SetDataRange()

 

This function modifies the data range for pGraph. It is not needed for general use of the SEND_DATA method. It is useful for cases where you want to quickly adjust the viewable portion of the data in the graph object (e.g., for scrolling charts).

Syntax:

INT16 PUBLIC
SetDataRange (
     GraphPtr pGraph,
     INT16 *prULC,
     INT16 *pcULC,
     INT16 *prLRC,
     INT16 *pcLRC
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

prULC: defines the first row where the data will be set in the data array

 

pcULC: defines the first column where the data will be set in the data array

 

prLRC: defines the last row where the data will be set in the data array

 

pcLRC: defines the last column where the data will be set in the data array

Return:

INT16: Zero

Example:

// Set DataRange
// --------------
m_pChart->SetDataRange(
     m_RangeSeriesStart,
     m_RangeGroupStart,
     m_RangeSeriesEnd,
     m_RangeGroupEnd );

Also See:

GetDataRange(), SetVisibilityMode()

SetGraphData()

 

This function loads the data for the graph using the call-back routines supplied in the GraphDataInfo structure. Once loaded, data can be retrieved using SEND_DATA methods. When the chart has internal data, it can be saved as REQUEST_TDC (See Save_TIFFGraph()).

Syntax:

BOOLEAN16 PUBLIC
SetGraphData (
     void FAR *pGraph
);

Input:

pGraph: Pointer to the graph object created by AllocGraphPtr()

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

all values stored successfully

 

FALSE=

Could not store the value correctly in one of the cells

Example:

// load the group and series labels
SetGraphLabels(pGraph);
// load the data using the call backs
SetGraphData(pGraph);

Notes:

This function allows you to store your callback data into the chart object as if you had been using SEND_DATA methods.

Also See:

SetGraphStrings(), SetGraphLabels()

   

SetGraphDataInfo()

 

This function sets the data access methods on a per-graph basis. Your application should call this function at least once after creating a graph. The data access methods are called during the drawing of the graph..

Syntax:

INT16 PUBLIC
SetGraphDataInfo (
     GraphPtr pGraph,
     GraphDataPtr pGraphData
);

Input:

pGraph: Pointer to a graph created by AllocGraphPtr()

 

pGraphData: Pointer to a user-defined structure

Return:

INT16: 0/1

 

0=

a callback function was null

 

1=

no errors

Also See:

GetGraphDataInfo()

   

SetGraphFootNote()

 

This function sets the footnote string for the graph. The footnote is usually placed at the bottom of the chart. Use GetGraphFootNote() to determine the footnote string that is currently defined.

Syntax:

BOOLEAN16
SetGraphFootNote (
     void FAR *pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where graph footnote is defined.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string value set successfully

 

FALSE=

could not set the footnote string

Also See:

GetGraphFootnote()

   

SetGraphGroupsLabel()

 

This function sets the group label for group nCol to the label stored at szValue. In 3D charts, group labels appear along the group floor axis. Use GetGraphGroupsLabel() to determine the group label strings that are currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphGroupsLabel (
     void FAR *pGraph,
     INT16 nCol,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

nCol: Group number

 

szValue: Pointer to a string where the graph groups label is defined.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string value set successfully

 

FALSE=

could not set the string correctly

Example:

SetGraphGroupsLabel(gpGraph,0,"New Group 1 Label");

Also See:

GetGraphGroupsLabel()

SetGraphGroupsTitle()

 

This function sets the graph's group title string. In a 3D chart, the groups title is placed near the group labels and summarizes what the labels are about. In a Pie chart, the groups title label appears below the pie (it usually describes the pie). Use GetGraphGroupsTitle() to determine the group title strings that are currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphGroupsTitle (
     void FAR *pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where the group title is defined.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string value set successfully

 

FALSE=

could not set the string correctly

Example:

case IDM_NEWDATA_GROUPSTITLE:
     SetGraphGroupsTitle(gpGraph,"New Groups Title");
     InvalidateRect (hWnd, &rOld, TRUE);
     break;

Also See:

GetGraphGroupsTitle()

   

SetGraphLabels()

 

This function loads series and group labels into the chart object using the call-back routines supplied in the GraphDataInfo structure.

Syntax:

BOOLEAN16 PUBLIC
SetGraphLabels (
     void FAR *pGraph
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string value set successfully

 

FALSE=

could not set the string correctly

Notes:

The purpose of this function is to convert a CALLBACK chart to a SEND_DATA chart. For normal SEND_DATA programming, you should use SetGraphGroupsLabel() and SetGraphSeriesLabel()

Also See:

setGraphData(), SetGraphStrings()

SetGraphRowColData()

 

This function sets the data in the spreadsheet cell for the graph.

Syntax:

BOOLEAN16 PUBLIC
SetGraphRowColData (
     void FAR *pGraph,
     INT16 nRow,
     INT16 nCol,
     REAL64 rValue
);

Input:

pGraph: Graph Pointer

 

nRow: Series number for the data.

 

nCol: Group number for the data

 

prValue: Value to store in the cell

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

Value successfully stored

 

FALSE=

Could not store the value correctly

Example:

case IDM_NEWDATA_DATACELL:
SetGraphRowColData(gpGraph,0,0, 155.0);
InvalidateRect (hWnd, &rOld, TRUE);
break;

Notes:

This function is a low-level access routine for the sparse-matrix data storage mechanism used in SEND_DATA mode. It allows poking of values directly into the matrix using a spreadsheet metaphor.

Also See:

_SetGraphRowColData(), _SetGraphRowColPageData(), SetGraphRowColString()

SetGraphRowColString()

 

This function sets the string data in the spreadsheet cell for the graph.

Syntax:

BOOLEAN16 PUBLIC
SetGraphRowColString (
     GraphPtr pGraph,
     INT16 nRow,
     INT16 nCol,
     char FAR *lpValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

nRow: Series number for the data

 

nCol: Group number for the data

 

lpValue: Pointer to a location where string is defined.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

String successfully stored

 

FALSE=

Could not store the value correctly

Notes:

This function is a low-level access routine for the sparse-matrix data storage mechanism used in SEND_DATA mode. It allows poking of values directly into the matrix using a spreadsheet metaphor.

Also See:

SetGraphRowColData()

   

SetGraphSeriesLabel()

 

This function sets the chart's series labels. The integer (nRow) specifies the series for which the label at szValue is being defined. In 2D charts, series labels usually appear in the legend area. In 3D charts, series labels appear along the series floor axis. Use GetGraphSeriesLabel() to determine series labels that are currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphSeriesLabel (
     void FAR *pGraph,
     INT16 nRow,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

nRow: Series number for the data

 

szValue: Pointer to a location where series label is stored

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

String successfully stored

 

FALSE=

Could not store the value correctly

Example:

case IDM_NEWDATA_SERIES1:
SetGraphSeriesLabel(gpGraph,0,"New Series 1 Label");
InvalidateRect (hWnd, &rOld, TRUE);
break;

Also See:

GetGraphSeriesLabel

SetGraphSeriesTitle()

 

This function sets the chart's series title. In a 3D chart, the series title is placed near the series labels and it summarizes what the labels are about. Use GetGraphSeriesTitle() to determine the series title that is currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphSeriesTitle (
     void FAR *pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a location where the series title is stored

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

String successfully stored

 

FALSE=

Could not store the value correctly

Example:

case IDM_NEWDATA_SERIESTITLE:
     SetGraphSeriesTitle(gpGraph,"New Series Title");
     InvalidateRect (hWnd, &rOld, TRUE);
     break;

Also See:

GetGraphSeriesTitle()

   

SetGraphStrings()

 

This function loads a string into the chart object using the call-back routines supplied in the GraphDataInfo structure.

Syntax:

BOOLEAN16 PUBLIC
SetGraphStrings (
     void FAR *pGraph
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string successfully stored

 

FALSE=

Could not store the value correctly

Notes:

The purpose of this function is to convert a CALLBACK chart to a SEND_DATA chart. For normal SEND_DATA programming, you should use SetGraphGroupsLabel() and SetGraphSeriesLabel()

Also See:

SetGraphLabels()

SetGraphSubTitle()

 

This function sets the subtitle for the graph. The subtitle is often placed below the chart's title. Use GetGraphSubTitle() to determine the subtitle string that is currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphSubTitle (
     void FAR *pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where graph subtitle is stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string successfully stored

 

FALSE=

Could not store the value correctly

Example:

case IDM_NEWDATA_SUBTITLE:
     SetGraphSubTitle(gpGraph,"New Sub Title");
     InvalidateRect (hWnd, &rOld, TRUE);
     break;

Also See:

GetGraphSubtitle()

   

SetGraphTitle()

 

This function sets the title for the graph. The title is usually placed at the top of the chart. Use GetGraphTitle() to determine the title string that is currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphTitle (
     void FAR *pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where graph title is stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string successfully stored

 

FALSE=

Could not store the value correctly

Also See:

GetGraphTitle()

   

SetGraphY1AxisTitle()

 

This function sets the Y1-axis title for the graph. The Y1-axis title usually displays near the Y1-axis. In a standard vertical bar chart, the Y1-axis is the vertical axis on the left side. Use GetGraphY1AxisTitle() to determine the title string that is currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphY1AxisTitle (
     void FAR *pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where the axis title is stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string successfully stored

 

FALSE=

Could not store the value correctly

Also See:

GetGraphY1AxisTitle(), SetGraphY2AxisTitle()

   

SetGraphY2AxisTitle()

 

This function sets the Y2-axis title for the graph. The Y2-axis title usually displays near the Y2-axis. In a standard vertical bi-polar or dual-axes bar chart, the Y2-axis is a second vertical axis on the right side. Use GetGraphY2AxisTitle() to determine the title string that is currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphY2AxisTitle (
     void FAR *pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where the axis title is stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string successfully stored

 

FALSE=

Could not store the value correctly

Also See:

GetGraphY2AxisTitle(), SetGraphY1AxisTitle()

   

SetGraphY3AxisTitle()

 

This function sets the Y3-axis title for the graph. Use GetGraphY3AxisTitle() to determine the title string that is currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphY3AxisTitle (
     void FAR *pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where the axis title is stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string successfully stored

 

FALSE=

Could not store the value correctly

Also See:

GetGraphY3AxisTitle()

   

SetGraphY4AxisTitle()

 

This function sets the Y4-axis title for the graph. Use GetGraphY4AxisTitle() to determine the title string that is currently defined.

Syntax:

BOOLEAN16 PUBLIC
SetGraphY4AxisTitle (
     void FAR *pGraph,
     char FAR *szValue
);

Input:

pGraph: A graph pointer allocated by AllocGraphPtr()

 

szValue: Pointer to a string where the axis title is stored.

Return:

BOOLEAN16: TRUE/FALSE

 

TRUE=

string successfully stored

 

FALSE=

Could not store the value correctly

Also See:

GetGraphY4AxisTitle()