Class ChartSegment
An abstract base class for all type of chart segments.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.SfChart.UWP.dll
Syntax
public abstract class ChartSegment : DependencyObject, INotifyPropertyChanged
Remarks
You can create a custom chart segment by inheriting from ChartSegment. You can also customize the appearance of a chart segment, by specifying values for Interior,Stroke and StrokeThickness properties.
Constructors
ChartSegment()
Declaration
protected ChartSegment()
Fields
InteriorProperty
The DependencyProperty for Interior property.
Declaration
public static readonly DependencyProperty InteriorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
StrokeDashArrayProperty
The DependencyProperty for StrokeDashArray property.
Declaration
public static readonly DependencyProperty StrokeDashArrayProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
StrokeProperty
The DependencyProperty for Stroke property.
Declaration
public static readonly DependencyProperty StrokeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
StrokeThicknessProperty
The DependencyProperty for StrokeThickness property.
Declaration
public static readonly DependencyProperty StrokeThicknessProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Properties
Interior
Gets or sets the brush to paint the interior of the segment.
Declaration
public Brush Interior { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Media.Brush | The Windows.UI.Xaml.Media.Brush value. |
Remarks
By default,the interior value for a chart segment will be calculated and set automatically based on the Palette set.
IsEmptySegmentInterior
Gets or sets IsEmptySegmentinterior property
Declaration
protected bool IsEmptySegmentInterior { get; }
Property Value
Type |
---|
System.Boolean |
Item
Gets or sets the data object that this segment belongs to.
Declaration
public object Item { get; set; }
Property Value
Type |
---|
System.Object |
PolygonPoints
Gets or sets the point collection.
Declaration
public PointCollection PolygonPoints { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.PointCollection |
Series
Gets the value of underlying series of a chart segment.
Declaration
public ChartSeriesBase Series { get; protected set; }
Property Value
Type |
---|
ChartSeriesBase |
Stroke
Gets or sets the stroke value of the segment.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Media.Brush | The Windows.UI.Xaml.Media.Brush value. |
Remarks
By default, this property inherits its value from series Stroke property.
StrokeDashArray
Gets or sets the stroke dash array for the segment shape.
Declaration
public DoubleCollection StrokeDashArray { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Media.DoubleCollection | Windows.UI.Xaml.Media.DoubleCollection. |
StrokeThickness
Gets or sets the stroke thickness value of the segment.
Declaration
public double StrokeThickness { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
By default, this property inherits its value from series StrokeThickness property.
XRange
Gets or sets the x-value range for the segment.
Declaration
public DoubleRange XRange { get; set; }
Property Value
Type |
---|
DoubleRange |
YRange
Gets or sets the y-value range for the segment.
Declaration
public DoubleRange YRange { get; set; }
Property Value
Type |
---|
DoubleRange |
Methods
AlignHiLoSegment(Double, Double, Double, Double)
This method is used to change High and Low values, When the High value lesser than Open value or Low value greater than Close value.
Declaration
protected double[] AlignHiLoSegment(double openValues, double closeValues, double highValues, double lowValues)
Parameters
Type | Name | Description |
---|---|---|
System.Double | openValues | |
System.Double | closeValues | |
System.Double | highValues | |
System.Double | lowValues |
Returns
Type |
---|
System.Double[] |
CreateVisual(Size)
Used for creating UIElement for rendering this segment. This method is not intended to be called explicitly outside the Chart but it can be overriden by any derived class.
Declaration
public abstract UIElement CreateVisual(Size size)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | size | Size of the panel |
Returns
Type | Description |
---|---|
Windows.UI.Xaml.UIElement | returns UIElement |
GetRenderedVisual()
Gets the UIElement used for rendering this segment.
Declaration
public abstract UIElement GetRenderedVisual()
Returns
Type | Description |
---|---|
Windows.UI.Xaml.UIElement | returns UIElement |
OnPropertyChanged(String)
Called when Property changed
Declaration
protected virtual void OnPropertyChanged(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
OnSizeChanged(Size)
Called whenever the segment's size changed. This method is not intended to be called explicitly outside the Chart but it can be overriden by any derived class.
Declaration
public abstract void OnSizeChanged(Size size)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | size | Size of the panel. |
SetData(ChartPoint, ChartPoint, ChartPoint, ChartPoint)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(ChartPoint point1, ChartPoint point2, ChartPoint point3, ChartPoint point4)
Parameters
Type | Name | Description |
---|---|---|
ChartPoint | point1 | |
ChartPoint | point2 | |
ChartPoint | point3 | |
ChartPoint | point4 |
SetData(ChartPoint, ChartPoint, ChartPoint, ChartPoint, ChartPoint, ChartPoint, Boolean)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(ChartPoint hipoint, ChartPoint lopoint, ChartPoint sopoint, ChartPoint eopoint, ChartPoint scpoint, ChartPoint ecpoint, bool isBull)
Parameters
Type | Name | Description |
---|---|---|
ChartPoint | hipoint | |
ChartPoint | lopoint | |
ChartPoint | sopoint | |
ChartPoint | eopoint | |
ChartPoint | scpoint | |
ChartPoint | ecpoint | |
System.Boolean | isBull |
SetData(ChartPoint, ChartPoint, ChartPoint, ChartPoint, Boolean)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(ChartPoint BottomLeft, ChartPoint RightTop, ChartPoint hipoint, ChartPoint loPoint, bool isBull)
Parameters
Type | Name | Description |
---|---|---|
ChartPoint | BottomLeft | |
ChartPoint | RightTop | |
ChartPoint | hipoint | |
ChartPoint | loPoint | |
System.Boolean | isBull |
SetData(IList<Double>, IList<Double>)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(IList<double> xVals, IList<double> yVals)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Double> | xVals | Used to specify the segment x values. |
System.Collections.Generic.IList<System.Double> | yVals | Used to specify the segment y values. |
SetData(IList<Double>, IList<Double>, IList<Double>)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(IList<double> xValues, IList<double> yHiValues, IList<double> yLowValues)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Double> | xValues | |
System.Collections.Generic.IList<System.Double> | yHiValues | |
System.Collections.Generic.IList<System.Double> | yLowValues |
SetData(IList<Double>, IList<Double>, IList<Double>, IList<Double>)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(IList<double> x1Values, IList<double> y1Values, IList<double> x2Values, IList<double> y2Values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Double> | x1Values | Used to specify the segment x1 values |
System.Collections.Generic.IList<System.Double> | y1Values | Used to specify the segment y1 values |
System.Collections.Generic.IList<System.Double> | x2Values | Used to specify the segment x2 values |
System.Collections.Generic.IList<System.Double> | y2Values | Used to specify the segment y2 values |
SetData(IList<Double>, IList<Double>, IList<Double>, IList<Double>, IList<Double>)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(IList<double> xValues, IList<double> yHiValues, IList<double> yLowValues, IList<double> yOpenValues, IList<double> yCloseValues)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Double> | xValues | |
System.Collections.Generic.IList<System.Double> | yHiValues | |
System.Collections.Generic.IList<System.Double> | yLowValues | |
System.Collections.Generic.IList<System.Double> | yOpenValues | |
System.Collections.Generic.IList<System.Double> | yCloseValues |
SetData(IList<Double>, IList<Double>, Brush)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(IList<double> xVals, IList<double> yVals, Brush strokeBrush)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Double> | xVals | |
System.Collections.Generic.IList<System.Double> | yVals | |
Windows.UI.Xaml.Media.Brush | strokeBrush |
SetData(IList<Double>, IList<Double>, Brush, Int32)
Sets the values for Technical indicator segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(IList<double> xVals, IList<double> yVals, Brush strokeBrush, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Double> | xVals | Used to specify the segment x-values |
System.Collections.Generic.IList<System.Double> | yVals | Used to specify the segment y-values |
Windows.UI.Xaml.Media.Brush | strokeBrush | Used to specify the segment stroke brush |
System.Int32 | length | Used to specify the segment range |
SetData(List<ChartPoint>)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(List<ChartPoint> AreaPoints)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<ChartPoint> | AreaPoints |
SetData(List<Double>, IList<Double>, Double, Double)
Sets the values for this segment. This method is not intended to be called explicitly outside the 3DChart but it can be overridden by any derived class.
Declaration
public virtual void SetData(List<double> xValues, IList<double> yValues, double startDepth, double endDepth)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Double> | xValues | |
System.Collections.Generic.IList<System.Double> | yValues | |
System.Double | startDepth | |
System.Double | endDepth |
SetData(List<Point>)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(List<Point> AreaPoints)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<Windows.Foundation.Point> | AreaPoints |
SetData(Double[])
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(params double[] Values)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | Values | Used to specify the segment values. |
SetData(Point, Point, Point, Point)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(Point point1, Point point2, Point point3, Point point4)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Point | point1 | |
Windows.Foundation.Point | point2 | |
Windows.Foundation.Point | point3 | |
Windows.Foundation.Point | point4 |
SetData(Point, Point, Point, Point, Boolean)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(Point BottomLeft, Point RightTop, Point hipoint, Point loPoint, bool isBull)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Point | BottomLeft | |
Windows.Foundation.Point | RightTop | |
Windows.Foundation.Point | hipoint | |
Windows.Foundation.Point | loPoint | |
System.Boolean | isBull |
SetData(Point, Point, Point, Point, Point, Point)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(Point leftpoint, Point rightpoint, Point toppoint, Point bottompoint, Point vercappoint, Point horcappoint)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Point | leftpoint | |
Windows.Foundation.Point | rightpoint | |
Windows.Foundation.Point | toppoint | |
Windows.Foundation.Point | bottompoint | |
Windows.Foundation.Point | vercappoint | |
Windows.Foundation.Point | horcappoint |
SetData(Point, Point, Point, Point, Point, Point, Boolean)
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overridden by any derived class.
Declaration
public virtual void SetData(Point hipoint, Point lopoint, Point sopoint, Point eopoint, Point scpoint, Point ecpoint, bool isBull)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Point | hipoint | |
Windows.Foundation.Point | lopoint | |
Windows.Foundation.Point | sopoint | |
Windows.Foundation.Point | eopoint | |
Windows.Foundation.Point | scpoint | |
Windows.Foundation.Point | ecpoint | |
System.Boolean | isBull |
SetVisualBindings(Shape)
Method Implementation for set binding to ChartSegments properties.
Declaration
protected virtual void SetVisualBindings(Shape element)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Shapes.Shape | element | Windows.UI.Xaml.Shapes.Shape element to be bind. |
Update(IChartTransformer)
Updates the segments based on its data point value. This method is not intended to be called explicitly outside the Chart but it can be overriden by any derived class.
Declaration
public abstract void Update(IChartTransformer transformer)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.UI.Xaml.Charts.IChartTransformer | transformer | Reresents the view port of chart control.(refer Syncfusion.UI.Xaml.Charts.IChartTransformer) |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
---|
System.ComponentModel.PropertyChangedEventHandler |