menu

WPF

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

    Show / Hide Table of Contents

    Class ColumnSeries

    ColumnSeries displays its data points using a set of vertical bars. Its height is proportional to the data points being plotted.

    Inheritance
    System.Object
    ChartSeriesBase
    ChartSeries
    AdornmentSeries
    CartesianSeries
    XyDataSeries
    XySegmentDraggingBase
    ColumnSeries
    Implements
    ICloneable
    ISupportAxes2D
    ISupportAxes
    ISegmentSelectable
    ISegmentSpacing
    Inherited Members
    AdornmentSeries.AddAdornmentAtXY(Double, Double, Int32)
    AdornmentSeries.AddAreaAdornments(IList<Double>[])
    AdornmentSeries.AddColumnAdornments(Double[])
    AdornmentSeries.AdornmentLabelCreated
    AdornmentSeries.AdornmentsInfo
    AdornmentSeries.AdornmentsInfoProperty
    AdornmentSeries.ClearUnUsedAdornments(Int32)
    AdornmentSeries.CreateAdornment(AdornmentSeries, Double, Double, Double, Double)
    CartesianSeries.GetDataPoints(Double, Double, Double, Double)
    CartesianSeries.GetDataPoints(Rect)
    CartesianSeries.IsTransposed
    CartesianSeries.IsTransposedProperty
    CartesianSeries.ISupportAxes.ActualXAxis
    CartesianSeries.ISupportAxes.ActualYAxis
    CartesianSeries.OnApplyTemplate()
    CartesianSeries.OnVisibleRangeChanged(VisibleRangeChangedEventArgs)
    CartesianSeries.OnXAxisChanged(ChartAxis, ChartAxis)
    CartesianSeries.OnYAxisChanged(ChartAxis, ChartAxis)
    CartesianSeries.ShowTrackballInfo
    CartesianSeries.ShowTrackballInfoProperty
    CartesianSeries.Trendlines
    CartesianSeries.TrendlinesProperty
    CartesianSeries.XAxis
    CartesianSeries.XAxisProperty
    CartesianSeries.XRange
    CartesianSeries.YAxis
    CartesianSeries.YAxisProperty
    CartesianSeries.YRange
    ChartSeries.Area
    ChartSeries.GetDataPointIndex(Double, Double)
    ChartSeries.OnCreateAutomationPeer()
    ChartSeries.Stroke
    ChartSeries.StrokeProperty
    ChartSeries.StrokeThickness
    ChartSeries.StrokeThicknessProperty
    ChartSeriesBase.ActualXAxis
    ChartSeriesBase.ActualXValues
    ChartSeriesBase.ActualYAxis
    ChartSeriesBase.Adornments
    ChartSeriesBase.AnimationDuration
    ChartSeriesBase.AnimationDurationProperty
    ChartSeriesBase.ChartTransformer
    ChartSeriesBase.ClearUnUsedSegments(Int32)
    ChartSeriesBase.Clone()
    ChartSeriesBase.ColorModel
    ChartSeriesBase.ColorModelProperty
    ChartSeriesBase.ColorValues
    ChartSeriesBase.CreateEmptyPointSegments(IList<Double>, List<List<Double>>, List<List<Double>>)
    ChartSeriesBase.CreateTransformer(Size, Boolean)
    ChartSeriesBase.DataCount
    ChartSeriesBase.EmptyPointInterior
    ChartSeriesBase.EmptyPointInteriorProperty
    ChartSeriesBase.EmptyPointStyle
    ChartSeriesBase.EmptyPointStyleProperty
    ChartSeriesBase.EmptyPointSymbolTemplate
    ChartSeriesBase.EmptyPointSymbolTemplateProperty
    ChartSeriesBase.EmptyPointValue
    ChartSeriesBase.EmptyPointValueProperty
    ChartSeriesBase.EnableAnimation
    ChartSeriesBase.EnableAnimationProperty
    ChartSeriesBase.FindNearestChartPoint(Point, Double, Double, Double)
    ChartSeriesBase.GeneratePoints(String[], IList<Double>[])
    ChartSeriesBase.GetAvailableSize()
    ChartSeriesBase.GetPreviousSeries(ChartSeriesBase)
    ChartSeriesBase.GetSideBySideInfo(ChartSeriesBase)
    ChartSeriesBase.GetSpacing(DependencyObject)
    ChartSeriesBase.GetXValues()
    ChartSeriesBase.InitialDelayTimer
    ChartSeriesBase.Interior
    ChartSeriesBase.InteriorProperty
    ChartSeriesBase.Invalidate()
    ChartSeriesBase.IsAreaTypeSeries
    ChartSeriesBase.IsBitmapSeries
    ChartSeriesBase.IsColorPathSeries
    ChartSeriesBase.IsIndexed
    ChartSeriesBase.IsLinear
    ChartSeriesBase.IsSeriesVisible
    ChartSeriesBase.IsSeriesVisibleProperty
    ChartSeriesBase.IsSortData
    ChartSeriesBase.IsSortDataProperty
    ChartSeriesBase.IsStacked
    ChartSeriesBase.IsTooltipAvailable(Canvas)
    ChartSeriesBase.ItemsSource
    ChartSeriesBase.ItemsSourceProperty
    ChartSeriesBase.Label
    ChartSeriesBase.LabelProperty
    ChartSeriesBase.LegendIcon
    ChartSeriesBase.LegendIconProperty
    ChartSeriesBase.LegendIconTemplate
    ChartSeriesBase.LegendIconTemplateProperty
    ChartSeriesBase.ListenPropertyChange
    ChartSeriesBase.ListenPropertyChangeProperty
    ChartSeriesBase.OnDataSourceChanged(DependencyPropertyChangedEventArgs)
    ChartSeriesBase.OnSeriesMouseDown(Object, Point)
    ChartSeriesBase.OnSeriesMouseUp(Object, Point)
    ChartSeriesBase.Palette
    ChartSeriesBase.PaletteProperty
    ChartSeriesBase.Position(Point, ChartTooltip)
    ChartSeriesBase.PropertyChanged
    ChartSeriesBase.ResumeNotification()
    ChartSeriesBase.SegmentColorPath
    ChartSeriesBase.SegmentColorPathProperty
    ChartSeriesBase.Segments
    ChartSeriesBase.SelectedIndexChanged(Int32, Int32)
    ChartSeriesBase.SelectedSegment
    ChartSeriesBase.SelectedSegments
    ChartSeriesBase.SelectedSegmentsIndexes
    ChartSeriesBase.SeriesSelectionBrush
    ChartSeriesBase.SeriesSelectionBrushProperty
    ChartSeriesBase.SetDoubleAnimation(ChartTooltip)
    ChartSeriesBase.SetIndividualDataTablePoint(Int32, Object, Boolean)
    ChartSeriesBase.SetIndividualPoint(Int32, Object, Boolean)
    ChartSeriesBase.SetSpacing(DependencyObject, Double)
    ChartSeriesBase.SetTooltipDuration()
    ChartSeriesBase.ShowEmptyPoints
    ChartSeriesBase.ShowEmptyPointsProperty
    ChartSeriesBase.ShowTooltip
    ChartSeriesBase.ShowTooltipProperty
    ChartSeriesBase.SortBy
    ChartSeriesBase.SortByProperty
    ChartSeriesBase.SortDirection
    ChartSeriesBase.SortDirectionProperty
    ChartSeriesBase.SpacingProperty
    ChartSeriesBase.SuspendNotification()
    ChartSeriesBase.Timer
    ChartSeriesBase.TooltipTemplate
    ChartSeriesBase.TooltipTemplateProperty
    ChartSeriesBase.TrackBallLabelTemplate
    ChartSeriesBase.TrackBallLabelTemplateProperty
    ChartSeriesBase.UpdateArea()
    ChartSeriesBase.UpdateSegments(Int32, NotifyCollectionChangedAction)
    ChartSeriesBase.VisibilityOnLegend
    ChartSeriesBase.VisibilityOnLegendProperty
    ChartSeriesBase.XBindingPath
    ChartSeriesBase.XBindingPathProperty
    ChartSeriesBase.YPaths
    XyDataSeries.GeneratePoints()
    XyDataSeries.OnBindingPathChanged(DependencyPropertyChangedEventArgs)
    XyDataSeries.OnDataSourceChanged(IEnumerable, IEnumerable)
    XyDataSeries.YBindingPath
    XyDataSeries.YBindingPathProperty
    XyDataSeries.YValues
    XySegmentDraggingBase.DragCancelKeyModifiers
    XySegmentDraggingBase.DragCancelKeyModifiersProperty
    XySegmentDraggingBase.DragDelta
    XySegmentDraggingBase.DragEnd
    XySegmentDraggingBase.draggedValue
    XySegmentDraggingBase.DraggedValue
    XySegmentDraggingBase.DraggedXValue
    XySegmentDraggingBase.DragInfo
    XySegmentDraggingBase.DragSpliter
    XySegmentDraggingBase.DragStart
    XySegmentDraggingBase.DragTooltipStyle
    XySegmentDraggingBase.DragTooltipStyleProperty
    XySegmentDraggingBase.DragTooltipTemplate
    XySegmentDraggingBase.DragTooltipTemplateProperty
    XySegmentDraggingBase.EllipseAnimation
    XySegmentDraggingBase.EnableDragTooltip
    XySegmentDraggingBase.EnableDragTooltipProperty
    XySegmentDraggingBase.EnableSegmentDragging
    XySegmentDraggingBase.EnableSegmentDraggingProperty
    XySegmentDraggingBase.OnChartDragExited(Point, Object)
    XySegmentDraggingBase.OnMouseEnter(MouseEventArgs)
    XySegmentDraggingBase.OnMouseLeave(MouseEventArgs)
    XySegmentDraggingBase.OnMouseLeftButtonDown(MouseButtonEventArgs)
    XySegmentDraggingBase.OnMouseLeftButtonUp(MouseButtonEventArgs)
    XySegmentDraggingBase.OnMouseMove(MouseEventArgs)
    XySegmentDraggingBase.PreviewDragEnd
    XySegmentDraggingBase.RaiseDragDelta(DragDelta)
    XySegmentDraggingBase.RaiseDragEnd(ChartDragEndEventArgs)
    XySegmentDraggingBase.RaiseDragEnter(XySegmentEnterEventArgs)
    XySegmentDraggingBase.RaiseDragStart(ChartDragStartEventArgs)
    XySegmentDraggingBase.RaisePreviewEnd(XyPreviewEndEventArgs)
    XySegmentDraggingBase.ResetDragSpliter()
    XySegmentDraggingBase.RoundToDecimal
    XySegmentDraggingBase.RoundToDecimalProperty
    XySegmentDraggingBase.SegmentEnter
    XySegmentDraggingBase.SegmentIndex
    XySegmentDraggingBase.SnapToPoint
    XySegmentDraggingBase.SnapToPointProperty
    XySegmentDraggingBase.Tooltip
    XySegmentDraggingBase.UpdateSource
    XySegmentDraggingBase.UpdateSourceProperty
    XySegmentDraggingBase.UpdateUnderLayingModel(String, Int32, Object)
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.SfChart.WPF.dll
    Syntax
    public class ColumnSeries : XySegmentDraggingBase, ICloneable, ISupportAxes2D, ISupportAxes, ISegmentSelectable, ISegmentSpacing
    Examples
          <syncfusion:ColumnSeries ItemsSource="{Binding Data}" XBindingPath="Year" YBindingPath="Value">
          </syncfusion:ColumnSeries>
          ColumnSeries series1 = new ColumnSeries();
          series1.ItemsSource = viewmodel.Data;
          series1.XBindingPath = "Year";
          series1.YBindingPath = "Value";
          chart.Series.Add(series1);

    Constructors

    ColumnSeries()

    Declaration
    public ColumnSeries()

    Fields

    CustomTemplateProperty

    The DependencyProperty for CustomTemplate property.

    Declaration
    public static readonly DependencyProperty CustomTemplateProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SegmentSelectionBrushProperty

    The DependencyProperty for SegmentSelectionBrush property.

    Declaration
    public static readonly DependencyProperty SegmentSelectionBrushProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SegmentSpacingProperty

    The DependencyProperty for SegmentSpacing property.

    Declaration
    public static readonly DependencyProperty SegmentSpacingProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectedIndexProperty

    The DependencyProperty for SelectedIndex property.

    Declaration
    public static readonly DependencyProperty SelectedIndexProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    CustomTemplate

    Gets or sets the custom template for this series.

    Declaration
    public DataTemplate CustomTemplate { get; set; }
    Property Value
    Type Description
    System.Windows.DataTemplate

    System.Windows.DataTemplate

    Examples

    This example, we are using ScatterSeries.

        <syncfusion:ScatterSeries ItemsSource="{Binding Demands}" XBindingPath="Demand" YBindingPath="Year2010" 
                       ScatterHeight="40" ScatterWidth="40">
           <syncfusion:ScatterSeries.CustomTemplate>
                <DataTemplate>
                    <Canvas>
                       <Path Data="M20.125,32l0.5,12.375L10.3125,12.375L10.3125,0.5L29.9375,0.5L29.9375,12.375L39.75,12.375Z" 
                        Stretch="Fill" Fill="{Binding Interior}" Height="{Binding ScatterHeight}" Width="{Binding ScatterWidth}" 
                        Canvas.Left="{Binding RectX}" Canvas.Top="{Binding RectY}"/>
                    </Canvas>
                </DataTemplate>
            </syncfusion:ScatterSeries.CustomTemplate>
        </syncfusion:ScatterSeries>

    IsSideBySide

    Gets a value indicating whether this series is placed side by side.

    Declaration
    protected override bool IsSideBySide { get; }
    Property Value
    Type Description
    System.Boolean

    It returns true, if the series is placed side by side [cluster mode].

    Overrides
    ChartSeriesBase.IsSideBySide

    SegmentSelectionBrush

    Gets or sets the interior (brush) for the selected segment(s).

    Declaration
    public Brush SegmentSelectionBrush { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The System.Windows.Media.Brush value.

    SegmentSpacing

    Gets or sets the spacing between the segments across the series in cluster mode.

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

    The value ranges from 0 to 1.

    SelectedIndex

    Gets or sets the index of the selected segment.

    Declaration
    public int SelectedIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    Int value represents the index of the data point(or segment) to be selected and its default value is -1.

    Methods

    CalculateSegmentSpacing(Double, Double, Double)

    Method used to calculate the segment spacing.

    Declaration
    protected double CalculateSegmentSpacing(double spacing, double Right, double Left)
    Parameters
    Type Name Description
    System.Double spacing

    Spacing

    System.Double Right

    Right

    System.Double Left

    Left

    Returns
    Type
    System.Double

    CloneSeries(DependencyObject)

    Returns the instance of ColumnSeries series.

    Declaration
    protected override DependencyObject CloneSeries(DependencyObject obj)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    object

    Returns
    Type
    System.Windows.DependencyObject
    Overrides
    XyDataSeries.CloneSeries(DependencyObject)

    CreateSegment()

    Creates an instance of series segment.

    Declaration
    protected override ChartSegment CreateSegment()
    Returns
    Type Description
    ChartSegment

    Returns the instance of corresponding series segment.

    Overrides
    ChartSeries.CreateSegment()
    Remarks

    This customization is not supported for fast type series and technical indicators.

    Examples

    This sample shows how to call the CreateSegment() method to customize the line series segments.

    public class LineSeriesExt : LineSeries
    {​ 
        protected override ChartSegment CreateSegment()
        {​
            return new LineSegmentExt();
        }​
    }​
    
    public class LineSegmentExt : LineSegment
    {​
        public override UIElement CreateVisual(Size size)
        {​
            // Write your customization code here.
        }​
    
        public override void Update(IChartTransformer transformer)
        {​
            // Write your customization code here.
        }​
    }

    CreateSegments()

    Creates the segments of ColumnSeries.

    Declaration
    public override void CreateSegments()
    Overrides
    AdornmentSeries.CreateSegments()

    OnChartDragDelta(Point, Object)

    Called when dragging series.

    Declaration
    protected override void OnChartDragDelta(Point mousePos, object originalSource)
    Parameters
    Type Name Description
    System.Windows.Point mousePos

    mouse position

    System.Object originalSource

    original source

    Overrides
    XySegmentDraggingBase.OnChartDragDelta(Point, Object)

    OnChartDragEnd(Point, Object)

    Called when dragging end.

    Declaration
    protected override void OnChartDragEnd(Point mousePos, object originalSource)
    Parameters
    Type Name Description
    System.Windows.Point mousePos

    mouse position

    System.Object originalSource

    original source

    Overrides
    XySegmentDraggingBase.OnChartDragEnd(Point, Object)

    OnChartDragEntered(Point, Object)

    Called when dragging entered.

    Declaration
    protected override void OnChartDragEntered(Point mousePos, object originalSource)
    Parameters
    Type Name Description
    System.Windows.Point mousePos

    mouse position

    System.Object originalSource

    original source

    Overrides
    XySegmentDraggingBase.OnChartDragEntered(Point, Object)

    OnChartDragStart(Point, Object)

    Called when dragging started.

    Declaration
    protected override void OnChartDragStart(Point mousePos, object originalSource)
    Parameters
    Type Name Description
    System.Windows.Point mousePos

    mouse position

    System.Object originalSource

    original source

    Overrides
    XySegmentDraggingBase.OnChartDragStart(Point, Object)

    ResetDraggingElements(String, Boolean)

    Resets the dragging elements.

    Declaration
    protected override void ResetDraggingElements(string reason, bool dragEndEvent)
    Parameters
    Type Name Description
    System.String reason

    The reason.

    System.Boolean dragEndEvent

    if set to true, DragEndEvent will raise .

    Overrides
    XySegmentDraggingBase.ResetDraggingElements(String, Boolean)

    Explicit Interface Implementations

    ISegmentSpacing.CalculateSegmentSpacing(Double, Double, Double)

    Declaration
    double ISegmentSpacing.CalculateSegmentSpacing(double spacing, double Right, double Left)
    Parameters
    Type Name Description
    System.Double spacing
    System.Double Right
    System.Double Left
    Returns
    Type
    System.Double

    Implements

    ICloneable
    ISupportAxes2D
    ISupportAxes
    ISegmentSelectable
    ISegmentSpacing

    See Also

    ColumnSegment
    BarSeries
    RangeColumnSeries
    StackingColumnSeries
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved