dotnetCHARTING Send comments on this topic.
GetLegendBitmap Method
See Also  Example
dotnetCHARTING Namespace > Chart Class : GetLegendBitmap Method


Obtains a Bitmap of the legend generated by the chart.

Syntax

Visual Basic (Declaration)  
Public Function GetLegendBitmap() As Bitmap
Visual Basic (Usage) Copy Code
Dim instance As Chart
Dim value As Bitmap
 
value = instance.GetLegendBitmap()
C#  
public Bitmap GetLegendBitmap()

Return Value

A Bitmap of the legend.

Example

C# Copy Code
//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
    
Visual Basic Copy Code
' 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.

Remarks

When invoked, the Element.Point properties of all elements drawn on the chart will be populated.

See Also