SeriesPoint.Argument Property

Gets the point's argument value.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

Declaration

public string Argument { get; set; }
Public Property Argument As String

Property Value

Type Description
String

A String value that specifies the data point's argument.

Remarks

Each data point is defined by the values of two coordinates - X and Y - when speaking about most series types.

The X coordinate value of a point represents the point's argument and is specified by the Argument property.

As for a point's Y coordinate, it can be defined by one or more Y values which are stored in an array available via the SeriesPoint.Values property.

NOTE

Note that as distinct from the Y axis which always becomes a numerical axis used to measure point data values, the X axis which indicates point arguments can measure different types of data. You can control scale types of point arguments using the SeriesBase.ScaleType property.

Examples

The following example shows how to obtain information about the chart element under the mouse pointer and use the ToolTipController Component to display this information.


ToolTipController toolTipController = new ToolTipController();
//....
private void chartControl_MouseMove(object sender, MouseEventArgs e) {
    ChartHitInfo hitInfo = chartControl.CalcHitInfo(e.Location);
    StringBuilder builder = new StringBuilder();
    if(hitInfo.InDiagram)
        builder.AppendLine("In diagram");
    if(hitInfo.InNonDefaultPane)
        builder.AppendLine("In non-default pane: " + hitInfo.NonDefaultPane.Name);
    if(hitInfo.InAxis) {
        builder.AppendLine("In axis: " + hitInfo.Axis.Name);
        if(hitInfo.AxisLabelItem != null)
            builder.AppendLine("  Label item: " + hitInfo.AxisLabelItem.Text);
        if(hitInfo.AxisTitle != null)
            builder.AppendLine("  Axis title: " + hitInfo.AxisTitle.Text);
    }
    if(hitInfo.InChartTitle)
        builder.AppendLine("In chart title: " + hitInfo.ChartTitle.Text);
    if(hitInfo.InLegend) {
        builder.AppendLine("In legend");
        if(hitInfo.Series != null && !hitInfo.InSeries)
            builder.AppendLine("  Series: " + ((Series)hitInfo.Series).Name);
    }
    if(hitInfo.InSeries)
        builder.AppendLine("In series: " + ((Series)hitInfo.Series).Name);
    if(hitInfo.InSeriesLabel) {
        builder.AppendLine("In series label");
        builder.AppendLine("  Series: " + ((Series)hitInfo.Series).Name);
    }
    if(hitInfo.InSeriesPoint) {
        builder.AppendLine("  Argument: " + hitInfo.SeriesPoint.Argument);
        if(!hitInfo.SeriesPoint.IsEmpty)
            builder.AppendLine("  Value: " + hitInfo.SeriesPoint.Values[0]);
    }
    if(hitInfo.InAnnotation)
        if(hitInfo.Annotation is TextAnnotation)
            builder.AppendLine("In annotation: " + ((TextAnnotation)hitInfo.Annotation).Name);
        else if(hitInfo.Annotation is ImageAnnotation)
            builder.AppendLine("In annotation: " + ((ImageAnnotation)hitInfo.Annotation).Name);
    if(builder.Length > 0)
        toolTipController.ShowHint("Hit-testing results:\n" + builder.ToString(), chartControl.PointToScreen(e.Location));
    else
        toolTipController.HideHint();
}
void chart_MouseLeave(object sender, EventArgs e) {
    toolTipController.HideHint();
}
Member Description
ChartHitInfo Contains information about a specific point in a chart.
ChartControl.CalcHitInfo Returns information about the chart elements at the specified x and y coordinates.
See Also