GetLegendBitmap Method
Obtains a System.Drawing.Bitmap of the legend generated by the chart.
Syntax
Return Value
A System.Drawing.Bitmap of the legend.
Remarks
When invoked, the Element.Point properties of all elements drawn on the chart will be populated.
Example
//Save the legend as a separate image file System.Web.UI.WebControls.Image ImageLegend = new System.Web.UI.WebControls.Image(); ImageLegend.ImageUrl = Chart.FileManager.SaveImage(Chart.GetLegendBitmap()); Controls.Add(ImageLegend); //For complete code see SaveLegendImage.aspx sample
' Save the legend as a separate image file Dim ImageLegend As System.Web.UI.WebControls.Image = new System.Web.UI.WebControls.Image() ImageLegend.ImageUrl = Chart.FileManager.SaveImage(Chart.GetLegendBitmap()) Controls.Add(ImageLegend) 'For complete code see SaveLegendImage.aspx sample.
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also