Class ChartSeries
Defines the options for a series in a chart, allowing customization of its appearance and behavior.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartSeries : ChartDataBoundComponent, ISubcomponentTracker, IChartElement
Constructors
ChartSeries()
Declaration
public ChartSeries()
Properties
AccessibilityDescription
Gets or sets the accessibility description for the ChartSeries.
Declaration
public string AccessibilityDescription { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string that defines the accessibility description for the ChartSeries. The default value is null. |
Remarks
Use this property to provide an accessibility description for the ChartSeries root element, which is the parent element of the series points.
AccessibilityDescriptionFormat
Gets or sets the format string used for the accessibility description of the data points in the ChartSeries. The format string can include the following placeholders:
- ${series.name}: Displays the name of the series.
- ${point.x}: Displays the x-value of the point.
- ${point.y}: Displays the y-value of the point.
- ${point.high}: Displays the high value of the point. This is applicable only for financial and range series.
- ${point.low}: Displays the low value of the point. This is applicable only for financial and range series.
- ${point.open}: Displays the open value of the point. This is applicable only for financial series.
- ${point.close}: Displays the close value of the point. This is applicable only for financial series.
Declaration
public string AccessibilityDescriptionFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the format for the accessibility description of points in the series. |
Remarks
Use this property to specify the format for the points accessibility description of the ChartSeries. The AccessibilityDescription property provides accessibility information for the series root element. However, this property allows you to provide dynamic information based on the ChartSeries data. For example, the format "${series.name} : ${point.x}" displays the series name and x-value of the point in the accessibility description.
AccessibilityRole
Gets or sets the accessibility role for the ChartSeries.
Declaration
public string AccessibilityRole { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string that defines the accessibility role for the ChartSeries. The default value is null. |
Remarks
Use this property to specify the accessibility role for the ChartSeries root element.
Animation
Specifies the animation settings for the series.
Declaration
public ChartSeriesAnimation Animation { get; set; }
Property Value
Type | Description |
---|---|
ChartSeriesAnimation | A ChartSeriesAnimation object that defines properties for animating the series when they are initially rendered on the chart. |
Remarks
This property allows customization of animation effects such as duration and delay to enhance the visual experience of series data as it transitions onto the chart.
BearFillColor
Specifies the fill color used for bearish candles in financial series.
Declaration
public string BearFillColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the color of bearish (down) candles. |
Remarks
This property determines the color applied to bearish candles in a candlestick or OHLC chart, indicating a price decrease.
BinInterval
Specifies the interval for data bins in a histogram series.
Declaration
public double BinInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the bin interval. |
Remarks
This property defines the width of bins in a histogram, impacting how data is grouped and displayed.
Border
Defines the border of the rectangle-shaped series.
Declaration
public ChartSeriesBorder Border { get; set; }
Property Value
Type | Description |
---|---|
ChartSeriesBorder | A ChartSeriesBorder object for configuring series borders. |
Remarks
Use this property to specify the border attributes, such as color and width, for series that can be represented as rectangular shapes.
BoxPlotMode
Specifies the mode for box and whisker series.
Declaration
public BoxPlotMode BoxPlotMode { get; set; }
Property Value
Type | Description |
---|---|
BoxPlotMode | A BoxPlotMode enumeration value indicating the mode. |
Remarks
This property sets the calculation method for displaying the box plot, affecting data representation.
BullFillColor
Specifies the fill color used for bullish candles in financial series.
Declaration
public string BullFillColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the color of bullish (up) candles. |
Remarks
This property determines the color applied to bullish candles in a candlestick or OHLC chart, indicating a price increase.
CardinalSplineTension
Specifies the tension for the Cardinal Spline in spline series.
Declaration
public double CardinalSplineTension { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the tension of the Cardinal Spline. The default value is 0.5. |
Remarks
This property adjusts the stiffness of the Cardinal Spline curve in spline series, affecting its smoothness and shape.
ChartDataEditSettings
Configures drag settings for the series.
Declaration
public ChartDataEditSettings ChartDataEditSettings { get; set; }
Property Value
Type | Description |
---|---|
ChartDataEditSettings | A ChartDataEditSettings object that defines behavior and appearance of a series during interactive data editing by dragging. |
Remarks
This property allows users to modify series data points directly on the chart by dragging, enhancing interactivity and data exploration.
Close
Gets or sets the field name in the data source that represents the closing value for financial series.
Declaration
public string Close { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the data source field for the closing value in a financial series. |
Remarks
This property is used in financial charts to denote the closing price of financial data points, such as stocks at the end of a trading session.
ColumnSpacing
Defines the space between adjacent series for rectangle-shaped series.
Declaration
public double ColumnSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the spacing between series columns. |
Remarks
This property determines the amount of space between columns in a column or bar series, allowing for better separation and visual clarity.
ColumnWidth
Specifies the column width of the rectangle-shaped series.
Declaration
public double ColumnWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the width of the columns. |
Remarks
This property sets the relative width of columns in a column or bar series, affecting the appearance and spacing of the series columns.
Connector
Specifies the customization option for the connector lines.
Declaration
public ChartSeriesConnector Connector { get; set; }
Property Value
Type | Description |
---|---|
ChartSeriesConnector | A ChartSeriesConnector object providing customization of connector lines used with data labels or points. |
Remarks
Use this property to configure how connector lines appear, including customization of color, width, and dash patterns.
CornerRadius
Specifies the corner radius of the rectangle-shaped series.
Declaration
public ChartCornerRadius CornerRadius { get; set; }
Property Value
Type | Description |
---|---|
ChartCornerRadius | A ChartCornerRadius object configuring the series' corner radii. |
Remarks
Use this property to round the corners of rectangular series representations, enhancing their visual aesthetics by applying a uniform radius to corners.
DashArray
Defines the pattern of dashes and gaps to stroke the lines.
Declaration
public string DashArray { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string pattern for dash arrays used when drawing lines. |
Remarks
This property specifies the pattern of dashes and gaps applied to lines in the series, allowing customization of line styles.
DataSource
Gets or sets the data source for the chart.
Declaration
public IEnumerable<object> DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | An System.Collections.Generic.IEnumerable<> of objects, which can be an array of JSON objects or a |
Remarks
This property determines the data set displayed by the chart series.
DrawType
Specifies the type of series to be drawn in radar or polar series.
Declaration
public ChartDrawType DrawType { get; set; }
Property Value
Type | Description |
---|---|
ChartDrawType | A ChartDrawType enumeration value that specifies how series are drawn. |
Remarks
This property is significant when plotting radar or polar series, determining whether the series appears as a line, column, bar, etc.
EmptyPointSettings
Specifies the customization of the empty point settings for the series.
Declaration
public ChartEmptyPointSettings EmptyPointSettings { get; set; }
Property Value
Type | Description |
---|---|
ChartEmptyPointSettings | A ChartEmptyPointSettings object for handling empty data point styles. |
Remarks
This property provides settings to handle and style data points that do not have values, such as display mode or custom markers.
EnableComplexProperty
Improves chart performance through data mapping.
Declaration
public bool EnableComplexProperty { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating if complex property data mapping is enabled. Default is |
Remarks
Use this property to enhance chart rendering performance with complex data binding.
EnableSolidCandles
Enables solid candles for candle series.
Declaration
public bool EnableSolidCandles { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating if solid candles are enabled for candle series. |
Remarks
This property determines whether candlestick series are displayed as filled "solid" candles, providing a visual indication of increase or decrease based on color.
EnableTooltip
If set to true
, the tooltip for the series will be visible.
Declaration
public bool EnableTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean indicating whether tooltips are enabled for the series. The default is |
Remarks
Use this property to display additional information about series points when hovering over them with cursor.
ErrorBar
Specifies the configuration for the error bar settings of the series.
Declaration
public ChartErrorBarSettings ErrorBar { get; set; }
Property Value
Type | Description |
---|---|
ChartErrorBarSettings | A ChartErrorBarSettings object that configures how error bars are displayed on the series. |
Remarks
Error bars provide a visual representation of variability within data, indicating error or uncertainty for individual data points in the series.
Fill
Gets or sets the fill color for the chart series.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | It accepts a value in hex or rgba as a valid CSS color string. It also represents the color of signal lines in technical indicators. For technical indicators, the default value is 'blue'; for series, it is null. |
Remarks
This property determines the fill color for the series elements, affecting both visual appearance and legend representation.
Focusable
Gets or sets the accessibility keyboard navigation focus option for the ChartSeries.
Declaration
public bool Focusable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Accepts a boolean value to enable or disable keyboard navigation for the ChartSeries. The default value is true. |
Remarks
Use this property to toggle keyboard navigation focus for the ChartSeries.
GroupName
Defines the group name to associate chart series.
Declaration
public string GroupName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string indicating the group name for series stacking. |
Remarks
The axis in the same group shares the same baseline and location on the corresponding axis.
High
Gets or sets the field name in the data source that represents the high value for financial series.
Declaration
public string High { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the data source field for the high value in a financial series. |
Remarks
This property is used in financial charts to determine the high points of data points, like in stock market data.
HighlightStyle
Specifies the styling class used when the series is highlighted.
Declaration
public string HighlightStyle { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the CSS class for highlight styling. |
Remarks
This property applies a specific CSS class to style the series when it is highlighted by the user.
IntermediateSumIndexes
Specifies the indexes of intermediate sums in a waterfall series.
Declaration
public double[] IntermediateSumIndexes { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] | An array of double values representing the intermediate sum indexes in a waterfall series. |
Remarks
This property highlights specific points in the series as intermediate sums, which can be used to display cumulative values at those positions.
IsClosed
Determines whether the polar line-based series is closed.
Declaration
public bool IsClosed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating if the polar line series should be closed. The default value is |
Remarks
This property specifies whether the lines in a polar chart should be closed, creating a complete loop around the center of the chart.
LegendShape
Specifies the legend shape of the series.
Declaration
public LegendShape LegendShape { get; set; }
Property Value
Type | Description |
---|---|
LegendShape | A LegendShape enumeration representing the shape used in the legend. |
Remarks
This property defines the shape used to represent the series in the chart legend, enhancing visual clarity for viewers.
Low
Gets or sets the field name in the data source that represents the low value for financial series.
Declaration
public string Low { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the data source field for the low value in a financial series. |
Remarks
This property is utilized in financial charts to identify the low points of data entries, such as those in stock market data.
Marker
Specifies the customization of the marker of the series.
Declaration
public ChartMarker Marker { get; set; }
Property Value
Type | Description |
---|---|
ChartMarker | A ChartMarker object that allows customization of marker styles, including shape, size, and fill. |
Remarks
Use this property to configure the appearance of markers, which are used to identify individual data points within the series.
MaxRadius
Specifies the maximum radius for bubbles in a bubble series.
Declaration
public double MaxRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the maximum size of the bubbles. |
Remarks
This property sets the upper limit for the size of bubbles in a bubble chart, influencing how data values are visually represented as bubble sizes.
MinRadius
Specifies the minimum radius for bubbles in a bubble series.
Declaration
public double MinRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the minimum bubble size. |
Remarks
This property controls the smallest size a bubble can have in a bubble chart, affecting the visual representation of data points.
Name
Specifies the name of the series.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the name for identification and display purposes. |
Remarks
This property is used for identifying and labeling the series in the chart.
NegativeFillColor
Specifies the fill color for negative values in a waterfall series.
Declaration
public string NegativeFillColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the fill color for negative values. |
Remarks
This property sets the color used for negative value bars in a waterfall chart, enhancing visual clarity for decreases in values.
NonHighlightStyle
Specifies the styling class used when the series is not highlighted.
Declaration
public string NonHighlightStyle { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the CSS class for non-highlight styling. |
Remarks
This property applies a specific CSS class to style the series when it is not highlighted by the user.
Opacity
Defines the opacity of the series fill.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the opacity of the fill where the value ranges from 0 to 1. The default value is 1 (fully opaque). |
Remarks
This property specifies the transparency level of the series fill, allowing for various visual presentation effects.
Open
Gets or sets the field name in the data source that represents the opening value for financial series.
Declaration
public string Open { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the data source field for the opening value in a financial series. |
Remarks
This property is used in financial charts to denote the opening price of financial data points, such as stocks at the start of a trading session.
PointColorMapping
Gets or sets the data source field name that contains the color value of points.
Declaration
public string PointColorMapping { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the field in the data source for point color mapping. |
Remarks
This property specifies the data source field that provides color values for individual data points in the series.
Query
Specifies the query to select data from DataSource
.
Declaration
public Query Query { get; set; }
Property Value
Remarks
This property is applicable when the DataSource is SfDataManager.
RendererKey
Declaration
public string RendererKey { get; set; }
Property Value
Type |
---|
System.String |
RendererType
Declaration
public Type RendererType { get; set; }
Property Value
Type |
---|
System.Type |
SegmentAxis
Specifies the axis used for segmentation.
Declaration
public Segment SegmentAxis { get; set; }
Property Value
Remarks
This property determines which axis will be used for segmenting the series, which can affect how series data is divided and displayed.
Segments
Specifies the segments of the multicolor series.
Declaration
public List<ChartSegment> Segments { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ChartSegment> | A list of ChartSegment objects that define multicolored segments within a series. |
Remarks
Use this property to create multicolored segments for visual differentiation of parts within the same series, enhancing the interpretation of changes within segmented data.
SelectionStyle
Specifies the styling class used when the series is selected.
Declaration
public string SelectionStyle { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the CSS class for selection styling. |
Remarks
This property applies a specific CSS class to style the series when it is selected by the user.
ShowMean
Indicates whether the mean is displayed in a box and whisker series.
Declaration
public bool ShowMean { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean indicating whether to display the mean. |
Remarks
This property specifies if the mean value is visualized in the box and whisker plot, adding statistical insight to the chart.
ShowNearestTooltip
Gets or sets a value that determines whether tooltips are displayed for the nearest data point to the cursor for a specific chart series.
Declaration
public bool ShowNearestTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true to display the tooltip for the nearest data point to the cursor on the specific chart series; otherwise, false. The default value is true. |
Remarks
This property controls the display of the tooltip based on the proximity of the nearest data point to the cursor for a specific chart series. The ChartTooltipSettings.ShowNearestTooltip property must be set to true for this property to function. When the ChartSeries.ShowNearestTooltip property is set to false, the tooltip for the nearest data point will not be displayed for the current series, but it may still be shown for other series.
ShowNormalDistribution
Indicates whether normal distribution is displayed in a histogram series.
Declaration
public bool ShowNormalDistribution { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether to display the normal distribution curve. |
Remarks
This property enables the display of a normal distribution curve on histograms, providing a statistical reference for the data.
Size
The data source field that contains the size value for the bubble series.
Declaration
public string Size { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the field in the data source for the size. |
Remarks
This property specifies the data source field that provides size values, used to render bubbles in a bubble series.
SplineType
Specifies the type of spline to be drawn in spline series.
Declaration
public SplineType SplineType { get; set; }
Property Value
Type | Description |
---|---|
SplineType | A SplineType enumeration representing the type of spline. |
Remarks
This property determines the method used to compute and render the spline curves in the chart, affecting their continuity and appearance.
StackingGroup
Specifies the group name used to stack series together.
Declaration
public string StackingGroup { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the group name for stacking series. |
Remarks
This property groups series together for stacking purposes, allowing multiple series to share the same stacking baseline within the chart.
StepPosition
Defines the position of steps for step series.
Declaration
public StepPosition StepPosition { get; set; }
Property Value
Type | Description |
---|---|
StepPosition | A StepPosition enumeration describing the position of the steps in the series. The default value is Left. |
Remarks
This property specifies the alignment of the steps in a step chart, which can be set to the left, right, or center of the data points.
SumIndexes
Specifies the indexes of total sums in a waterfall series.
Declaration
public double[] SumIndexes { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] | An array of double values representing the total sum indexes in a waterfall series. |
Remarks
This property designates certain data points in the series as total sums, facilitating cumulative display of data at those positions.
SummaryFillColor
Specifies the fill color for the summary bars in a waterfall series.
Declaration
public string SummaryFillColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the fill color for summary bars. |
Remarks
This property defines the color used for summary bars in a waterfall chart, providing visual distinction for total sums or subtotals.
TooltipFormat
Defines the tooltip format for the series.
Declaration
public string TooltipFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the format for displaying information in tooltips. |
Remarks
This property allows customization of the content displayed in tooltips, using placeholders for dynamic data such as series and data point values.
TooltipMappingName
Specifies the field name in the data source used for mapping tooltips in waterfall series.
Declaration
public string TooltipMappingName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the data source field for tooltips. |
Remarks
This property allows customization of tooltip content by using a specific field from the data source in a waterfall series.
Trendlines
Specifies the trendlines for the series.
Declaration
public List<ChartTrendline> Trendlines { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ChartTrendline> | A list of ChartTrendline objects representing various trendlines applied to the series. |
Remarks
Trendlines predict and highlight trends in the data by displaying them over the series. They can be configured for different mathematical models such as linear or exponential.
Type
Specifies the type of series, such as Line, Column, Area, and others.
Declaration
public ChartSeriesType Type { get; set; }
Property Value
Type | Description |
---|---|
ChartSeriesType | An enumeration of type ChartSeriesType representing the series type. |
Remarks
The type of the series affects how the data is rendered in the chart.
UnSelectedStyle
Specifies the styling class used when the series is deselected.
Declaration
public string UnSelectedStyle { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the CSS class for deselection styling. |
Remarks
This property applies a specific CSS class to style the series when it is not selected.
Visible
Specifies the visibility of the series.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the series is visible or not. The default is |
Remarks
Use the Visible property to toggle the display of the series on the chart.
Volume
Gets or sets the field name in the data source that represents the volume value for financial series.
Declaration
public string Volume { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the data source field for the volume value in a financial series. |
Remarks
This property is used in financial charts to denote the volume of trades or transactions for financial data points, such as stock trading volumes.
Width
Defines the stroke width for the series, applicable to series of Line type. Also represents the stroke width of signal lines in technical indicators.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value specifying the width of the line strokes in pixels. |
Remarks
This property is applicable for line-type series.
XAxisName
Specifies the name of the horizontal axis associated with the series.
Declaration
public string XAxisName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the name of the associated horizontal axis. Default is "PrimaryXAxis". |
Remarks
This property is used when associating the series with an axis.
XName
Gets or sets the field name in the data source that represents the x-axis value.
Declaration
public string XName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the data source field for the x-axis value. |
Remarks
This property is applicable to both series and technical indicators, determining how data points are bound to the x-axis in the chart.
YAxisName
Gets or sets the name of the vertical axis associated with the series.
Declaration
public string YAxisName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the name of the associated vertical axis. The default value is "PrimaryYAxis". |
Remarks
Use this property to link the series to a specific vertical axis, allowing for targeted data plotting on the chart.
It is applicable for series and technical indicators. It requires Axes
of the chart.
YName
Gets or sets the field name in the data source that represents the y-axis value.
Declaration
public string YName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the data source field for the y-axis value. |
Remarks
This property is used to map data points to the y-axis.
ZOrder
Specifies the z-order of the series.
Declaration
public int ZOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer representing the stacking order of the series. |
Remarks
This determines the drawing order of series in the chart, with higher values drawn above lower values.
Methods
OnAfterRender(Boolean)
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |