Back to Devexpress

Series.Name Property

corelibraries-devexpress-dot-xtracharts-dot-series.md

latest6.2 KB
Original Source

Series.Name Property

Gets or sets the name of the series.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Misc)]
public string Name { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Misc)>
Public Property Name As String

Property Value

TypeDescription
String

A String value representing the name of the series.

|

Remarks

Note

This property value is dependent on localization. That can be important, for instance, for the ChartControl.GetSeriesByName method.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Name property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-chart-draw-a-custom-series-marker-in-the-crosshair/CS/CustomDrawCrosshairSample/Form1.cs#L71

csharp
DXBitmap image;
if (!bitmapCache.TryGetValue(element.Series.Name, out image)) {
    image = new DXBitmap(totalWidth, totalHeight);

winforms-chart-draw-a-custom-legend-marker-for-a-series/CS/CustomDrawingSample/Form1.cs#L58

csharp
private void OnObjectHotTracked(object sender, HotTrackEventArgs e) {
    trackedSeriesName = e.HitInfo.InSeries ? ((Series)e.HitInfo.Series).Name : null;
}

winforms-charts-show-chart-legend-with-markers-in-separate-control/CS/Form1.cs#L48

csharp
{
    if (fakeSeries.Name == series.Name)
    {

winforms-dashboard-display-each-series-in-separate-pane-for-chart-items/CS/MultiPaneExtension/MultiPaneModule.cs#L116

csharp
pane.Title.Visibility = DevExpress.Utils.DefaultBoolean.True;
    pane.Title.Text = seriesWithPoints[i].Name;
}

winforms-chart-draw-a-crosshair-cursor/CS/CustomDrawCrosshairCursor/Form1.cs#L52

csharp
element.LabelElement.MarkerSize = new Size(15, 15);
    element.LabelElement.Text = string.Format("{0}: A={1}; V={2}", element.Series.Name, element.SeriesPoint.Argument, element.SeriesPoint.Values[0]);
}

winforms-chart-draw-a-custom-series-marker-in-the-crosshair/VB/CustomDrawCrosshairSample/Form1.vb#L74

vb
Dim image As DXBitmap
If Not bitmapCache.TryGetValue(element.Series.Name, image) Then
    image = New DXBitmap(totalWidth, totalHeight)

winforms-chart-draw-a-custom-legend-marker-for-a-series/VB/CustomDrawingSample/Form1.vb#L62

vb
Private Sub OnObjectHotTracked(ByVal sender As Object, ByVal e As HotTrackEventArgs)
    trackedSeriesName = If(e.HitInfo.InSeries, CType(e.HitInfo.Series, Series).Name, Nothing)
End Sub

winforms-charts-show-chart-legend-with-markers-in-separate-control/VB/Form1.vb#L45

vb
For Each fakeSeries As Series In chart.Series
    If Equals(fakeSeries.Name, series.Name) Then
        currentSeries = fakeSeries

winforms-dashboard-display-each-series-in-separate-pane-for-chart-items/VB/MultiPaneExtension/MultiPaneModule.vb#L112

vb
pane.Title.Visibility = DevExpress.Utils.DefaultBoolean.True
    pane.Title.Text = seriesWithPoints(i).Name
Else

winforms-chart-draw-a-crosshair-cursor/VB/CustomDrawCrosshairCursor/Form1.vb#L52

vb
element.LabelElement.MarkerSize = New Size(15, 15)
    element.LabelElement.Text = String.Format("{0}: A={1}; V={2}", element.Series.Name, element.SeriesPoint.Argument, element.SeriesPoint.Values(0))
Next

See Also

GetSeriesByName(String)

Series Class

Series Members

DevExpress.XtraCharts Namespace