Search code examples
activexteechart

OnGetLegendTextTchart event is not getting fired


I want to update the text and symbol on legend items. I am creating legend text with symbol using series and CSeriesPointerItems. I thought of using OnGetLegendTextTchart event, but it is not getting fired. OnAfterDrawTchart event is getting fired. So I am unable to understanding why is it not happening? Can you let me know what am I missing or how can we update the legend text and symbol?


Solution

  • There's an example showing how to use the Symbol OnDraw event to change the symbol on the legend. Find it at "All Features\Welcome !\Miscellaneous\Legend\Symbol OnDraw" in the Features Demo shipped with the installation.

    There's another example showing how to use the Items property on the Legend to change the texts of the same. Find it at "All Features\Welcome !\Miscellaneous\Legend\Items property" in the Features Demo shipped with the installation.