| Visual Basic (Declaration) | |
|---|---|
Public Property LegendText As String | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public string LegendText {get; set;} | |
| C# | Copy Code |
|---|---|
private void detail_Format(object
sender, EventArgs e) | |
| Visual Basic | Copy Code |
|---|---|
Private Sub Detail1_Format(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Detail1.Format | |
The LegendText property applies to both the Series and DataPoint objects. The LegendText property is treated as a {Value} by default when the data point appears in the legend and the LegendText property is set to an empty string. The {Value} is the original point value of the data point.
To render the x value for the data points in the legend for a one figure chart (i.e., funnel, pyramid, or doughnut), the LegendText property must be set to {Name}.