2.2.4.8.22 DataPlot::GetStackOffsetValues


Description

Get stack offset values for data plot.

Syntax

int GetStackOffsetValues( vector & vOffsets, int nDesig = COLDESIG_Y )

Parameters

vOffsets
[output]offset values
nDesig
[input]Designation of offset

Return

StackOffsetValues_None if no offset exist.

StackOffsetValues_Scalar if single fixed offset value, in vOffsets[0]

StackOffsetValues_Vector if exists offset value for every points.

Examples

void GetStackOffsetValues_ex()
{
	GraphLayer gl = Project.ActiveLayer();
	if(!gl)
		return;
	DataPlot dp = gl.DataPlots();
	if(!dp)
		return;
	
	vector vOffsets;
	int nRet = dp.GetStackOffsetValues(vOffsets, COLDESIG_Y);
	switch(nRet)
	{
	case StackOffsetValues_None:
		out_str("no offset");
		break;
		
	case StackOffsetValues_Scalar:
		out_double("offset=", vOffsets[0]);
		break;
		
	case StackOffsetValues_Vector:
		int nSize = vOffsets.GetSize();
		out_double("first point's offset=", vOffsets[0]);
		out_double("last point's offset=", vOffsets[nSize-1]);
		break;
		
	default:
		break;
	}
}

Remark

See Also

Header to Included

origin.h