GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ChartSeries Class

    Namespace:
    GemBox.Spreadsheet.Charts
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a single chart series.

    • C#
    • VB.NET
    public class ChartSeries
    Public Class ChartSeries
    Inheritance:
    System.Object
    ChartSeries
    Derived
    MarkerChartSeries

    Properties

    DataLabels

    Gets the settings for the data labels for an entire series.

    • C#
    • VB.NET
    public ChartDataLabels DataLabels { get; }
    Public ReadOnly Property DataLabels As ChartDataLabels
    Property Value
    ChartDataLabels

    The settings for the data labels for an entire series.

    DataPoints

    Gets the chart series data points.

    • C#
    • VB.NET
    public DataPointCollection DataPoints { get; }
    Public ReadOnly Property DataPoints As DataPointCollection
    Property Value
    DataPointCollection

    The chart series data points.

    DisplayName

    Gets the series display name. If Name is direct value, then Name value is returned; otherwise, if Name is a cell reference, then referenced cell value is returned.

    • C#
    • VB.NET
    public string DisplayName { get; }
    Public ReadOnly Property DisplayName As String
    Property Value
    System.String

    The series display name.

    Fill

    Gets or sets the fill formatting options.

    • C#
    • VB.NET
    public FillFormat Fill { get; set; }
    Public Property Fill As FillFormat
    Property Value
    FillFormat

    The fill formatting options.

    Remarks

    Fill format is not supported by LineChartSeries and ScatterChartSeries. For those instances property will always return an empty fill and setting the value will have no effect.

    Index

    Gets the index of this ChartSeries instance in the parent ChartSeriesCollection. If parent chart is a ComboChart's child, value represents a global index.

    • C#
    • VB.NET
    public int Index { get; }
    Public ReadOnly Property Index As Integer
    Property Value
    System.Int32

    The index of this ChartSeries instance in the parent ChartSeriesCollection.

    IsLegendEntryVisible

    Gets or sets a value indicating whether legend entry for this series instance is visible.

    • C#
    • VB.NET
    public bool IsLegendEntryVisible { get; set; }
    Public Property IsLegendEntryVisible As Boolean
    Property Value
    System.Boolean

    true if legend entry for this series instance is visible; otherwise, false.

    Remarks

    Default value of this property is true.

    For PieChart and DoughnutChart use IsLegendEntryVisible from DataPoints.

    Name

    Gets or sets the series name as direct value (for example, 'My series') or as a reference to a cell with value (for example, '=Sheet1!A1').

    • C#
    • VB.NET
    public string Name { get; set; }
    Public Property Name As String
    Property Value
    System.String

    The series name.

    Outline

    Gets or sets the outline formatting options.

    • C#
    • VB.NET
    public LineFormat Outline { get; set; }
    Public Property Outline As LineFormat
    Property Value
    LineFormat

    The outline formatting options.

    Values

    Gets the chart series values.

    • C#
    • VB.NET
    public IEnumerable<object> Values { get; }
    Public ReadOnly Property Values As IEnumerable(Of Object)
    Property Value
    System.Collections.Generic.IEnumerable<System.Object>

    The chart series values.

    ValuesReference

    Gets or sets the chart series values as a cell range reference (for example, 'Sheet1!A1:D1'). Values from cells in the referenced range will be used as values of this series.

    • C#
    • VB.NET
    public string ValuesReference { get; set; }
    Public Property ValuesReference As String
    Property Value
    System.String

    The chart series values as a cell range reference.

    Methods

    Delete()

    Deletes the series.

    • C#
    • VB.NET
    public void Delete()
    Public Sub Delete

    SetValues(IEnumerable)

    Sets the chart series values.

    • C#
    • VB.NET
    public void SetValues(IEnumerable values)
    Public Sub SetValues(values As IEnumerable)
    Parameters
    values
    System.Collections.IEnumerable

    The chart series values.

    Exceptions
    System.ArgumentNullException

    values is null.

    SetValues(Object[])

    Sets the chart series values.

    • C#
    • VB.NET
    public void SetValues(params object[] values)
    Public Sub SetValues(ParamArray values As Object())
    Parameters
    values
    System.Object[]

    The chart series values.

    ToString()

    Returns the DisplayName value.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    The DisplayName value.

    Overrides
    System.Object.ToString()
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.