Class StackingLineSeries
StackingLineSeries is typically preferred in cases of multiple series of type LineSeries. Each series is stacked horizontal one above the other.
Inheritance
Inherited Members
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 |
|
Overrides
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
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
<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>
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 |
---|
System.Windows.DependencyObject |
Overrides
CreateSegment()
Creates an instance of series segment.
Declaration
protected override ChartSegment CreateSegment()
Returns
Type | Description |
---|---|
ChartSegment | Returns the instance of corresponding series segment. |
Overrides
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
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 |