Get(Construct) Enhanced Legend string
string GetEnhancedLegend( LPCSTR lpcszTitle = NULL, int nPlotObj = -1, DWORD dwProps = ENHANCEDLEGEND_AllProp )
The Enhanced Legend.
EX1
void GraphLayer_GetEnhancedLegend_ex1() { Worksheet wks; wks.Create("origin"); string strFile = GetAppPath(TRUE)+"Samples\Graphing\Categorical Data.dat"; 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); string strLegend = gl.GetEnhancedLegend("Title\n", 0); printf("GetEnhancedLegend return: %s\n", strLegend); GraphObject goLegend; goLegend = gl.GraphObjects("Legend"); if(!goLegend) goLegend = gl.CreateGraphObject(GROT_TEXT, "Legend"); gl.LT_execute("legend.LINK=1"); goLegend.Text = strLegend; } }
GraphLayer::CanHaveEnhancedLegend
origin.h