DataPlot::SetDataMarkers

Description

Set begin and end indices of data markers present on the data plot

Syntax

int SetDataMarkers( const vector<int>& vnBegin, const vector<int>& vnEnd, const vector<int>& vnIndices = NULL, BOOL bUndo = FALSE );

Parameters

vnBegin
[input] Specify the indices of data markers begin marker
vnEnd
[input] Specify the indices of data markers end marker
vnIndices
[input] Specify the indices of data markers to be set
bUndo
[input] Whether the action should be undoable

Return

Return 0 if no error, else return -1

Examples

EX1

//Before run the following code, add data markers on the active graph layer.
void DataPlot_SetDataMarkers_ex1()
{
    GraphLayer gl = Project.ActiveLayer();
    if( gl )
    {
        DataPlot dp = gl.DataPlots();
        if( dp )
        {
            vector<int> vnBegin = {5,10};
            vector<int> vnEnd = {20,25};
            vector<int> vnIndices = {1, 0};
            BOOL bUndo = TRUE;
            int nRet = dp.SetDataMarkers(vnBegin, vnEnd, vnIndices, bUndo);
            if(nRet==0)
                out_str("Set data markers success!");
        }
    }
}

Remark

See Also

DataPlot::GetDataMarkers

header to Include

origin.h