Hello,
You are quite right that the proper way to export the legend is to make it visible just before the start of the export and then hide it again. You can do that using this code snippet (this is a modified version of the
getSvgContent() method from the Code Library):
The reason why you cannot export your custom legend is probably because it is created by HTML while the Code Library relies on the rendered SVG elements of the chart. What you could do in this situation is to search and find a library which provides exporting the HTML content of a page to PNG or PDF and apply it in your scenario.
Regards,
Stamo Gochev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the
blog feed now.