編輯

共用方式為


LegendItem Constructors

Definition

Initializes a new instance of the LegendItem class.

Overloads

LegendItem()

Initializes a new instance of the LegendItem class.

LegendItem(String, Color, String)

Initializes a new instance of the LegendItem class with the specified name, color and image path.

LegendItem()

Initializes a new instance of the LegendItem class.

public:
 LegendItem();
public LegendItem ();
Public Sub New ()

Remarks

Use this constructor to create and initialize a new instance of the LegendItem class.

Note that you can also add custom legend items using the Add and Insert methods associated with the CustomItems collection property of the Legend object.

Applies to

LegendItem(String, Color, String)

Initializes a new instance of the LegendItem class with the specified name, color and image path.

public:
 LegendItem(System::String ^ name, System::Drawing::Color color, System::String ^ image);
public LegendItem (string name, System.Drawing.Color color, string image);
new System.Windows.Forms.DataVisualization.Charting.LegendItem : string * System.Drawing.Color * string -> System.Windows.Forms.DataVisualization.Charting.LegendItem
Public Sub New (name As String, color As Color, image As String)

Parameters

name
String

The name of the legend item.

color
Color

The color of the legend item.

image
String

The path of the image to be displayed for the legend item.

Remarks

Only the image or color parameter needs to be specified. If both are specified, the image parameter has precedence.

Applies to