CartesianSeries<TItem> Class

Base class of RadzenChart series.

Inheritance

Object

ComponentBase

RadzenChartComponentBase

CartesianSeries<TItem>

Implements

IComponent

IHandleEvent

IHandleAfterRender

IChartSeries

IChartValueAxisSeries

Inherited Members

RadzenChartComponentBase.ShouldRefreshChart

RadzenChartComponentBase.ValidateParameters

RadzenChartComponentBase.DidParameterChange

RadzenChartComponentBase.Chart

ComponentBase.BuildRenderTree

ComponentBase.OnInitialized

ComponentBase.OnInitializedAsync

ComponentBase.OnParametersSet

ComponentBase.OnParametersSetAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.OnAfterRenderAsync

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public abstract class CartesianSeries<TItem> : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartSeries, IChartValueAxisSeries

Type Parameters

Name Description
TItemThe type of the series data.

Constructors

CartesianSeries<TItem>Link to this section

Base class of RadzenChart series.

Declaration
protected CartesianSeries<TItem>()

Properties

CategoryPropertyLink to this section

The name of the property of TItem that provides the X axis (a.k.a. category axis) values.

Declaration
public string CategoryProperty { get; set; }
Property Value
Type Description
stringThe name of the property of TItem that provides the X axis (a.k.a. category axis) values.

ChildContentLink to this section

Gets or sets the child content.

Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the child content.

ColorLink to this section

Declaration
public string Color { get; }
Property Value
Type Description
string

CoordinateSystemLink to this section

Gets the coordinate system of the series.

Declaration
public CoordinateSystem CoordinateSystem { get; }
Property Value
Type Description
CoordinateSystemGets the coordinate system of the series.

DataLink to this section

Gets or sets the data of the series. The data is enumerated and its items are displayed by the series.

Declaration
public IEnumerable<TItem> Data { get; set; }
Property Value
Type Description
IEnumerable<TItem>Gets or sets the data of the series. The data is enumerated and its items are displayed by the series.

HiddenLink to this section

Gets or sets a value indicating whether this CartesianSeries<T> is hidden. Hidden series are initially invisible and the user can show them by clicking on their label in the legend. Use the Hidden property to hide certain series from your users but still allow them to see them.

