Class SparklineBase
Represents the SparklineBase class.
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.SfChart.WPF.dll
Syntax
public abstract class SparklineBase : Control
Constructors
SparklineBase()
Initializes a new instance of the SparklineBase class.
Declaration
public SparklineBase()
Fields
BandRangeEndProperty
The DependencyProperty for BandRangeEnd property.
Declaration
public static readonly DependencyProperty BandRangeEndProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
BandRangeStartProperty
The DependencyProperty for BandRangeStart property.
Declaration
public static readonly DependencyProperty BandRangeStartProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
EmptyPointValueProperty
The DependencyProperty for EmptyPointValue property.
Declaration
public static readonly DependencyProperty EmptyPointValueProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
EnableAnimationProperty
The DependencyProperty for EnableAnimation property.
Declaration
public static readonly DependencyProperty EnableAnimationProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
InteriorProperty
The DependencyProperty for Interior property.
Declaration
public static readonly DependencyProperty InteriorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ItemsSourceProperty
The DependencyProperty for ItemsSource property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MaximumYValueProperty
The DependencyProperty for MaximumYValue property.
Declaration
public static readonly DependencyProperty MaximumYValueProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MinimumYValueProperty
The DependencyProperty for MinimumYValue property.
Declaration
public static readonly DependencyProperty MinimumYValueProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangeBandBrushProperty
The DependencyProperty for RangeBandBrush property.
Declaration
public static readonly DependencyProperty RangeBandBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
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 |
YBindingPathProperty
The DependencyProperty for YBindingPath property.
Declaration
public static readonly DependencyProperty YBindingPathProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
BandRangeEnd
Gets or sets the maximum range band value in Y axis.
Declaration
public double BandRangeEnd { get; set; }
Property Value
Type |
---|
System.Double |
BandRangeStart
Gets or sets the minimum range band value in Y axis.
Declaration
public double BandRangeStart { get; set; }
Property Value
Type |
---|
System.Double |
DataCount
Gets or sets the data count.
Declaration
protected int DataCount { get; set; }
Property Value
Type |
---|
System.Int32 |
EmptyPointIndexes
Gets or sets the empty point indexes.
Declaration
protected List<double> EmptyPointIndexes { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<System.Double> |
EmptyPointValue
Gets or sets a value that determines how to calculate value for empty point.
Declaration
public EmptyPointValues EmptyPointValue { get; set; }
Property Value
Type |
---|
EmptyPointValues |
EnableAnimation
Gets or sets a value indicating whether to animate the sparkline on loading and whenever ItemsSource change.
Declaration
public bool EnableAnimation { get; set; }
Property Value
Type |
---|
System.Boolean |
Interior
Gets or sets the brush to paint the interior of the sparkline.
Declaration
public Brush Interior { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The System.Windows.Media.Brush value. |
ItemsSource
Gets or sets an IEnumerable source used to generate sparkline.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
Type |
---|
System.Collections.IEnumerable |
MaximumYValue
Gets or sets the maximum value for Y axis.
Declaration
public double MaximumYValue { get; set; }
Property Value
Type |
---|
System.Double |
MinimumYValue
Gets or sets the minimum value for Y axis.
Declaration
public double MinimumYValue { get; set; }
Property Value
Type |
---|
System.Double |
RangeBandBrush
Gets or sets the range band brush.
Declaration
public Brush RangeBandBrush { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The System.Windows.Media.Brush value. |
SegmentPresenter
Gets or sets the segment presenter
Declaration
protected Canvas SegmentPresenter { get; set; }
Property Value
Type |
---|
System.Windows.Controls.Canvas |
Stroke
Gets or sets the brush to paint outline of the sparkline.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The System.Windows.Media.Brush value. |
StrokeThickness
Gets or sets stroke thickness for segments
Declaration
public double StrokeThickness { get; set; }
Property Value
Type |
---|
System.Double |
YBindingPath
Gets or sets the property path to retrieve y data from ItemsSource.
Declaration
public string YBindingPath { get; set; }
Property Value
Type |
---|
System.String |
Methods
AnimateSegments(UIElementCollection)
Animates the segments.
Declaration
protected virtual void AnimateSegments(UIElementCollection elements)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.UIElementCollection | elements | The System.Windows.Controls.UIElementCollection. |
Deserialize()
Method used to deserialize the file in default location
Declaration
public object Deserialize()
Returns
Type |
---|
System.Object |
Deserialize(Stream)
Method used to deserialize the serialized file in specified location.
Declaration
public object Deserialize(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to be deserialized |
Returns
Type | Description |
---|---|
System.Object | Returns the root object. |
Deserialize(String)
Method used to deserialize a file
Declaration
public object Deserialize(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName |
Returns
Type | Description |
---|---|
System.Object | Returns the root object. |
GeneratePoints(String)
Generate the points from the items source.
Declaration
protected virtual void GeneratePoints(string xPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | xPath | The x path. |
MeasureOverride(Size)
Measures the size in layout required for child elements and determines a size for the sparkline.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | availableSize | The available size that this element can give to child elements. |
Returns
Type | Description |
---|---|
System.Windows.Size | Returns the size that the element determines it needs during layout, based on its calculation of child element sizes. |
OnApplyTemplate()
Method gets called when the default template is applied.
Declaration
public override void OnApplyTemplate()
OnMouseMove(MouseEventArgs)
Updates the mouse moved interactions for the sparkline.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | The Event Arguments |
RenderSegments()
To render the visual segments
Declaration
protected abstract void RenderSegments()
Reset()
Resets the sparkline values.
Declaration
public virtual void Reset()
Serialize()
Method used to serialize the file in default location.
Declaration
public void Serialize()
Serialize(Stream)
Method used to generate a serialize file in specified location.
Declaration
public void Serialize(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
Serialize(String)
Method used to generate a serialize file in default location with customized name.
Declaration
public void Serialize(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName |
SetIndividualPoints(Int32, Object, Boolean, String)
set the individual points to the existing collection
Declaration
protected virtual void SetIndividualPoints(int index, object obj, bool replace, string xPath)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The individual point index. |
System.Object | obj | The object. |
System.Boolean | replace | The replace indication System.Boolean |
System.String | xPath | The x path. |
TransformToVisible(Double, Double)
Creates the screen point from data point.
Declaration
public virtual Point TransformToVisible(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The x value. |
System.Double | y | The y value. |
Returns
Type | Description |
---|---|
System.Windows.Point | Returns the corresponding screen co-ordinate. |
UpdateArea()
To update the sparkline
Declaration
public void UpdateArea()
UpdateMinMaxValues()
Updates the minimum and maximum value.
Declaration
protected virtual void UpdateMinMaxValues()
Events
OnSparklineMouseMove
Raised when the sparkline mouse gets moved.
Declaration
public event SparklineMouseMoveHandler OnSparklineMouseMove
Event Type
Type |
---|
SparklineMouseMoveHandler |