2.2.4.8.37 DataPlot::SetLineType


Description

Set line style.

Syntax

BOOL	SetLineType( int nIndex, BOOL bUndo = false )

Parameters

nIndex
[input] the line style
enum tagLineSymbolStyleType
{
	LINE_STYLE_AUTO			= -1,
	LINE_STYLE_SOLID,
	LINE_STYLE_DASH,
	LINE_STYLE_DOT,
	LINE_STYLE_DASH_DOT,
	LINE_STYLE_DASH_DOT_DOT,
	LINE_STYLE_SHORT_DASH,
	LINE_STYLE_SHORT_DOT,
	LINE_STYLE_SHORT_DASH_DOT,
	LINE_STYLE_END,
};
bUndo
[input] if bUndo is true, you can use Ctrl + Z to undo

Return

TRUE if successful, otherwise FALSE

Examples

EX1

void DataPlot_SetLineType()
{
    Worksheet wks;
    wks.Create("origin");
    Dataset ds1(wks,0);
    Dataset ds2(wks,1);
    ds1.Data(1,20,1);
    ds2.Data(1,20,1);
    GraphPage gp;
    gp.Create("origin");
    GraphLayer gl(gp.GetName(), 0);
    gl.AddPlot(wks); 
 
    DataPlot dp = gl.DataPlots(0); 
    dp.SetLineType(LINE_STYLE_DASH);
}

Remark

See Also

DataPlot::SetSymbol

Header to Included

origin.h