LegendItemsCollection.Add Method (Color, String)
.NET Framework (current version)
Adds a custom LegendItem object with the specified text and symbol color to the end of the collection.
Assembly: System.Web.DataVisualization (in System.Web.DataVisualization.dll)
Parameters
- color
-
Type:
System.Drawing.Color
The symbol color of the legend item.
- text
-
Type:
System.String
The legend item text.
Return Value
Type: System.Int32An integer that represents the location in the zero-based index where the item was inserted into the collection.
Appends a custom legend item with the specified text and symbol color to the end of the collection.
To add a custom legend item that uses an image for its symbol, call the Add method.
To insert a custom LegendItem object into the collection, use one of the Insert methods in this class.
.NET Framework
Available since 4.0
Available since 4.0
Show: