Update a Graph Layer's legend and may also set the Auto Legend mode
bool legend_update( GraphLayer & gl, int nLegendMode = -1, bool bCreate = true, bool bReconstruct = true, LPCSTR lpcszCustomFormat = NULL, bool bOneforAll = false, bool bAscending = true )
If success then true else false
EX1
//For this example to run, make the graph layer to update legend active void legend_update_ex1() { GraphLayer gl = Project.ActiveLayer(); legend_update(gl, ALM_LONGNAME_UNITS);// set to be like in Origin 75 to use Long Name and Units }
origin.h