CartesianSeries<TItem> Class

Base class of RadzenChart series.

Inheritance

Object

ComponentBase

RadzenChartComponentBase

CartesianSeries<TItem>

Implements

IComponent

IHandleEvent

IHandleAfterRender

IChartSeries

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

Type Parameters

Name Description
TItemThe type of the series data.

Constructors

CartesianSeries<TItem>link

Base class of RadzenChart series.

Declaration
protected CartesianSeries<TItem>()

Properties

CategoryPropertylink

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

Gets or sets the child content.

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

Colorlink

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

CoordinateSystemlink

Gets the coordinate system of the series.

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

Datalink

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

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

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

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

MarkerTypelink

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

Markerslink

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

Overlayslink

Gets the list of overlays.

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

RenderingOrderlink

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

ShowInLegendlink

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

Titlelink

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

TooltipTemplatelink

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.

ValuePropertylink

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

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

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

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

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

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

Declaration
public void Dispose()

GetCategorieslink

Returns the category values

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

GetDataLabelslink

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>

GetMeanlink

Declaration
public double GetMean()
Returns
Type Description
double

GetMedianlink

Declaration
public double GetMedian()
Returns
Type Description
double

GetModelink

Declaration
public double GetMode()
Returns
Type Description
double

GetRawValueGetterlink

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>

GetTitlelink

Declaration
public string GetTitle()
Returns
Type Description
string

GetTooltipPositionlink

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

GetTrendlink

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

Declaration
protected override void Initialize()

InsidePolygonlink

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

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

IsDatelink

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

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

Returns true if the ValueProperty type is nullable.

Declaration
protected bool IsValueNullable()
Returns
Type Description
bool

MeasureLegendlink

Declaration
public virtual double MeasureLegend()
Returns
Type Description
double

PickColorlink

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

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

RenderLegendItemlink

Declaration
public virtual RenderFragment RenderLegendItem()
Returns
Type Description
RenderFragment

RenderLegendItemlink

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

RenderOverlayslink

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

RenderSharedTooltipItemlink

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

RenderTooltiplink

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

RequireChartlink

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

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

SetParametersAsynclink

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

TooltipClasslink

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

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

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

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

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

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

TransformValueScalelink

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 🗙