ChAddDataSeries Function

Microchip Graphics Library

Microchip Graphics Library
ChAddDataSeries Function
C
DATASERIES * ChAddDataSeries(
    CHART * pCh, 
    WORD nSamples, 
    WORD * pData, 
    XCHAR * pName
);
Overview

This function creates a DATASERIES object and populates the structure with the given parameters.

Input Parameters
Input Parameters 
Description 
CHART * pCh 
Pointer to the chart object. 
WORD nSamples 
The number of samples or data points. 
WORD * pData 
Pointer to the array of samples or data points. 
XCHAR * pName 
Pointer to the string used to label the data series. 
Returns

Returns the pointer to the data variable (DATASERIES) object created. If NULL is returned, the addition of the new object failed due to not enough memory for the object.

Preconditions

none

Side Effects

Appends to the list of DATASERIES that the chart is operating on. By default, the show flag of the newly added data series is set to SHOW_DATA or enabled.

Example

See ChCreate() example.

Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved