Class SfSparkline<TValue>
The Sparkline Charts is a replacement for normal charts to display trends in a very small area. Customize sparklines completely by changing the series or axis type and by adding markers, data labels, range bands, and more.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfSparkline<TValue> : SfDataBoundComponent, ISparkline
Type Parameters
Name | Description |
---|---|
TValue | Represents the generic data type of the sparkline control. |
Constructors
SfSparkline()
Declaration
public SfSparkline()
Properties
DataSource
To configure sparkline data source.
Declaration
public IEnumerable<TValue> DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TValue> | The data source for the sparkline. |
EnableGroupingSeparator
To enable the separator.
Declaration
public bool EnableGroupingSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EndPointColor
To configure sparkline series last x value point color.
Declaration
public string EndPointColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
Fill
To configure sparkline series fill.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value that specifies the fill color for the sparkline series. |
Format
To apply internationalization for sparkline.
Declaration
public string Format { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
Height
To configure Sparkline height.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
HighPointColor
To configure sparkline series highest y value point color.
Declaration
public string HighPointColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
ID
Set the id string for the sparkline component.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
LineWidth
To configure sparkline line series width.
Declaration
public double LineWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts the double value that specifies the width of line in sparkline chart. The default value is |
LowPointColor
To configure sparkline series lowest y value point color.
Declaration
public string LowPointColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
NegativePointColor
To configure sparkline series negative y value point color.
Declaration
public string NegativePointColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
Opacity
To configure sparkline line series opacity.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts the double value that specifies the opacity of line in sparkline series. The default value is |
Palette
To configure sparkline series color palette. It applicable to column and pie type series.
Declaration
public string[] Palette { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | Accepts the string array that specifies the color palette for the sparkline series. |
Query
Specifies the query for filter the data.
Declaration
public Query Query { get; set; }
Property Value
Type | Description |
---|---|
Query | A Query object that specifies the query used to filter the data. The default value is an empty query. |
RangePadding
To configure Sparkline series type.
Declaration
public SparklineRangePadding RangePadding { get; set; }
Property Value
Type | Description |
---|---|
SparklineRangePadding | One of the SparklineRangePadding enumeration values that specifies the range padding for sparkline series. The default value is None. |
StartPointColor
To configure sparkline series first x value point color.
Declaration
public string StartPointColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
Theme
To configure sparkline theme.
Declaration
public Theme Theme { get; set; }
Property Value
Type | Description |
---|---|
Theme | Accepts a value from the Theme enum. The default value is Bootstrap4. |
TiePointColor
To configure sparkline winloss series tie y value point color.
Declaration
public string TiePointColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
Type
To configure Sparkline series type.
Declaration
public SparklineType Type { get; set; }
Property Value
Type | Description |
---|---|
SparklineType | One of the SparklineType enumeration values that specifies the type of sparkline. The default value is Line. |
ValueType
To configure sparkline series value type.
Declaration
public SparklineValueType ValueType { get; set; }
Property Value
Type | Description |
---|---|
SparklineValueType | One of the SparklineValueType enumeration values that specifies the value type for sparkline. The default value is Numeric. |
Width
To configure Sparkline width.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
XName
To configure sparkline series xName.
Declaration
public string XName { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
YName
To configure sparkline series yName.
Declaration
public string YName { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
RefreshAsync()
The method is used to render the sparkline again.
Declaration
public Task RefreshAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
|