BCGSuite for MFC
BOOL CBCGPChartLegendVisualObject::AddRelatedChart ( CBCGPChartVisualObject pChart,
BOOL  bRedraw = TRUE 
)

Connects a legend with a chart

Parameters
pCharta pointer to a chart whose series and data points should be displayed in legend
bRedrawspecifies whether a legend should be redrawn