menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartSeries - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartSeries

    ChartSeries acts as a wrapper around data that is to be displayed and styles that are associated with the data. The data that is to be displayed is contained in either IChartSeriesModel or IEditableChartSeriesModel implementation. The style to be used to display the points is stored in a contained implementation of IChartSeriesStylesModel.

    Inheritance
    System.Object
    ChartSeries
    Implements
    IChartSeriesStylesHost
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Syncfusion.Windows.Forms.Chart
    Assembly: Syncfusion.Chart.Base.dll
    Syntax
    public class ChartSeries : IChartSeriesStylesHost

    Constructors

    ChartSeries()

    Initializes a new instance of the ChartSeries class.

    Declaration
    public ChartSeries()

    ChartSeries(String)

    Initializes a new instance of the ChartSeries class.

    Declaration
    public ChartSeries(string name)
    Parameters
    Type Name Description
    System.String name

    An name of series. This value will be set to Text property too.

    ChartSeries(String, ChartSeriesType)

    Initializes a new instance of the ChartSeries class.

    Declaration
    public ChartSeries(string name, ChartSeriesType type)
    Parameters
    Type Name Description
    System.String name

    An name of series. This value will be set to Text property too.

    ChartSeriesType type

    An type of series.

    Fields

    m_resetStyles

    Gets or sets a value indicating whether reset all the styles while modifying the ChartPoint properties.

    Declaration
    public bool m_resetStyles
    Field Value
    Type
    System.Boolean

    Properties

    ActualXAxis

    Returns actual X axis, that values of series.Points[i].X are plotted on it.

    Declaration
    public ChartAxis ActualXAxis { get; }
    Property Value
    Type
    ChartAxis

    ActualYAxis

    Returns actual Y axis, that values of series.Points[i].Yvalues are plotted on it.

    Declaration
    public ChartAxis ActualYAxis { get; }
    Property Value
    Type
    ChartAxis

    BackColor

    Refer BackColor

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public Color BackColor { get; }
    Property Value
    Type
    System.Drawing.Color

    BaseStackingType

    Gets the base type of the ChartSeries. The BaseType is used by the rendering code to check which of the pre-defined display patterns this series fits. ChartSeriesBaseType

    Declaration
    public ChartSeriesBaseStackingType BaseStackingType { get; }
    Property Value
    Type
    ChartSeriesBaseStackingType

    BaseType

    Gets the base type of the ChartSeries. The BaseType is used by the rendering code to check which of the pre-defined display patterns this series fits. ChartSeriesBaseType

    Declaration
    public ChartSeriesBaseType BaseType { get; }
    Property Value
    Type
    ChartSeriesBaseType

    CategoryModel

    Returns an instance of the underlying this series.

    Declaration
    public IChartSeriesCategory CategoryModel { get; set; }
    Property Value
    Type
    IChartSeriesCategory

    ChartModel

    Gets or sets the Chart's model. ChartModel

    Declaration
    public ChartModel ChartModel { get; set; }
    Property Value
    Type
    ChartModel

    Compatible

    Indicates whether the series is compatible with other series added to the series collection.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool Compatible { get; set; }
    Property Value
    Type
    System.Boolean

    ConfigItems

    Returns the Chart series configuration items.

    Declaration
    public ChartSeriesConfigCollection ConfigItems { get; }
    Property Value
    Type
    ChartSeriesConfigCollection

    DrawColumnSeparatingLines

    The drawing of separating line between columns is controlled by this property.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool DrawColumnSeparatingLines { get; set; }
    Property Value
    Type
    System.Boolean

    DrawErrorBars

    Error Bars are used to indicate a degree of uncertainity in the plotted data through a bar indicating an "error range". The 2nd Y value of a ChartPoint is used to indicate the error range. This is supported with Line, Bar and Column charts. Also see ErrorBarsSymbolShape

    Declaration
    [Obsolete("Use ConfigItems.ErrorBars.Enabled property")]
    public bool DrawErrorBars { get; set; }
    Property Value
    Type
    System.Boolean

    DrawHistogramNormalDistribution

    Indicates if the Histogram normal distribution should be drawn

    Declaration
    [Obsolete("Use ConfigItems.HistogramItem.ShowNormalDistribution")]
    public bool DrawHistogramNormalDistribution { get; set; }
    Property Value
    Type
    System.Boolean

    DrawSeriesNameInDepth

    Indicates whether to draw series name at opposed position to origin, along x axis.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool DrawSeriesNameInDepth { get; set; }
    Property Value
    Type
    System.Boolean

    EnableAreaToolTip

    Get or set to enable or disable the ToolTip for Full Area of ChartInterior. This is only for AreaCharts.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool EnableAreaToolTip { get; set; }
    Property Value
    Type
    System.Boolean

    EnableScatterShape

    Enable scatter shape. In the current implementation, this property is used only by the scatter series.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool EnableScatterShape { get; set; }
    Property Value
    Type
    System.Boolean

    EnableStyles

    If set to False, the rendering is faster with the following remarks: The points style is disabled, all points use series style.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool EnableStyles { get; set; }
    Property Value
    Type
    System.Boolean

    ErrorBarsSymbolShape

    Specifies the symbol that should be used in error bars. Also see DrawErrorBars

    Declaration
    [Obsolete("Use ConfigItems.ErrorBars.SymbolShape property")]
    public ChartSymbolShape ErrorBarsSymbolShape { get; set; }
    Property Value
    Type
    ChartSymbolShape

    ExplodedAll

    Explode all points . In the current implementation, this property is used only by the pie chart.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool ExplodedAll { get; set; }
    Property Value
    Type
    System.Boolean

    ExplodedIndex

    Gets or sets the index of the point that is to be exploded from the main display. In the current implementation, this property is used only by the pie chart.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public int ExplodedIndex { get; set; }
    Property Value
    Type
    System.Int32

    ExplosionOffset

    Gets or sets the offset value that is to be used when a point is to be exploded from the main display. Currently applies only to the Pie chart. Offset is taken in percentage terms.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public float ExplosionOffset { get; set; }
    Property Value
    Type
    System.Single

    FancyToolTip

    Returns the Fancy tooltip

    Declaration
    [ChartTemplate(ChartTemplateSet.Content)]
    public ChartFancyToolTipInfo FancyToolTip { get; }
    Property Value
    Type
    ChartFancyToolTipInfo

    GanttDrawMode

    Specifies the drawing mode of Gantt chart

    Declaration
    [Obsolete("Use ConfigItems.GanttItem.DrawMode")]
    public ChartGanttDrawMode GanttDrawMode { get; set; }
    Property Value
    Type
    ChartGanttDrawMode

    HeightBox

    Gets or sets height of the boxes in the financial chart types.

    Declaration
    public double HeightBox { get; set; }
    Property Value
    Type
    System.Double

    InSideRadius

    Sets / Gets the doughnut coefficient of pie chart

    Declaration
    [Obsolete("Use ConfigItems.PieItem.DoughnutCoeficient")]
    public float InSideRadius { get; set; }
    Property Value
    Type
    System.Single

    LegendItem

    Returns the private instance of LegendItem class.

    Declaration
    public ChartSeriesLegendItem LegendItem { get; }
    Property Value
    Type
    ChartSeriesLegendItem

    LegendItemUseSeriesStyle

    Indicates whether the legend item should use the series style.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool LegendItemUseSeriesStyle { get; set; }
    Property Value
    Type
    System.Boolean

    LegendName

    Gets or sets value indicates the legend for representation of series.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public string LegendName { get; set; }
    Property Value
    Type
    System.String

    Name

    Gets or sets the name of this series object. You can retrieve a series by its name from the ChartSeriesCollection object in the ChartModel where it is stored.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public string Name { get; set; }
    Property Value
    Type
    System.String
    Remarks

    The ChartModel can't contains several series with the same name.

    NumberOfHistogramIntervals

    Gets or sets the number of Histogram intervals

    Declaration
    [Obsolete("Use ConfigItems.HistogramItem.NumberOfIntervals")]
    public int NumberOfHistogramIntervals { get; set; }
    Property Value
    Type
    System.Int32

    OpenCloseDrawMode

    Indicates rotation angle around x axis of series name string.

    Declaration
    [Obsolete("Use ConfigItems.HiLoOpenCloseItem.DrawMode")]
    public ChartOpenCloseDrawMode OpenCloseDrawMode { get; set; }
    Property Value
    Type
    ChartOpenCloseDrawMode

    OptimizePiePointPositions

    Indicates if the pie points are optimized for position

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool OptimizePiePointPositions { get; set; }
    Property Value
    Type
    System.Boolean

    OriginDependent

    Gets a value indicating whether a series is dependent by Origin.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool OriginDependent { get; }
    Property Value
    Type Description
    System.Boolean

    true if a series is dependent by origin; otherwise, false.

    Points

    Collection of Data points. These data points only serve as a thin wrapper around the actual data contained in the IChartSeriesModel or IEditableChartSeriesModel. You can add, remove and edit points in this collection.

    Declaration
    [ChartTemplate(ChartTemplateSet.SimpleAndCollection, typeof(ChartPoint))]
    public ChartPointIndexer Points { get; }
    Property Value
    Type
    ChartPointIndexer

    PointsToolTipFormat

    Gets or sets the format for tooltip "{0}" - series name "{1}" - series style tooltip "{2}" - tooltip of point "{3}" - X value of point "{4}" and other - Y value of point

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public string PointsToolTipFormat { get; set; }
    Property Value
    Type
    System.String

    PriceDownColor

    Gets or sets the price up color

    Declaration
    [Obsolete("Use CConfigItems.FinancialItem.PriceDownColor")]
    public Color PriceDownColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    PriceUpColor

    Gets or sets the price down color

    Declaration
    [Obsolete("Use ConfigItems.FinancialItem.PriceUpColor")]
    public Color PriceUpColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    Renderer

    Gets or sets the ChartSeriesRenderer.

    Declaration
    public ChartSeriesRenderer Renderer { get; set; }
    Property Value
    Type Description
    ChartSeriesRenderer

    The renderer.

    RequireAxes

    Indicates whether the currently set series type requires axes to be rendered. Currently set to False only for Pie charts.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool RequireAxes { get; }
    Property Value
    Type
    System.Boolean

    RequireInvertedAxes

    Indicates whether the currently set series type requires axes to be inverted.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool RequireInvertedAxes { get; }
    Property Value
    Type
    System.Boolean

    ResetStyles

    Gets or sets a value indicating whether reset all the styles while modifying the ChartPoint properties.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool ResetStyles { get; set; }
    Property Value
    Type
    System.Boolean

    Resolution

    Based on the resolution the number of points drawn will be reduced for improving the performance.

    Declaration
    public double Resolution { get; set; }
    Property Value
    Type
    System.Double

    ReversalAmount

    Gets or sets the reversal amount (Useful for Kagi chart,PointAndFigure chart and Renko chart)

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public double ReversalAmount { get; set; }
    Property Value
    Type
    System.Double

    ReversalIsPercent

    Indicates if the Reversal amount is taken in percentage

    Declaration
    public bool ReversalIsPercent { get; set; }
    Property Value
    Type
    System.Boolean

    Rotate

    Indicates whether the ChartArea is to be rotated and rendered. Default value is false.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool Rotate { get; set; }
    Property Value
    Type
    System.Boolean

    ScatterConnectType

    Specifies connect type of scatter chart

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public ScatterConnectType ScatterConnectType { get; set; }
    Property Value
    Type
    ScatterConnectType

    ScatterSplineTension

    Gets or sets the tension required for the scatter spline chart.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public double ScatterSplineTension { get; set; }
    Property Value
    Type
    System.Double

    SeriesIndexedModelImpl

    The IChartSeriesIndexedModel interface is a special interface that serves as a degraded special case of IChartSeriesModel. The special case being situations where the X value is not needed. When you implement IChartSeriesIndexedModel and set it to this property, the chart will internally create an adapter that implements IChartSeriesModel and treat it as any other model.

    Declaration
    public IChartSeriesIndexedModel SeriesIndexedModelImpl { get; set; }
    Property Value
    Type
    IChartSeriesIndexedModel

    SeriesModel

    Returns an instance of the IChartSeriesModel underlying this series.

    Declaration
    public IChartSeriesModel SeriesModel { get; set; }
    Property Value
    Type
    IChartSeriesModel

    SeriesModelImpl

    Gets or sets an instance of the IChartSeriesModel underlying this series. Use this property to replace this instance with your own implementation. Use SeriesModel to access the model if you do not intend to replace it.

    Declaration
    [Obsolete("Use SeriesModel property. This property just duplicate it.")]
    public IChartSeriesModel SeriesModelImpl { get; set; }
    Property Value
    Type
    IChartSeriesModel

    SeriesNameOXAngle

    Indicates rotation angle around x axis of series name string.

    Declaration
    public float SeriesNameOXAngle { get; set; }
    Property Value
    Type
    System.Single

    SeriesToolTipFormat

    Gets or sets the format for tooltip "{0}" - series name "{1}" - series style tooltip

    Declaration
    public string SeriesToolTipFormat { get; set; }
    Property Value
    Type
    System.String

    ShowHistogramDataPoints

    Indicates if the histogram data points should be shown

    Declaration
    [Obsolete("Use ConfigItems.HistogramItem.ShowDataPoints")]
    public bool ShowHistogramDataPoints { get; set; }
    Property Value
    Type
    System.Boolean

    ShowTicks

    Indicates if the Ticks should be shown (only for Pie charts)

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool ShowTicks { get; set; }
    Property Value
    Type
    System.Boolean

    SmartLabels

    Specifies the behavior of the labels.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool SmartLabels { get; set; }
    Property Value
    Type
    System.Boolean

    SmartLabelsBorderColor

    Gets or sets the BorderColor of the Smartlabels.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public Color SmartLabelsBorderColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    SmartLabelsBorderWidth

    Gets or sets the BorderWidth of the Smartlabels.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public float SmartLabelsBorderWidth { get; set; }
    Property Value
    Type
    System.Single

    SortBy

    Gets or sets the type of sorting used.

    Declaration
    [ChartTemplate(ChartTemplateSet.SimpleBehavior)]
    public ChartSeriesSortingType SortBy { get; set; }
    Property Value
    Type
    ChartSeriesSortingType

    SortOrder

    Gets a value indicating whether sorting the axis value type direction by Origin.

    Declaration
    [ChartTemplate(ChartTemplateSet.SimpleBehavior)]
    public ChartSeriesSortingOrder SortOrder { get; set; }
    Property Value
    Type
    ChartSeriesSortingOrder

    SortPoints

    Gets or sets a value indicating whether points will be sorted.

    Declaration
    [ChartTemplate(ChartTemplateSet.SimpleBehavior)]
    public bool SortPoints { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if points will be sorted; otherwise, false.

    StackingGroup

    Gets or sets a grouping name which is used to group the StackingSeries together.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public string StackingGroup { get; set; }
    Property Value
    Type
    System.String

    Style

    Returns the style object associated with the series. Attributes that are applied to this style will change the appearance of the complete series.

    Declaration
    [ChartTemplate(ChartTemplateSet.Content)]
    public ChartStyleInfo Style { get; }
    Property Value
    Type
    ChartStyleInfo

    Styles

    Returns the styles that represent rendering information for the individual points in the series. Each of these style objects can be manipulated to affect the formatting and display of individual points. Styles set to individual points take precedence over the style of the Series (Style.

    Declaration
    [ChartTemplate(ChartTemplateSet.SimpleAndCollection, typeof(ChartStyleInfo))]
    public ChartStyleInfoIndexer Styles { get; }
    Property Value
    Type
    ChartStyleInfoIndexer

    StylesImpl

    Gets or sets the object that implements IChartSeriesStylesModel. This object stores styles in an optimized manner and provides them on demand. You can replace this object with your own implementation of this interface to meet specific performance needs. In most cases, you should just use the default styles model that is provided.

    Declaration
    public IChartSeriesStylesModel StylesImpl { get; set; }
    Property Value
    Type
    IChartSeriesStylesModel

    Summary

    Provides access to summary information such as minimum / maximum values contained in this series at any given moment.

    Declaration
    public IChartSeriesSummary Summary { get; }
    Property Value
    Type
    IChartSeriesSummary

    Tag

    Gets or sets the object that contains data about the series.

    Declaration
    public object Tag { get; set; }
    Property Value
    Type
    System.Object

    Text

    Gets /sets the text that is to be associated with this series. This is the text that will be displayed by default by the legend item associated with this series.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public string Text { get; set; }
    Property Value
    Type
    System.String

    Trendlines

    Returns the trendline

    Declaration
    [ChartTemplate(ChartTemplateSet.Collection)]
    public TrendlineCollection Trendlines { get; }
    Property Value
    Type
    TrendlineCollection

    Type

    Gets or sets the chart type that is to be rendered using this series. Please refer to ChartSeriesType for a complete list and explanation of chart types.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public ChartSeriesType Type { get; set; }
    Property Value
    Type
    ChartSeriesType

    Visible

    Indicates whether the series is to be plotted.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public bool Visible { get; set; }
    Property Value
    Type
    System.Boolean

    XAxis

    Gets or sets the X Axis instance against which this series will be plotted.

    Declaration
    public ChartAxis XAxis { get; set; }
    Property Value
    Type
    ChartAxis

    XType

    Returns the X value type that is being rendered. Please refer to ChartValueType for details on supported value types.

    Declaration
    public ChartValueType XType { get; }
    Property Value
    Type
    ChartValueType

    YAxis

    Gets or sets the Y Axis instance against which this series will be plotted.

    Declaration
    public ChartAxis YAxis { get; set; }
    Property Value
    Type
    ChartAxis

    YType

    Returns the Y value type that is being rendered. Please refer to ChartValueType for details on supported value types.

    Declaration
    public ChartValueType YType { get; }
    Property Value
    Type
    ChartValueType

    ZOrder

    Gets or sets the ZOrder of the series. You can use this setting to control which series gets plotted first. The chart will sort by ZOrder before rendering.

    Declaration
    [ChartTemplate(ChartTemplateSet.Simple)]
    public int ZOrder { get; set; }
    Property Value
    Type
    System.Int32

    Methods

    AddAxis(ChartAxis, Boolean)

    Method to add or modify axis in a series without triggering axes changed event. Use this method for changing the horizontal or vertical axis of a series between begin and end update methods

    Axis to be modified A boolean value representing the orientation of axis. True represents horizontal and false represents vertical axis
    Declaration
    public void AddAxis(ChartAxis axis, bool horizontal)
    Parameters
    Type Name Description
    ChartAxis axis
    System.Boolean horizontal

    Dispose()

    Method to dispose ChartSeries object

    Declaration
    public void Dispose()

    DisposeChartSeries()

    Method to dispose ChartSeries object

    Declaration
    public void DisposeChartSeries()

    GetOfflineStyle()

    Declaration
    public ChartStyleInfo GetOfflineStyle()
    Returns
    Type
    ChartStyleInfo

    GetOfflineStyle(Int32)

    Declaration
    public ChartStyleInfo GetOfflineStyle(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type
    ChartStyleInfo

    GetStylesMap()

    Refer GetStylesMap()

    Declaration
    public ChartBaseStylesMap GetStylesMap()
    Returns
    Type
    ChartBaseStylesMap

    ResetSeriesModel()

    Resets the ChartSeries model.

    Declaration
    public void ResetSeriesModel()

    ToString()

    Returns a System.String that represents the current System.Object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents the current System.Object.

    Overrides
    System.Object.ToString()

    UpdateCategoryModel(Object)

    Updates the ChartSeries CategoryModel.

    Declaration
    public void UpdateCategoryModel(object dataSource)
    Parameters
    Type Name Description
    System.Object dataSource

    UpdateSeriesModel(Object)

    Updates the ChartSeries Model.

    Declaration
    public void UpdateSeriesModel(object dataSource)
    Parameters
    Type Name Description
    System.Object dataSource

    Events

    AppearanceChanged

    Triggers when appearance of ChartSeries is changed.

    Declaration
    public event EventHandler AppearanceChanged
    Event Type
    Type
    System.EventHandler

    PrepareSeriesStyle

    When a series point is about to be rendered by the chart, it will raise this event and allow event subscribers to change the Series style used. You can handle this event to easily change style attributes based on external rules (for example).

    Declaration
    public event ChartPrepareStyleInfoHandler PrepareSeriesStyle
    Event Type
    Type
    ChartPrepareStyleInfoHandler

    PrepareStyle

    When a series point is about to be rendered by the chart, it will raise this event and allow event subscribers to change the style used. You can handle this event to easily change style attributes based on external rules (for example).

    Declaration
    public event ChartPrepareStyleInfoHandler PrepareStyle
    Event Type
    Type
    ChartPrepareStyleInfoHandler

    Implements

    IChartSeriesStylesHost
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved