Class ChartSeriesBuilder
Inheritance
System.Object
Syncfusion.EJ2.ControlBuilder
ChartSeriesBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class ChartSeriesBuilder : ControlBuilder
Constructors
ChartSeriesBuilder()
Declaration
public ChartSeriesBuilder()
ChartSeriesBuilder(List<ChartSeries>)
Declaration
public ChartSeriesBuilder(List<ChartSeries> collection)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<ChartSeries> |
collection |
|
Methods
Accessibility(ChartSeriesAccessibility)
Options to improve accessibility for series elements.
Declaration
public ChartSeriesBuilder Accessibility(ChartSeriesAccessibility accessibility)
Parameters
Returns
Accessibility(Action<ChartSeriesAccessibilityBuilder>)
Declaration
public ChartSeriesBuilder Accessibility(Action<ChartSeriesAccessibilityBuilder> accessibility)
Parameters
Returns
Add()
Declaration
AddPoint(Object)
Declaration
public ChartSeriesBuilder AddPoint(object addPoint)
Parameters
Type |
Name |
Description |
System.Object |
addPoint |
|
Returns
Animation(ChartAnimation)
Options for customizing the animation of the series.
By default, animation is enabled with a duration of 1000 milliseconds (about 1 second). It can be disabled by setting enable to false
.
The following properties are supported in animation:
enable: If set to true, the series is animated on initial loading.
duration: The duration of the animation in milliseconds.
delay: The delay before the animation starts, in milliseconds.
Declaration
public ChartSeriesBuilder Animation(ChartAnimation animation)
Parameters
Returns
Animation(Action<ChartAnimationBuilder>)
Declaration
public ChartSeriesBuilder Animation(Action<ChartAnimationBuilder> animation)
Parameters
Returns
BearFillColor(String)
This property is used in financial charts to visualize price movements in stocks.
It defines the color of the candle/point when the opening price is less than the closing price.
Declaration
public ChartSeriesBuilder BearFillColor(string bearFillColor)
Parameters
Type |
Name |
Description |
System.String |
bearFillColor |
|
Returns
BinInterval(Double)
The binInterval
property controls the width of each bin and the interval between bins for histogram points.
Declaration
public ChartSeriesBuilder BinInterval(double binInterval)
Parameters
Type |
Name |
Description |
System.Double |
binInterval |
|
Returns
Border(ChartBorder)
Options for customizing the border of the series.
Note that this property is applicable only for Column
and Bar
type series.
Declaration
public ChartSeriesBuilder Border(ChartBorder border)
Parameters
Returns
Border(Action<ChartBorderBuilder>)
Declaration
public ChartSeriesBuilder Border(Action<ChartBorderBuilder> border)
Parameters
Returns
BoxPlotMode(BoxPlotMode)
Specifies the box plot mode for the box and whisker chart series.
The available modes are:
Exclusive - Renders the series based on the exclusive mode.
Inclusive - Renders the series based on the inclusive mode.
Normal - Renders the series based on the normal mode.
Declaration
public ChartSeriesBuilder BoxPlotMode(BoxPlotMode boxPlotMode)
Parameters
Returns
BullFillColor(String)
This property is used in financial charts to visualize price movements in stocks.
It defines the color of the candle/point when the opening price is higher than the closing price.
Declaration
public ChartSeriesBuilder BullFillColor(string bullFillColor)
Parameters
Type |
Name |
Description |
System.String |
bullFillColor |
|
Returns
CardinalSplineTension(Double)
Specifies the tension parameter for cardinal splines. This affects the curvature of the spline.
Declaration
public ChartSeriesBuilder CardinalSplineTension(double cardinalSplineTension)
Parameters
Type |
Name |
Description |
System.Double |
cardinalSplineTension |
|
Returns
Close(String)
The data source field that contains the close value.
It is applicable for both financial series and technical indicators.
Declaration
public ChartSeriesBuilder Close(string close)
Parameters
Type |
Name |
Description |
System.String |
close |
|
Returns
ColorName(String)
The data source field that contains the color mapping value.
It is applicable for range color mapping.
Declaration
public ChartSeriesBuilder ColorName(string colorName)
Parameters
Type |
Name |
Description |
System.String |
colorName |
|
Returns
ColumnFacet(ShapeType)
Defines the shape of the data in a column and bar chart.
Available shapes are:
Rectangle: Displays the data in a column and bar chart with a rectangular shape.
Cylinder: Displays the data in a column and bar chart with a cylindrical shape.
Declaration
public ChartSeriesBuilder ColumnFacet(ShapeType columnFacet)
Parameters
Returns
ColumnSpacing(Double)
This property determines the space between columns in a column or bar chart.
Note that it takes a value from 0 to 1.
Declaration
public ChartSeriesBuilder ColumnSpacing(double columnSpacing)
Parameters
Type |
Name |
Description |
System.Double |
columnSpacing |
|
Returns
ColumnWidth(Double)
The columnWidth
property can be used to customize the width of the columns in a column series.
Note that if the series type is histogram, the default value is 1; otherwise, it is 0.7.
Declaration
public ChartSeriesBuilder ColumnWidth(double columnWidth)
Parameters
Type |
Name |
Description |
System.Double |
columnWidth |
|
Returns
ColumnWidthInPixel(Double)
To render the column series points with a specific column width in pixels.
Declaration
public ChartSeriesBuilder ColumnWidthInPixel(double columnWidthInPixel)
Parameters
Type |
Name |
Description |
System.Double |
columnWidthInPixel |
|
Returns
Connector(Object)
Specifies the appearance of the line connecting adjacent points in waterfall charts.
Declaration
public ChartSeriesBuilder Connector(object connector)
Parameters
Type |
Name |
Description |
System.Object |
connector |
|
Returns
CornerRadius(ChartCornerRadius)
The cornerRadius
property specifies the radius for the corners of the column series points to create a rounded appearance in the chart.
Declaration
public ChartSeriesBuilder CornerRadius(ChartCornerRadius cornerRadius)
Parameters
Returns
CornerRadius(Action<ChartCornerRadiusBuilder>)
Declaration
public ChartSeriesBuilder CornerRadius(Action<ChartCornerRadiusBuilder> cornerRadius)
Parameters
Returns
DashArray(String)
Defines the pattern of dashes and gaps used to stroke the lines in Line
type series.
Declaration
public ChartSeriesBuilder DashArray(string dashArray)
Parameters
Type |
Name |
Description |
System.String |
dashArray |
|
Returns
DataSource(Action<DataManagerBuilder>)
Declaration
public ChartSeriesBuilder DataSource(Action<DataManagerBuilder> dataSource)
Parameters
Type |
Name |
Description |
System.Action<Syncfusion.EJ2.DataManagerBuilder> |
dataSource |
|
Returns
DataSource(Object)
Specifies the data source for the series. It can be an array of JSON objects, or an instance of DataManager.
Declaration
public ChartSeriesBuilder DataSource(object dataSource)
Parameters
Type |
Name |
Description |
System.Object |
dataSource |
|
Returns
DragSettings(ChartDragSettings)
Customize the drag settings for the series with this property to configure drag behavior in the chart.
Declaration
public ChartSeriesBuilder DragSettings(ChartDragSettings dragSettings)
Parameters
Returns
DragSettings(Action<ChartDragSettingsBuilder>)
Declaration
public ChartSeriesBuilder DragSettings(Action<ChartDragSettingsBuilder> dragSettings)
Parameters
Returns
DrawType(ChartDrawType)
Specifies the type of series to be drawn in radar or polar charts.
The available options are:
'Line' - Renders a line series.
'Column' - Renders a column series.
'Area' - Renders an area series.
'Scatter' - Renders a scatter series.
'Spline' - Renders a spline series.
'StackingColumn' - Renders a stacking column series.
'StackingArea' - Renders a stacking area series.
'RangeColumn' - Renders a range column series.
'SplineArea' - Renders a spline area series.
Declaration
public ChartSeriesBuilder DrawType(ChartDrawType drawType)
Parameters
Returns
EmptyPointSettings(ChartEmptyPointSettings)
Customization options for the appearance of empty points in the series.
null
or undefined
values are considered empty points.
Declaration
public ChartSeriesBuilder EmptyPointSettings(ChartEmptyPointSettings emptyPointSettings)
Parameters
Returns
EmptyPointSettings(Action<ChartEmptyPointSettingsBuilder>)
Declaration
public ChartSeriesBuilder EmptyPointSettings(Action<ChartEmptyPointSettingsBuilder> emptyPointSettings)
Parameters
Returns
EnableComplexProperty(Boolean)
This property is used to improve chart performance through data mapping for the series data source.
Declaration
public ChartSeriesBuilder EnableComplexProperty(bool enableComplexProperty)
Parameters
Type |
Name |
Description |
System.Boolean |
enableComplexProperty |
|
Returns
EnableSolidCandles(Boolean)
This property is applicable for the candle series.
It enables or disables the visual comparison of the current values with previous values in stock charts.
Declaration
public ChartSeriesBuilder EnableSolidCandles(bool enableSolidCandles)
Parameters
Type |
Name |
Description |
System.Boolean |
enableSolidCandles |
|
Returns
Controls whether the tooltip for the chart series is enabled or disabled. Set to true to display tooltips on hover, or false to hide them.
Declaration
public ChartSeriesBuilder EnableTooltip(bool enableTooltip)
Parameters
Type |
Name |
Description |
System.Boolean |
enableTooltip |
|
Returns
ErrorBar(ChartErrorBarSettings)
Options for displaying and customizing error bars for individual points in a series.
Declaration
public ChartSeriesBuilder ErrorBar(ChartErrorBarSettings errorBar)
Parameters
Returns
ErrorBar(Action<ChartErrorBarSettingsBuilder>)
Declaration
public ChartSeriesBuilder ErrorBar(Action<ChartErrorBarSettingsBuilder> errorBar)
Parameters
Returns
Fill(String)
The fill color for the series, which accepts values in hex or rgba as a valid CSS color string.
It also represents the color of the signal lines in technical indicators.
For technical indicators, the default value is 'blue', and for series, it is null.
Declaration
public ChartSeriesBuilder Fill(string fill)
Parameters
Type |
Name |
Description |
System.String |
fill |
|
Returns
GroupName(String)
Defines the name that specifies the chart series are mutually exclusive and can be overlaid.
Series in the same group share the same baseline and location on the corresponding axis.
Declaration
public ChartSeriesBuilder GroupName(string groupName)
Parameters
Type |
Name |
Description |
System.String |
groupName |
|
Returns
High(String)
The data source field that contains the high value.
It is applicable for both financial series and technical indicators.
Declaration
public ChartSeriesBuilder High(string high)
Parameters
Type |
Name |
Description |
System.String |
high |
|
Returns
Defines the collection of indexes for the intermediate summary columns in waterfall charts.
Declaration
public ChartSeriesBuilder IntermediateSumIndexes(int[] intermediateSumIndexes)
Parameters
Type |
Name |
Description |
System.Int32[] |
intermediateSumIndexes |
|
Returns
IsClosed(Boolean)
Specifies whether to join the start and end points of a line/area series used in a polar/radar chart to form a closed path.
Declaration
public ChartSeriesBuilder IsClosed(bool isClosed)
Parameters
Type |
Name |
Description |
System.Boolean |
isClosed |
|
Returns
LegendImageUrl(String)
The URL for the image to be displayed as a legend icon.
Note that legendShape
must be set to Image
.
Declaration
public ChartSeriesBuilder LegendImageUrl(string legendImageUrl)
Parameters
Type |
Name |
Description |
System.String |
legendImageUrl |
|
Returns
LegendShape(LegendShape)
Specifies the shape of the legend icon for each series.
Available shapes for legend:
Circle - Renders a circular icon.
Rectangle - Renders a rectangular icon.
Triangle - Renders a triangular icon.
Diamond - Renders a diamond-shaped icon.
Cross - Renders a cross-shaped icon.
HorizontalLine - Renders a horizontal line icon.
VerticalLine - Renders a vertical line icon.
Pentagon - Renders a pentagon-shaped icon.
InvertedTriangle - Renders an inverted triangle-shaped icon.
SeriesType - Uses the default icon shape based on the series type.
Image - Renders a custom image for the legend icon.
Declaration
public ChartSeriesBuilder LegendShape(LegendShape legendShape)
Parameters
Returns
Low(String)
The data source field that contains the low value.
It is applicable for both financial series and technical indicators.
Declaration
public ChartSeriesBuilder Low(string low)
Parameters
Type |
Name |
Description |
System.String |
low |
|
Returns
Marker(ChartMarkerSettings)
Options for displaying and customizing markers for individual points in a series.
Declaration
public ChartSeriesBuilder Marker(ChartMarkerSettings marker)
Parameters
Returns
Marker(Action<ChartMarkerSettingsBuilder>)
Declaration
public ChartSeriesBuilder Marker(Action<ChartMarkerSettingsBuilder> marker)
Parameters
Returns
MaxRadius(Double)
Specifies the maximum radius for the data points in the series.
Declaration
public ChartSeriesBuilder MaxRadius(double maxRadius)
Parameters
Type |
Name |
Description |
System.Double |
maxRadius |
|
Returns
MinRadius(Double)
Specifies the minimum radius for the data points in the series.
Declaration
public ChartSeriesBuilder MinRadius(double minRadius)
Parameters
Type |
Name |
Description |
System.Double |
minRadius |
|
Returns
Name(String)
The name
property allows setting a name for the series, which will be displayed in the legend, identifying different series in the chart, especially when multiple series are present.
Declaration
public ChartSeriesBuilder Name(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
NegativeFillColor(String)
Defines the visual representation of negative changes in waterfall charts.
Declaration
public ChartSeriesBuilder NegativeFillColor(string negativeFillColor)
Parameters
Type |
Name |
Description |
System.String |
negativeFillColor |
|
Returns
NonHighlightStyle(String)
The nonHighlightStyle
property is used to specify custom CSS styles for the non-highlighted series or points.
Declaration
public ChartSeriesBuilder NonHighlightStyle(string nonHighlightStyle)
Parameters
Type |
Name |
Description |
System.String |
nonHighlightStyle |
|
Returns
NoRisers(Boolean)
When set to true, the step series will be rendered without the vertical lines (risers) connecting the horizontal steps.
Note this property is only applicable to step series.
Declaration
public ChartSeriesBuilder NoRisers(bool noRisers)
Parameters
Type |
Name |
Description |
System.Boolean |
noRisers |
|
Returns
Opacity(Double)
Sets the opacity of the series, with a value between 0 and 1 where 0 is fully transparent and 1 is fully opaque.
Declaration
public ChartSeriesBuilder Opacity(double opacity)
Parameters
Type |
Name |
Description |
System.Double |
opacity |
|
Returns
Open(String)
The data source field that contains the open value.
It is applicable for both financial series and technical indicators.
Declaration
public ChartSeriesBuilder Open(string open)
Parameters
Type |
Name |
Description |
System.String |
open |
|
Returns
ParetoOptions(ChartParetoOptions)
Options for customizing the Pareto line series, including its appearance and behavior in the chart.
Declaration
public ChartSeriesBuilder ParetoOptions(ChartParetoOptions paretoOptions)
Parameters
Returns
ParetoOptions(Action<ChartParetoOptionsBuilder>)
Declaration
public ChartSeriesBuilder ParetoOptions(Action<ChartParetoOptionsBuilder> paretoOptions)
Parameters
Returns
PointColorMapping(String)
The data source field that contains the color value of a point.
It is applicable for series.
Declaration
public ChartSeriesBuilder PointColorMapping(string pointColorMapping)
Parameters
Type |
Name |
Description |
System.String |
pointColorMapping |
|
Returns
Query(String)
Specifies a query to select data from the data source. This property is applicable only when the data source is an ej.DataManager
.
Declaration
public ChartSeriesBuilder Query(string query)
Parameters
Type |
Name |
Description |
System.String |
query |
|
Returns
RemovePoint(Object)
Declaration
public ChartSeriesBuilder RemovePoint(object removePoint)
Parameters
Type |
Name |
Description |
System.Object |
removePoint |
|
Returns
SegmentAxis(Segment)
Defines the axis along which the line series will be split.
Declaration
public ChartSeriesBuilder SegmentAxis(Segment segmentAxis)
Parameters
Type |
Name |
Description |
Segment |
segmentAxis |
|
Returns
Segments(Action<ChartSegmentBuilder>)
Declaration
public ChartSeriesBuilder Segments(Action<ChartSegmentBuilder> segments)
Parameters
Returns
Segments(List<ChartSegment>)
Specifies a collection of regions used to differentiate a line series.
Declaration
public ChartSeriesBuilder Segments(List<ChartSegment> segments)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<ChartSegment> |
segments |
|
Returns
SelectionStyle(String)
The selectionStyle
property is used to specify custom CSS styles for the selected series or points.
Declaration
public ChartSeriesBuilder SelectionStyle(string selectionStyle)
Parameters
Type |
Name |
Description |
System.String |
selectionStyle |
|
Returns
SetData(Object)
Declaration
public ChartSeriesBuilder SetData(object setData)
Parameters
Type |
Name |
Description |
System.Object |
setData |
|
Returns
ShowMean(Boolean)
If set to true, the mean value for the box and whisker plot will be visible.
Declaration
public ChartSeriesBuilder ShowMean(bool showMean)
Parameters
Type |
Name |
Description |
System.Boolean |
showMean |
|
Returns
ShowNormalDistribution(Boolean)
Specifies whether to display the normal distribution curve for the histogram series.
Declaration
public ChartSeriesBuilder ShowNormalDistribution(bool showNormalDistribution)
Parameters
Type |
Name |
Description |
System.Boolean |
showNormalDistribution |
|
Returns
Size(String)
The data source field that contains the size value for the y-axis.
Declaration
public ChartSeriesBuilder Size(string size)
Parameters
Type |
Name |
Description |
System.String |
size |
|
Returns
SplineType(SplineType)
Specifies the type of spline used for rendering.
Available options include:
Natural - Renders a natural spline.
Cardinal - Renders a cardinal spline.
Clamped - Renders a clamped spline.
Monotonic - Renders a monotonic spline.
Declaration
public ChartSeriesBuilder SplineType(SplineType splineType)
Parameters
Returns
StackingGroup(String)
This property allows the grouping of series in stacked column and stacked bar charts.
Any string value can be assigned to the stackingGroup
property.
Series with the same stackingGroup
value will be grouped together in the chart.
Declaration
public ChartSeriesBuilder StackingGroup(string stackingGroup)
Parameters
Type |
Name |
Description |
System.String |
stackingGroup |
|
Returns
Step(StepPosition)
The step
property can be used to change the position of the steps in step line, step area, and step range area chart types.
Left: Steps start from the left side of the 2nd point.
Center: Steps start between the data points.
Right: Steps start from the right side of the 1st point.
Declaration
public ChartSeriesBuilder Step(StepPosition step)
Parameters
Returns
SumIndexes(Int32[])
Defines the collection of indexes for the overall summary columns in waterfall charts.
Declaration
public ChartSeriesBuilder SumIndexes(int[] sumIndexes)
Parameters
Type |
Name |
Description |
System.Int32[] |
sumIndexes |
|
Returns
SummaryFillColor(String)
Defines the visual representation of summaries in waterfall charts.
Declaration
public ChartSeriesBuilder SummaryFillColor(string summaryFillColor)
Parameters
Type |
Name |
Description |
System.String |
summaryFillColor |
|
Returns
Use this property to define a custom format for how tooltips are displayed.
Declaration
public ChartSeriesBuilder TooltipFormat(string tooltipFormat)
Parameters
Type |
Name |
Description |
System.String |
tooltipFormat |
|
Returns
The data source field that contains the value to be displayed in the tooltip.
Declaration
public ChartSeriesBuilder TooltipMappingName(string tooltipMappingName)
Parameters
Type |
Name |
Description |
System.String |
tooltipMappingName |
|
Returns
Trendlines(Action<ChartTrendlineBuilder>)
Declaration
public ChartSeriesBuilder Trendlines(Action<ChartTrendlineBuilder> trendlines)
Parameters
Returns
Trendlines(List<ChartTrendline>)
Defines the collection of trendlines used to predict the trend.
Declaration
public ChartSeriesBuilder Trendlines(List<ChartTrendline> trendlines)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<ChartTrendline> |
trendlines |
|
Returns
Type(ChartSeriesType)
The type of the series determines the visual representation of the data.
Available series types include:
Line - Draws a line series.
Column - Draws a column series.
Area - Draws an area series.
Bar - Draws a bar series.
Histogram - Draws a histogram series.
StackingColumn - Draws a stacking column series.
StackingArea - Draws a stacking area series.
StackingBar - Draws a stacking bar series.
StepLine - Draws a step line series.
StepArea - Draws a step area series.
Scatter - Draws a scatter series.
Spline - Draws a spline series.
StackingColumn100 - Draws a 100% stacked column series.
StackingBar100 - Draws a 100% stacked bar series.
StackingArea100 - Draws a 100% stacked area series.
RangeColumn - Draws a range column series.
Hilo - Draws a Hilo series.
HiloOpenClose - Draws a Hilo Open Close series.
Waterfall - Draws a waterfall series.
RangeArea - Draws a range area series.
SplineRangeArea - Draws a spline range area series.
Bubble - Draws a bubble series.
Candle - Draws a candle series.
Polar - Draws a polar series.
Radar - Draws a radar series.
BoxAndWhisker - Draws a box and whisker series.
Pareto - Draws a Pareto series.
Declaration
public ChartSeriesBuilder Type(ChartSeriesType type)
Parameters
Returns
UnSelectedStyle(String)
The unSelectedStyle
property is used to specify custom CSS styles for the deselected series or points.
Declaration
public ChartSeriesBuilder UnSelectedStyle(string unSelectedStyle)
Parameters
Type |
Name |
Description |
System.String |
unSelectedStyle |
|
Returns
Visible(Boolean)
If set to true
, the series will be visible. If set to false
, the series will be hidden.
Declaration
public ChartSeriesBuilder Visible(bool visible)
Parameters
Type |
Name |
Description |
System.Boolean |
visible |
|
Returns
Volume(String)
Defines the data source field that contains the volume value in candle charts.
It is applicable for both financial series and technical indicators.
Declaration
public ChartSeriesBuilder Volume(string volume)
Parameters
Type |
Name |
Description |
System.String |
volume |
|
Returns
Width(Double)
The stroke width for the series, applicable only for Line
type series.
It also represents the stroke width of the signal lines in technical indicators.
Declaration
public ChartSeriesBuilder Width(double width)
Parameters
Type |
Name |
Description |
System.Double |
width |
|
Returns
XAxisName(String)
The name of the horizontal axis associated with the series. It requires axes
of the chart.
It is applicable for series and technical indicators.
Declaration
public ChartSeriesBuilder XAxisName(string xAxisName)
Parameters
Type |
Name |
Description |
System.String |
xAxisName |
|
Returns
XName(String)
The data source field that contains the x value.
It is applicable to both series and technical indicators.
Declaration
public ChartSeriesBuilder XName(string xName)
Parameters
Type |
Name |
Description |
System.String |
xName |
|
Returns
YAxisName(String)
The name of the vertical axis associated with the series. It requires axes
of the chart.
It is applicable for series and technical indicators.
Declaration
public ChartSeriesBuilder YAxisName(string yAxisName)
Parameters
Type |
Name |
Description |
System.String |
yAxisName |
|
Returns
YName(String)
The data source field that contains the y value.
Declaration
public ChartSeriesBuilder YName(string yName)
Parameters
Type |
Name |
Description |
System.String |
yName |
|
Returns
ZOrder(Double)
The z-order of the series, which controls the stack order of the series. Higher values are drawn on top of lower values.
Declaration
public ChartSeriesBuilder ZOrder(double zOrder)
Parameters
Type |
Name |
Description |
System.Double |
zOrder |
|
Returns