CBCGPChartLegendEntry* CBCGPChartLegendVisualObject::AddLegendEntry | ( | CBCGPChartVisualObject * | pChart, |
CBCGPChartSeries * | pSeries, | ||
int | nDataPointIndex = -1 |
||
) |
Adds a new legend entry (row)
Usually you call the first override from an CBCGPChartLegendVisualObject::OnLegendContentCreated handler to add custom entries. The second override is called by the legend internally when it gathers information from related charts. However, you can call the second override if you want to add an entry from a chart that is not connected to the legend
pChart | a pointer to a related chart |
pSeries | a pointer to a series in this related chart |
nDataPointIndex | a valid index of data point to be displayed in legend; it should be -1 if entry should |