ActiveReports 6 Online Help
LegendText Property (DataPoint)
Example 

Gets or sets the text as string to display for the DataPoint in the legend.
Syntax
'Declaration
 
Public Property LegendText As String
public string LegendText {get; set;}
Remarks

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}.

Example
private void detail_Format(object sender, EventArgs e)
{     
   if(checkBoxSales.Checked)
   {     
      this.chartControl1.Series["Sales"].Points[0].LegendText = ""; 
   } 
   else 
   { 
      this.chartControl1.Series["Sales"].Points[0].LegendText = "Twenty"; 
   }
}
Private Sub Detail1_Format(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Detail1.Format
   If (CheckBoxSales.Checked) Then
       Me.ChartControl1.Series("Sales").Points(0).LegendText = ""
   Else
       Me.ChartControl1.Series("Sales").Points(0).LegendText = "Twenty"
   End If
End Sub
Requirements

Target Platforms: 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

See Also

Reference

DataPoint Class
DataPoint Members

Send Feedback