This documentation is archived and is not being maintained.

LegendItemsCollection::Insert Method (Int32, Color, String)

Inserts a LegendItem object with the specified text and symbol color into the collection at the specified location.

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

public:
void Insert(
	int index, 
	Color color, 
	String^ text
)

Parameters

index
Type: System::Int32
The location in the zero-based index where the LegendItem object is to be inserted.
color
Type: System.Drawing::Color
The symbol color of the legend item.
text
Type: System::String
The legend item text.

Inserts a custom legend item into the collection at the specified location using the specified text and symbol color.

To insert a legend item that uses an image for its symbol, use the Insert method.

Use the Add method to append a LegendItem object that uses a color for its symbol to the end if the collection.

.NET Framework

Supported in: 4

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: