menu

WPF

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

    Show / Hide Table of Contents

    Class FastLineSeries

    Represents a special kind of line series which uses poly lines for rendering chart points. FastLineSeries allows to render a collection with large number of data points.

    Inheritance
    System.Object
    ChartSeriesBase
    ChartSeries
    AdornmentSeries
    CartesianSeries
    XyDataSeries
    FastLineSeries
    Implements
    ICloneable
    ISupportAxes2D
    ISupportAxes
    ISegmentSelectable
    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.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.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.IsSeriesVisible
    ChartSeriesBase.IsSeriesVisibleProperty
    ChartSeriesBase.IsSideBySide
    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.OnMouseLeave(MouseEventArgs)
    ChartSeriesBase.OnMouseLeftButtonDown(MouseButtonEventArgs)
    ChartSeriesBase.OnMouseLeftButtonUp(MouseButtonEventArgs)
    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.SelectedSegment
    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.YBindingPath
    XyDataSeries.YBindingPathProperty
    XyDataSeries.YValues
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.SfChart.WPF.dll
    Syntax
    public class FastLineSeries : XyDataSeries, ICloneable, ISupportAxes2D, ISupportAxes, ISegmentSelectable
    Remarks

    FastLineSeries renders large quantity of data in fraction of milliseconds using poly lines. FastLineBitmapSeries also can be used for better performance which uses WriteableBitmap to render the series.

    Examples
    • MainWindow.xaml
    • MainWindow.cs
    • ViewModel.cs
        <chart:SfChart>
    
              <chart:SfChart.PrimaryAxis>
                  <chart:NumericalAxis/>
              </chart:SfChart.PrimaryAxis>
    
              <chart:SfChart.SecondaryAxis>
                  <chart:NumericalAxis/>
              </chart:SfChart.SecondaryAxis>
    
              <chart:FastLineSeries
                  ItemsSource="{Binding Data}"
                  XBindingPath="XValue"
                  YBindingPath="YValue"/>
    
        </chart:SfChart>
        SfChart chart = new SfChart();
    
        NumericalAxis primaryAxis = new NumericalAxis();
        NumericalAxis secondaryAxis = new NumericalAxis();
    
        chart.PrimaryAxis = primaryAxis;
        chart.SecondaryAxis = secondaryAxis;
    
        FastLineSeries series = new FastLineSeries();
        series.ItemsSource = viewmodel.Data;
        series.XBindingPath = "XValue";
        series.YBindingPath = "YValue";
        chart.Series.Add(series);
    public ObservableCollection<Model> Data { get; set; }
    
    public ViewModel()
    {
       Data = new ObservableCollection<Model>();
       Data.Add(new Model() { XValue = 10, YValue = 100 });
       Data.Add(new Model() { XValue = 20, YValue = 150 });
       Data.Add(new Model() { XValue = 30, YValue = 110 });
       Data.Add(new Model() { XValue = 40, YValue = 230 });
    }

    Constructors

    FastLineSeries()

    Declaration
    public FastLineSeries()

    Fields

    CustomTemplateProperty

    Identifies the CustomTemplate dependency property.

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

    The identifier for CustomTemplate dependency property.

    SegmentSelectionBrushProperty

    The DependencyProperty for SegmentSelectionBrush property.

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

    SelectedIndexProperty

    The DependencyProperty for SelectedIndex property.

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

    StrokeDashArrayProperty

    The DependencyProperty for StrokeDashArray property.

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

    StrokeDashCapProperty

    The DependencyProperty for StrokeDashCap property.

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

    StrokeDashOffsetProperty

    The DependencyProperty for StrokeDashOffset property.

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

    StrokeLineJoinProperty

    The DependencyProperty for StrokeLineJoin property.

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

    Properties

    CustomTemplate

    Gets or sets the DataTemplate used to customize the poly line appearence.

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

    The template that specifies poly line inside canvas. The default is null.

    Remarks

    This data template should be loaded with poly line inside canvas where poly line appearence properties like stroke dasharray, stroke dashoffset, stroke dashcap, stroke linejoin can be customized.

    Examples
    • MainWindow.xaml
    • MainWindow.cs
        <chart:SfChart>
              <chart:SfChart.Resources>
                <DataTemplate x:Key="seriesTemplate">
                    <Canvas>
                        <Polyline Points="{Binding Points}" StrokeDashArray="3,3" StrokeThickness="3" Stroke="Yellow"/>
                    </Canvas>
                </DataTemplate>
              </chart:SfChart.Resources>
    
              <chart:SfChart.PrimaryAxis>
                  <chart:NumericalAxis/>
              </chart:SfChart.PrimaryAxis>
    
              <chart:SfChart.SecondaryAxis>
                  <chart:NumericalAxis/>
              </chart:SfChart.SecondaryAxis>
    
              <chart:FastLineSeries
                  CustomTemplate="{StaticResource seriesTemplate}"
                  ItemsSource="{Binding Data}"
                  XBindingPath="XValue"
                  YBindingPath="YValue"/>
    
        </chart:SfChart>
        SfChart chart = new SfChart();
    
        NumericalAxis primaryAxis = new NumericalAxis();
        NumericalAxis secondaryAxis = new NumericalAxis();
    
        chart.PrimaryAxis = primaryAxis;
        chart.SecondaryAxis = secondaryAxis;
    
        FastLineSeries series = new FastLineSeries();
        series.CustomTemplate = chart.Resources["seriesTemplate"] as DataTemplate;
        series.ItemsSource = viewmodel.Data;
        series.XBindingPath = "XValue";
        series.YBindingPath = "YValue";
        chart.Series.Add(series);

    IsLinear

    Gets the value which confirms whether this series in linearity.

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

    Returns the bool value.

    Overrides
    ChartSeriesBase.IsLinear
    Remarks

    Returns true if its linear, otherwise it returns false.

    SegmentSelectionBrush

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

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

    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.

    See Also
    SegmentSelectionBrush

    SelectedSegments

    Gets the selected segments in this series, when we enable the multiple selection.

    Declaration
    protected override List<ChartSegment> SelectedSegments { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<ChartSegment>

    It returns the list of ChartSegment.

    Overrides
    ChartSeriesBase.SelectedSegments

    StrokeDashArray

    Gets or sets the stroke dash array forline to customize the appearance of FastLineSeries. This is a bindable property.

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

    It takes the System.Windows.Media.DoubleCollection value.

    StrokeDashCap

    Gets or sets the stroke dash cap for the stroke.

    Declaration
    public PenLineCap StrokeDashCap { get; set; }
    Property Value
    Type Description
    System.Windows.Media.PenLineCap

    It takes the System.Windows.Media.PenLineCap value.

    StrokeDashOffset

    Gets or sets the stroke dash offset for line to customize the appearance of FastLineSeries. This is a bindable property.

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

    Its takes the double value.

    StrokeLineJoin

    Gets or sets the line join for the stroke of the line.

    Declaration
    public PenLineJoin StrokeLineJoin { get; set; }
    Property Value
    Type Description
    System.Windows.Media.PenLineJoin

    It takes the System.Windows.Media.PenLineJoin value.

    Methods

    CloneSeries(DependencyObject)

    Returns the instance of FastBarBitmapSeries 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)

    CreateEmptyPointSegments(IList<Double>, out List<List<Double>>, out List<List<Double>>)

    MEthod used to create empty point segments.

    Declaration
    public override void CreateEmptyPointSegments(IList<double> YValues, out List<List<double>> yValList, out List<List<double>> xValList)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<System.Double> YValues

    Yvalues

    System.Collections.Generic.List<System.Collections.Generic.List<System.Double>> yValList

    YValues list

    System.Collections.Generic.List<System.Collections.Generic.List<System.Double>> xValList

    XValues list

    Overrides
    ChartSeriesBase.CreateEmptyPointSegments(IList<Double>, out List<List<Double>>, out List<List<Double>>)

    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()

    Used to create the segment of FastLineSeries.

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

    OnDataSourceChanged(IEnumerable, IEnumerable)

    Called when ItemsSource property changed.

    Declaration
    protected override void OnDataSourceChanged(IEnumerable oldValue, IEnumerable newValue)
    Parameters
    Type Name Description
    System.Collections.IEnumerable oldValue

    ItemsSource old value.

    System.Collections.IEnumerable newValue

    ItemsSource new value

    Overrides
    XyDataSeries.OnDataSourceChanged(IEnumerable, IEnumerable)
    See Also
    XBindingPath
    YBindingPath

    OnMouseMove(MouseEventArgs)

    Invoked when pointer or mouse move on chart area.

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

    Events args thats contains the event data.

    Overrides
    ChartSeriesBase.OnMouseMove(MouseEventArgs)

    OnVisibleRangeChanged(VisibleRangeChangedEventArgs)

    Invoked when VisibleRange property changed.

    Declaration
    protected override void OnVisibleRangeChanged(VisibleRangeChangedEventArgs e)
    Parameters
    Type Name Description
    VisibleRangeChangedEventArgs e

    VisibleRangeChangedEventArgs that contains the event data.

    Overrides
    CartesianSeries.OnVisibleRangeChanged(VisibleRangeChangedEventArgs)

    SelectedIndexChanged(Int32, Int32)

    Method used to trigger SelectionChanged event to SelectedIndex segment.

    Declaration
    protected override void SelectedIndexChanged(int newIndex, int oldIndex)
    Parameters
    Type Name Description
    System.Int32 newIndex

    new index

    System.Int32 oldIndex

    old index

    Overrides
    ChartSeriesBase.SelectedIndexChanged(Int32, Int32)

    Implements

    ICloneable
    ISupportAxes2D
    ISupportAxes
    ISegmentSelectable

    See Also

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