BCGSuite for MFC
BOOL CBCGPChartLegendVisualObject::InsertRelatedChart ( CBCGPChartVisualObject pChart,
CBCGPChartVisualObject pChartInsertAt,
BOOL  bInsertBefore,
BOOL  bRedraw = TRUE 
)

Connects a legend with a chart. The chart will be inseretd before or after specified chart.

Parameters
pCharta pointer to a chart whose series and data points should be displayed in legend
pChartInsertAta pointer to a chart which already connected to the legend.
bInsertBeforeSpecifies whether chart should be inserted before or after specified chart.
bRedrawspecifies whether a legend should be redrawn