Declaration
public bool Hidden { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether this CartesianSeries<T> is hidden. Hidden series are initially invisible and the user can show them by clicking on their label in the legend. Use the Hidden property to hide certain series from your users but still allow them to see them.

ItemsLink to this section

Stores Data as an IList of TItem.

Declaration
protected IList<TItem> Items { get; set; }
Property Value
Type Description
IList<TItem>Stores Data as an IList of TItem.

MarkerSizeLink to this section

Declaration
public double MarkerSize { get; }
Property Value
Type Description
double

MarkerTypeLink to this section

Declaration
public MarkerType MarkerType { get; }
Property Value
Type Description
MarkerType

MarkersLink to this section

Declaration
public RadzenMarkers Markers { get; set; }
Property Value
Type Description
RadzenMarkers

OverlaysLink to this section

Gets the list of overlays.

Declaration
public IList<IChartSeriesOverlay> Overlays { get; }
Property Value
Type Description
IList<IChartSeriesOverlay>Gets the list of overlays.

RenderingOrderLink to this section

Declaration
public int RenderingOrder { get; set; }
Property Value
Type Description
int

ShowActivePointLink to this section

Specifies whether the chart highlights the hovered data point of this series with an active point dot. Range-style series override this to false - a single dot cannot represent their value range.

Declaration
public bool ShowActivePoint { get; }
Property Value
Type Description
boolSpecifies whether the chart highlights the hovered data point of this series with an active point dot. Range-style series override this to false - a single dot cannot represent their value range.

ShowInLegendLink to this section

Declaration
public bool ShowInLegend { get; }
Property Value
Type Description
bool

ShowLineInLegendLink to this section

Specifies whether the legend swatch displays a line indicator instead of a filled marker. Overridden by line series.

Declaration
protected bool ShowLineInLegend { get; }
Property Value
Type Description
boolSpecifies whether the legend swatch displays a line indicator instead of a filled marker. Overridden by line series.

TitleLink to this section

Declaration
public string Title { get; set; }
Property Value
Type Description
string

TooltipTemplateLink to this section

Gets or sets the tooltip template.

Declaration
public RenderFragment<TItem> TooltipTemplate { get; set; }
Property Value
Type Description
RenderFragment<TItem>Gets or sets the tooltip template.

ValueAxisNameLink to this section

Gets or sets the name of the value axis this series is bound to. When null or empty, the series uses the primary (default) axis.

Declaration
public string ValueAxisName { get; set; }
Property Value
Type Description
stringGets or sets the name of the value axis this series is bound to. When null or empty, the series uses the primary (default) axis.

ValuePropertyLink to this section

The name of the property of TItem that provides the Y axis (a.k.a. value axis) values.

Declaration
public string ValueProperty { get; set; }
Property Value
Type Description
stringThe name of the property of TItem that provides the Y axis (a.k.a. value axis) values.

VisibleLink to this section

Gets or sets a value indicating whether this CartesianSeries<T> is visible. Invisible series do not appear in the legend and cannot be shown by the user. Use the Visible property to programatically show or hide a series.

Declaration
public bool Visible { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether this CartesianSeries<T> is visible. Invisible series do not appear in the legend and cannot be shown by the user. Use the Visible property to programatically show or hide a series.

Methods

ComposeCategoryLink to this section

Helper function. Used internally.

Declaration
protected Func<TItem, double> ComposeCategory(ScaleBase scale)
Parameters
Type Name Description
ScaleBase scale
Returns
Type Description
Func<TItem, double>

ComposeValueLink to this section

Helper function. Used internally.

Declaration
protected Func<TItem, double> ComposeValue(ScaleBase scale)
Parameters
Type Name Description
ScaleBase scale
Returns
Type Description
Func<TItem, double>

ContainsLink to this section

Declaration
public virtual bool Contains(double x, double y, double tolerance)
Parameters
Type Name Description
double x
double y
double tolerance
Returns
Type Description
bool

DataAtLink to this section

Declaration
public virtual ValueTuple<object, Point> DataAt(double x, double y)
Parameters
Type Name Description
double x
double y
Returns
Type Description
ValueTuple<object, Point>

DisposeLink to this section

Declaration
public void Dispose()

GetCategoriesLink to this section

Returns the category values

Declaration
protected virtual IList<object> GetCategories()
Returns
Type Description
IList<object>

GetDataLabelsLink to this section

Declaration
public virtual IEnumerable<Rendering.ChartDataLabel> GetDataLabels(double offsetX, double offsetY)
Parameters
Type Name Description
double offsetX
double offsetY
Returns
Type Description
IEnumerable<Rendering.ChartDataLabel>

GetDataLabelsLink to this section

Declaration
public virtual IEnumerable<Rendering.ChartDataLabel> GetDataLabels(double offsetX, double offsetY, DataLabelPosition position)
Parameters
Type Name Description
double offsetX
double offsetY
DataLabelPosition position
Returns
Type Description
IEnumerable<Rendering.ChartDataLabel>

GetMeanLink to this section

Declaration
public double GetMean()
Returns
Type Description
double

GetMedianLink to this section

Declaration
public double GetMedian()
Returns
Type Description
double

GetModeLink to this section

Declaration
public double GetMode()
Returns
Type Description
double

GetRawValueGetterLink to this section

Creates a function that returns the raw object value of the ValueProperty (before conversion to double). Used to detect null values in nullable numeric properties.

Declaration
protected Func<TItem, object> GetRawValueGetter()
Returns
Type Description
Func<TItem, object>

GetScaledDataPointsLink to this section

Declaration
public IList<Point> GetScaledDataPoints()
Returns
Type Description
IList<Point>

GetTitleLink to this section

Declaration
public string GetTitle()
Returns
Type Description
string

GetTooltipPositionLink to this section

Declaration
public Point GetTooltipPosition(object data)
Parameters
Type Name Description
object data
Returns
Type Description
Point

GetTrendLink to this section

https://en.wikipedia.org/wiki/Simple_linear_regression#Fitting_the_regression_line

Declaration
public ValueTuple<double, double> GetTrend()
Returns
Type Description
ValueTuple<double, double>

InitializeLink to this section

Declaration
protected override void Initialize()

InsidePolygonLink to this section

Determines if the provided point is inside the provided polygon.

Declaration
protected bool InsidePolygon(Point point, Point[] polygon)
Parameters
Type Name Description
Point point The point.
Point[] polygon The polygon.
Returns
Type Description
booltrue if the polygon contains the point, false otherwise.

InvokeClickLink to this section

Declaration
public Task InvokeClick(EventCallback<SeriesClickEventArgs> handler, object data)
Parameters
Type Name Description
EventCallback<SeriesClickEventArgs> handler
object data
Returns
Type Description
Task

IsDateLink to this section

Determines whether the property with the specified name is DateTime

Declaration
protected bool IsDate(string propertyName)
Parameters
Type Name Description
string propertyName Name of the property.
Returns
Type Description
booltrue if the specified property name is date; otherwise, false.

IsNumericLink to this section

Determines whether the property with the specified name is numeric.

Declaration
protected bool IsNumeric(string propertyName)
Parameters
Type Name Description
string propertyName Name of the property.
Returns
Type Description
booltrue if the specified property name is numeric; otherwise, false.

IsValueNullableLink to this section

Returns true if the ValueProperty type is nullable.

Declaration
protected bool IsValueNullable()
Returns
Type Description
bool

MeasureLegendLink to this section

Declaration
public virtual double MeasureLegend()
Returns
Type Description
double

MeasureLegendItemsLink to this section

Declaration
public virtual IEnumerable<double> MeasureLegendItems()
Returns
Type Description
IEnumerable<double>

PickColorLink to this section

Returns a color from the specified list of colors. Rotates colors.

Declaration
protected string PickColor(int index, IEnumerable<string> colors, string defaultValue, IList<SeriesColorRange> colorRange, double value)
Parameters
Type Name Description
int index The index.
IEnumerable<string> colors The colors.
string defaultValue The default value.
IList<SeriesColorRange> colorRange The color range value.
double value The value of the item.
Returns
Type Description
string

RenderLink to this section

Declaration
public abstract RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Type Name Description
ScaleBase categoryScale
ScaleBase valueScale
Returns
Type Description
RenderFragment

RenderLegendItemLink to this section

Declaration
public virtual RenderFragment RenderLegendItem()
Returns
Type Description
RenderFragment

RenderLegendItemLink to this section

Declaration
protected virtual RenderFragment RenderLegendItem(bool clickable)
Parameters
Type Name Description
bool clickable
Returns
Type Description
RenderFragment

RenderOverlaysLink to this section

Declaration
public RenderFragment RenderOverlays(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Type Name Description
ScaleBase categoryScale
ScaleBase valueScale
Returns
Type Description
RenderFragment

RenderSharedTooltipItemLink to this section

Declaration
public virtual RenderFragment RenderSharedTooltipItem(object category)
Parameters
Type Name Description
object category
Returns
Type Description
RenderFragment

RenderTooltipLink to this section

Declaration
public virtual RenderFragment RenderTooltip(object data)
Parameters
Type Name Description
object data
Returns
Type Description
RenderFragment

RenderTopOverlaysLink to this section

Declaration
public RenderFragment RenderTopOverlays(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Type Name Description
ScaleBase categoryScale
ScaleBase valueScale
Returns
Type Description
RenderFragment

RequireChartLink to this section

Returns the parent RadzenChart instance or throws an InvalidOperationException if not present.

Declaration
protected RadzenChart RequireChart()
Returns
Type Description
RadzenChartThe parent RadzenChart.

SetParametersAsyncLink to this section

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
Task

TooltipClassLink to this section

Gets the tooltip CSS class.

Declaration
protected virtual string TooltipClass(TItem item)
Parameters
Type Name Description
TItem item The item.
Returns
Type Description
string

TooltipLabelLink to this section

Gets the label of the tooltip displayed for this item.

Declaration
protected virtual string TooltipLabel(TItem item)
Parameters
Type Name Description
TItem item The item.
Returns
Type Description
string

TooltipStyleLink to this section

Gets the tooltip inline style.

Declaration
protected virtual string TooltipStyle(TItem item)
Parameters
Type Name Description
TItem item The item.
Returns
Type Description
string

TooltipTitleLink to this section

Gets the title of the tooltip displayed for this item.

Declaration
protected virtual string TooltipTitle(TItem item)
Parameters
Type Name Description
TItem item The item.
Returns
Type Description
string

TooltipValueLink to this section

Gets the value of the tooltip displayed for this item.

Declaration
protected virtual string TooltipValue(TItem item)
Parameters
Type Name Description
TItem item The item.
Returns
Type Description
stringSystem.String.

TransformCategoryScaleLink to this section

Declaration
public virtual ScaleBase TransformCategoryScale(ScaleBase scale)
Parameters
Type Name Description
ScaleBase scale
Returns
Type Description
ScaleBase

TransformValueScaleLink to this section

Declaration
public virtual ScaleBase TransformValueScale(ScaleBase scale)
Parameters
Type Name Description
ScaleBase scale
Returns
Type Description
ScaleBase
An error has occurred. This app may no longer respond until reloaded. Reload 🗙