Class ChartSeries
Represents a base class for all series in chart.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.SfChart.WPF.dll
Syntax
public abstract class ChartSeries : ChartSeriesBase, ICloneable
Constructors
ChartSeries()
Declaration
protected ChartSeries()
Fields
StrokeProperty
The DependencyProperty for Stroke property.
Declaration
public static readonly DependencyProperty StrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
StrokeThicknessProperty
The DependencyProperty for StrokeThickness property.
Declaration
public static readonly DependencyProperty StrokeThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
Area
Gets the SfChart instance.
Declaration
public SfChart Area { get; }
Property Value
Type |
---|
SfChart |
Stroke
Gets or sets a brush that specifies the stroke color for chart series to customize its appearance. This is a bindable property.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The System.Windows.Media.Brush value. |
Remarks
Use ChartSeries Color property to change the line color of StackingLineSeries and StackingLine100Series.
StrokeThickness
Gets or sets the value that specifies the stroke thickness of chart series. This is a bindable property.
Declaration
public double StrokeThickness { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
The default value is 2.
Methods
CloneSeries(DependencyObject)
Returns the instance of this 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 abstract ChartSegment CreateSegment()
Returns
Type | Description |
---|---|
ChartSegment | Returns the instance of corresponding series segment. |
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.
}
}
GetDataPointIndex(Double, Double)
This method used to get the SfChart data index at an SfChart co-ordinates
Declaration
public int GetDataPointIndex(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | Used to specify X co-ordinates |
System.Double | y | Used to specify Y co-ordinates |
Returns
Type | Description |
---|---|
System.Int32 | Returns data index of type |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
Declaration
public override void OnApplyTemplate()
Overrides
OnCreateAutomationPeer()
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the WPF infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type | Description |
---|---|
System.Windows.Automation.Peers.AutomationPeer | The type-specific System.Windows.Automation.Peers.AutomationPeer implementation. |