Class SfSparklineBase
Represents the sparkline series
Inheritance
Namespace: Syncfusion.SfSparkline.Android
Assembly: Syncfusion.SfSparkline.Android.dll
Syntax
public abstract class SfSparklineBase : View
Constructors
SfSparklineBase(Context)
Initializes a new instance of the SfSparklineBase class.
Declaration
public SfSparklineBase(Context context)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | To get context |
SfSparklineBase(Context, IAttributeSet)
Initializes a new instance of the SfSparklineBase class.
Declaration
public SfSparklineBase(Context context, IAttributeSet attrs)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | To get context |
Android.Util.IAttributeSet | attrs | To get attribute |
Fields
availableHeight
Internal variables
Declaration
protected double availableHeight
Field Value
Type |
---|
System.Double |
availableWidth
Internal variables
Declaration
protected double availableWidth
Field Value
Type |
---|
System.Double |
deltaX
Internal variables
Declaration
protected double deltaX
Field Value
Type |
---|
System.Double |
deltaY
Internal variables
Declaration
protected double deltaY
Field Value
Type |
---|
System.Double |
diffX
Internal variables
Declaration
protected double diffX
Field Value
Type |
---|
System.Double |
maxXValue
Internal variables
Declaration
protected double maxXValue
Field Value
Type |
---|
System.Double |
maxYValue
Internal variables
Declaration
protected double maxYValue
Field Value
Type |
---|
System.Double |
minXValue
Internal variables
Declaration
protected double minXValue
Field Value
Type |
---|
System.Double |
minYValue
Internal variables
Declaration
protected double minYValue
Field Value
Type |
---|
System.Double |
Properties
Axis
Gets or sets axis to the sparklines. It is used to enable/disable the axis and customize its appearance.
Declaration
public SparklineAxis Axis { get; set; }
Property Value
Type | Description |
---|---|
SparklineAxis | The axis. |
BottomPadding
Gets or sets Padding on the bottom side to the sparkline.
Declaration
public float BottomPadding { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The BottomPadding. |
EmptyPointValue
Gets or sets empty point value. It can be average, zero or none.
Declaration
public EmptyPointValues EmptyPointValue { get; set; }
Property Value
Type | Description |
---|---|
EmptyPointValues | The empty point value. |
FirstPointColor
Gets or sets color to highlight the first point.
Declaration
public Color FirstPointColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The first color of the point. |
HighPointColor
Gets or sets color to highlight the highest point.
Declaration
public Color HighPointColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the high point. |
ItemsSource
Gets or sets the data source for sparkline.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerable | The items source. |
LastPointColor
Gets or sets color to highlight the last point.
Declaration
public Color LastPointColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The last color of the point. |
LeftPadding
Gets or sets Padding on the left side to the sparkline.
Declaration
public float LeftPadding { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The LeftPadding. |
LowPointColor
Gets or sets color to highlight the lowest point.
Declaration
public Color LowPointColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the low point. |
MaximumYValue
Gets or sets maximum Y-Axis value
Declaration
public double MaximumYValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The maximum YValue. |
MinimumYValue
Gets or sets minimum Y-axis value
Declaration
public double MinimumYValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The minimum YValue. |
NegativePointsColor
Gets or sets color to highlight the negative points.
Declaration
public Color NegativePointsColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the negative points. |
RangeBandColor
Gets or sets color of range band.
Declaration
public Color RangeBandColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the range band. |
RangeBandEnd
Gets or sets end value of range band in Y axis.
Declaration
public double RangeBandEnd { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The range band end. |
RangeBandStart
Gets or sets start value of range band in Y axis.
Declaration
public double RangeBandStart { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The range band start. |
RightPadding
Gets or sets Padding on the right side to the sparkline.
Declaration
public float RightPadding { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The RightPadding. |
StrokeColor
Gets or sets stroke color of the sparkline.
Declaration
public Color StrokeColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the stroke. |
StrokeWidth
Gets or sets stroke width of the sparkline.
Declaration
public float StrokeWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The width of the stroke. |
TopPadding
Gets or sets Padding on the top side to the sparkline.
Declaration
public float TopPadding { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The TopPadding. |
YBindingPath
Gets or sets the property path to retrieve Y data from ItemsSource.
Declaration
public string YBindingPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The YBinding path. |
Methods
GeneratePoints(String)
Generate the points from the items source
Declaration
protected virtual void GeneratePoints(string xPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | xPath | To get xPath |
OnDraw(Canvas)
To draw the segments
Declaration
protected override void OnDraw(Canvas canvas)
Parameters
Type | Name | Description |
---|---|---|
Android.Graphics.Canvas | canvas | To get canvas |
OnItemsSourceChanged(Object, Object)
Refresh the series when the ItemsSource is changed
Declaration
protected void OnItemsSourceChanged(object oldValue, object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Object | oldValue | To get oldValue |
System.Object | newValue | To get newValue |
OnItemsSourceCollectionChanged(Object, NotifyCollectionChangedEventArgs)
Updates the series when the ItemsSource collection is changed
Declaration
protected virtual void OnItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | To get sender |
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | To get eventargs |
OnItemsSourcePropertyChanged(Object, PropertyChangedEventArgs)
Called when the property ItemsSource is changed
Declaration
protected virtual void OnItemsSourcePropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | To get sender |
System.ComponentModel.PropertyChangedEventArgs | e | To get eventArgs |
OnLayout(Boolean, Int32, Int32, Int32, Int32)
Called from layout when this view should assign a size and position to each of its children.
Declaration
protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | changed | To get changed |
System.Int32 | left | To get left |
System.Int32 | top | To get top |
System.Int32 | right | To get right |
System.Int32 | bottom | To get bottom |
OnMeasure(Int32, Int32)
Gets the availableWidth and availableHeight
Declaration
protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | widthMeasureSpec | To get widthMeasureSpec |
System.Int32 | heightMeasureSpec | To get heightMeasureSpec |
TransformToVisible(Double, Double)
Creates the screen point from data point.
Declaration
protected virtual PointF TransformToVisible(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | To get x |
System.Double | y | To get y |
Returns
Type | Description |
---|---|
Android.Graphics.PointF | visible points |