GraphLayer::CanHaveEnhancedLegend

 

Description

Get Enhanced Legend propeties

Syntax

DWORD CanHaveEnhancedLegend( int nPlotObj = -1 )

Parameters

nPlotObj
[input] plot index, default -1: active plot

Return

Enhanced Legend propeties which use By Points setting:

ENHANCEDLEGEND_AllProp

ENHANCEDLEGEND_EDGECOLOR

ENHANCEDLEGEND_BACKCOLOR

ENHANCEDLEGEND_FORECOLOR

ENHANCEDLEGEND_SHAPE

ENHANCEDLEGEND_INTERIOR

ENHANCEDLEGEND_SIZE

ENHANCEDLEGEND_COLOR

ENHANCEDLEGEND_MaskColor

ENHANCEDLEGEND_FILLPATTERN

ENHANCEDLEGEND_COLOR_EX

ENHANCEDLEGEND_CtrlMask

ENHANCEDLEGEND_CombineCommonELP

ENHANCEDLEGEND_DisplayNoneIdxProp

ENHANCEDLEGEND_CAN_SHOW_ALL_CAT

Examples

EX1

void GraphLayer_CanHaveEnhancedLegend_ex1()
{
    Worksheet wks;
    wks.Create("origin");
    
    string strFile = GetAppPath(TRUE)+"Samples\Graphing\Categorical Data.dat"; // some data file name
    ASCIMP ai;
    if(0 == AscImpReadFileStruct(strFile, &ai) &&0 == wks.ImportASCII(strFile, ai))
    {
        GraphPage gp;
        gp.Create("bubble");
        if( !gp.IsValid() )
            return;
        GraphLayer gl = gp.Layers();
        gl.AddPlot(wks, IDM_PLOT_INDEX_SIZE_COLOR);

        DWORD flags = gl.CanHaveEnhancedLegend(-1);
        
        printf("CanHaveEnhancedLegend flags: %d\n", (int)flags);
    }
}

Remark

See Also

GraphLayer::GetEnhancedLegend

header to Included

origin.h