WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class StackingLineSeries

    Show / Hide Table of Contents

    Class StackingLineSeries

    StackingLineSeries is typically preferred in cases of multiple series of type LineSeries. Each series is stacked horizontal one above the other.

    Inheritance
    System.Object
    ChartSeriesBase
    ChartSeries
    AdornmentSeries
    CartesianSeries
    XyDataSeries
    StackingSeriesBase
    StackingLineSeries
    StackingLine100Series
    Implements
    ICloneable
    ISupportAxes2D
    ISupportAxes
    ISegmentSelectable
    Inherited Members
    StackingSeriesBase.GroupingLabelProperty
    StackingSeriesBase.GetCumulativeStackValues(ChartSeriesBase)
    StackingSeriesBase.FindNearestChartPoint(Point, Double, Double, Double)
    StackingSeriesBase.OnDataSourceChanged(IEnumerable, IEnumerable)
    StackingSeriesBase.OnBindingPathChanged(DependencyPropertyChangedEventArgs)
    StackingSeriesBase.GetStackedYValue(Int32)
    StackingSeriesBase.GroupingLabel
    StackingSeriesBase.YRangeStartValues
    StackingSeriesBase.YRangeEndValues
    XyDataSeries.YBindingPathProperty
    XyDataSeries.GeneratePoints()
    XyDataSeries.YBindingPath
    XyDataSeries.YValues
    CartesianSeries.TrendlinesProperty
    CartesianSeries.XAxisProperty
    CartesianSeries.YAxisProperty
    CartesianSeries.IsTransposedProperty
    CartesianSeries.ShowTrackballInfoProperty
    CartesianSeries.OnVisibleRangeChanged(VisibleRangeChangedEventArgs)
    CartesianSeries.OnYAxisChanged(ChartAxis, ChartAxis)
    CartesianSeries.OnXAxisChanged(ChartAxis, ChartAxis)
    CartesianSeries.OnApplyTemplate()
    CartesianSeries.GetDataPoints(Rect)
    CartesianSeries.GetDataPoints(Double, Double, Double, Double)
    CartesianSeries.Trendlines
    CartesianSeries.XRange
    CartesianSeries.YRange
    CartesianSeries.XAxis
    CartesianSeries.YAxis
    CartesianSeries.IsTransposed
    CartesianSeries.ShowTrackballInfo
    CartesianSeries.ISupportAxes.ActualXAxis
    CartesianSeries.ISupportAxes.ActualYAxis
    AdornmentSeries.AdornmentsInfoProperty
    AdornmentSeries.CreateAdornment(AdornmentSeries, Double, Double, Double, Double)
    AdornmentSeries.AddColumnAdornments(Double[])
    AdornmentSeries.AddAdornmentAtXY(Double, Double, Int32)
    AdornmentSeries.AddAreaAdornments(IList<Double>[])
    AdornmentSeries.ClearUnUsedAdornments(Int32)
    AdornmentSeries.AdornmentsInfo
    AdornmentSeries.AdornmentLabelCreated
    ChartSeries.StrokeProperty
    ChartSeries.StrokeThicknessProperty
    ChartSeries.GetDataPointIndex(Double, Double)
    ChartSeries.OnCreateAutomationPeer()
    ChartSeries.StrokeThickness
    ChartSeries.Area
    ChartSeries.Stroke
    ChartSeriesBase.SpacingProperty
    ChartSeriesBase.TooltipTemplateProperty
    ChartSeriesBase.ShowTooltipProperty
    ChartSeriesBase.ListenPropertyChangeProperty
    ChartSeriesBase.IsSeriesVisibleProperty
    ChartSeriesBase.XBindingPathProperty
    ChartSeriesBase.SortByProperty
    ChartSeriesBase.SortDirectionProperty
    ChartSeriesBase.IsSortDataProperty
    ChartSeriesBase.PaletteProperty
    ChartSeriesBase.ItemsSourceProperty
    ChartSeriesBase.TrackBallLabelTemplateProperty
    ChartSeriesBase.InteriorProperty
    ChartSeriesBase.LabelProperty
    ChartSeriesBase.LegendIconProperty
    ChartSeriesBase.LegendIconTemplateProperty
    ChartSeriesBase.VisibilityOnLegendProperty
    ChartSeriesBase.SeriesSelectionBrushProperty
    ChartSeriesBase.ColorModelProperty
    ChartSeriesBase.SegmentColorPathProperty
    ChartSeriesBase.EnableAnimationProperty
    ChartSeriesBase.AnimationDurationProperty
    ChartSeriesBase.EmptyPointValueProperty
    ChartSeriesBase.EmptyPointStyleProperty
    ChartSeriesBase.EmptyPointSymbolTemplateProperty
    ChartSeriesBase.ShowEmptyPointsProperty
    ChartSeriesBase.EmptyPointInteriorProperty
    ChartSeriesBase.Segments
    ChartSeriesBase.Timer
    ChartSeriesBase.InitialDelayTimer
    ChartSeriesBase.ChartTransformer
    ChartSeriesBase.YPaths
    ChartSeriesBase.GetSpacing(DependencyObject)
    ChartSeriesBase.SetSpacing(DependencyObject, Double)
    ChartSeriesBase.CreateEmptyPointSegments(IList<Double>, List<List<Double>>, List<List<Double>>)
    ChartSeriesBase.UpdateSegments(Int32, NotifyCollectionChangedAction)
    ChartSeriesBase.GetAvailableSize()
    ChartSeriesBase.SuspendNotification()
    ChartSeriesBase.ResumeNotification()
    ChartSeriesBase.Invalidate()
    ChartSeriesBase.GetSideBySideInfo(ChartSeriesBase)
    ChartSeriesBase.Clone()
    ChartSeriesBase.OnSeriesMouseUp(Object, Point)
    ChartSeriesBase.OnSeriesMouseDown(Object, Point)
    ChartSeriesBase.SelectedIndexChanged(Int32, Int32)
    ChartSeriesBase.CreateTransformer(Size, Boolean)
    ChartSeriesBase.GetXValues()
    ChartSeriesBase.SetTooltipDuration()
    ChartSeriesBase.IsTooltipAvailable(Canvas)
    ChartSeriesBase.SetDoubleAnimation(ChartTooltip)
    ChartSeriesBase.SetIndividualPoint(Int32, Object, Boolean)
    ChartSeriesBase.SetIndividualDataTablePoint(Int32, Object, Boolean)
    ChartSeriesBase.ClearUnUsedSegments(Int32)
    ChartSeriesBase.OnMouseLeftButtonUp(MouseButtonEventArgs)
    ChartSeriesBase.OnMouseLeftButtonDown(MouseButtonEventArgs)
    ChartSeriesBase.OnMouseLeave(MouseEventArgs)
    ChartSeriesBase.Position(Point, ChartTooltip)
    ChartSeriesBase.UpdateArea()
    ChartSeriesBase.GetPreviousSeries(ChartSeriesBase)
    ChartSeriesBase.GeneratePoints(String[], IList<Double>[])
    ChartSeriesBase.OnDataSourceChanged(DependencyPropertyChangedEventArgs)
    ChartSeriesBase.EmptyPointValue
    ChartSeriesBase.EmptyPointStyle
    ChartSeriesBase.EmptyPointSymbolTemplate
    ChartSeriesBase.ShowEmptyPoints
    ChartSeriesBase.EmptyPointInterior
    ChartSeriesBase.DataCount
    ChartSeriesBase.IsSortData
    ChartSeriesBase.SortDirection
    ChartSeriesBase.SortBy
    ChartSeriesBase.TooltipTemplate
    ChartSeriesBase.ShowTooltip
    ChartSeriesBase.ListenPropertyChange
    ChartSeriesBase.Adornments
    ChartSeriesBase.IsSeriesVisible
    ChartSeriesBase.Palette
    ChartSeriesBase.ItemsSource
    ChartSeriesBase.TrackBallLabelTemplate
    ChartSeriesBase.Interior
    ChartSeriesBase.Label
    ChartSeriesBase.LegendIcon
    ChartSeriesBase.LegendIconTemplate
    ChartSeriesBase.VisibilityOnLegend
    ChartSeriesBase.SeriesSelectionBrush
    ChartSeriesBase.ColorModel
    ChartSeriesBase.XBindingPath
    ChartSeriesBase.SegmentColorPath
    ChartSeriesBase.EnableAnimation
    ChartSeriesBase.AnimationDuration
    ChartSeriesBase.IsSideBySide
    ChartSeriesBase.IsLinear
    ChartSeriesBase.IsAreaTypeSeries
    ChartSeriesBase.IsBitmapSeries
    ChartSeriesBase.IsColorPathSeries
    ChartSeriesBase.IsIndexed
    ChartSeriesBase.ColorValues
    ChartSeriesBase.ActualXValues
    ChartSeriesBase.SelectedSegmentsIndexes
    ChartSeriesBase.SelectedSegments
    ChartSeriesBase.SelectedSegment
    ChartSeriesBase.ActualXAxis
    ChartSeriesBase.ActualYAxis
    ChartSeriesBase.PropertyChanged
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.SfChart.WPF.dll
    Syntax
    public class StackingLineSeries : StackingSeriesBase, ICloneable, ISupportAxes2D, ISupportAxes, ISegmentSelectable
    Examples
          <syncfusion:StackingLineSeries ItemsSource="{Binding Data}" XBindingPath="Year" YBindingPath="Value">
          </syncfusion:StackingLineSeries>
       StackingLineSeries series1 = new StackingLineSeries();
       series1.ItemsSource = viewmodel.Data;
       series1.XBindingPath = "Year";
       series1.YBindingPath = "Value";
       chart.Series.Add(series1);

    Constructors

    StackingLineSeries()

    Declaration
    public StackingLineSeries()

    Fields

    SegmentSelectionBrushProperty

    Identifies the SegmentSelectionBrush dependency property.

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

    The identifier for SegmentSelectionBrush dependency property.

    SelectedIndexProperty

    Identifies the SelectedIndex dependency property.

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

    The identifier for SelectedIndex dependency property.

    StrokeDashArrayProperty

    Identifies the StrokeDashArray dependency property.

    Declaration
    public static readonly DependencyProperty StrokeDashArrayProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for StrokeDashArray dependency property.

    Properties

    IsStacked

    Gets a value indicating whether this series is a stacked series.

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

    true if the series is one of stacked series; otherwise, false. The default value is true.

    Overrides
    ChartSeriesBase.IsStacked

    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.

    SelectedIndex

    Gets or sets the index of the first segment in the current selection or returns negative one (-1) if the selection is empty.

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

    The index of first segment in the current selection. The default value is negative one (-1).

    See Also
    SegmentSelectionBrush

    StrokeDashArray

    Gets or sets the stroke dash array for line to customize the appearance of StackingLineSeries.

    Declaration
    public DoubleCollection StrokeDashArray { get; set; }
    Property Value
    Type Description
    System.Windows.Media.DoubleCollection

    It takes System.Windows.Media.DoubleCollection value and the default value is null.

    Examples
    • MainWindow.xaml
    • MainWindow.cs
        <chart:SfChart>
    
              <chart:SfChart.PrimaryAxis>
                  <chart:NumericalAxis/>
              </chart:SfChart.PrimaryAxis>
    
              <chart:SfChart.SecondaryAxis>
                  <chart:NumericalAxis/>
              </chart:SfChart.SecondaryAxis>
    
              <chart:StackedLineSeries
                  StrokeDashArray="5,3"
                  ItemsSource="{Binding Data}"
                  XBindingPath="XValue"
                  YBindingPath="YValue"/>
    
              <chart:StackedLineSeries
                  StrokeDashArray="5,3"
                  ItemsSource="{Binding Data}"
                  XBindingPath="XValue"
                  YBindingPath="YValue1"/>
        </chart:SfChart>
        SfChart chart = new SfChart();
    
        NumericalAxis primaryAxis = new NumericalAxis();
        NumericalAxis secondaryAxis = new NumericalAxis();
    
        chart.PrimaryAxis = primaryAxis;
        chart.SecondaryAxis = secondaryAxis;
    
        StackedLineSeries series = new StackedLineSeries();
        series.ItemsSource = viewmodel.Data;
        series.XBindingPath = "XValue";
        series.YBindingPath = "YValue";
        chart.Series.Add(series);
    
        StackedLineSeries series1 = new StackedLineSeries();
        series1.ItemsSource = viewmodel.Data;
        series1.XBindingPath = "XValue";
        series1.YBindingPath = "YValue1";
        chart.Series.Add(series1);
    
        DoubleCollection doubleCollection = new DoubleCollection();
        doubleCollection.Add(5);
        doubleCollection.Add(3);
        series.StrokeDashArray = doubleCollection;
        series1.StrokeDashArray = doubleCollection;

    Methods

    CloneSeries(DependencyObject)

    Returns the instance of StackingLineSeries series.

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

    object

    Returns
    Type Description
    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 StackingLineSeries.

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

    OnMouseMove(MouseEventArgs)

    Called when mouse or pointer move to show the tooltip for series.

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    Event Arguments

    Overrides
    ChartSeriesBase.OnMouseMove(MouseEventArgs)

    Implements

    ICloneable
    ISupportAxes2D
    ISupportAxes
    ISegmentSelectable

    See Also

    LineSegment
    StackingAreaSeries
    LineSeries
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved