LegendItemsCollection.Add Method (String, String)

.NET Framework (current version)
 

Adds a custom LegendItem object with the specified image to the end of the collection.

Namespace:   System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

Public Function Add (
	image As String,
	text As String
) As Integer

Parameters

image
Type: System.String

The absolute or relative URL of the image file to be used for the legend item symbol.

text
Type: System.String

The legend item text.

Return Value

Type: System.Int32

An integer that represents the location in the zero-based index where the item was inserted into the collection.

Appends a custom legend item to the collection with the specified text and image to be used as the symbol for the legend item.

To add a custom legend item that uses a color for its symbol, call the Add method.

To insert a LegendItem object into the collection use one of the Insert methods in this class.

.NET Framework
Available since 4.0
Return to top
Show: