Table of Contents

Class CartesianSeries<TItem>

Namespace
Radzen.Blazor
Assembly
Radzen.Blazor.dll

Base class of RadzenChart series.

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

Type Parameters

TItem

The type of the series data.

Inheritance
CartesianSeries<TItem>
Implements
Derived
Inherited Members

Constructors

CartesianSeries()

protected CartesianSeries()

Properties

CategoryProperty

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

[Parameter]
public string CategoryProperty { get; set; }

Property Value

string

ChildContent

Gets or sets the child content.

[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

The child content.

Color

public abstract string Color { get; }

Property Value

string

CoordinateSystem

Gets the coordinate system of the series.

public virtual CoordinateSystem CoordinateSystem { get; }

Property Value

CoordinateSystem

Coordinate system enum value.

Data

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

[Parameter]
public IEnumerable<TItem> Data { get; set; }

Property Value

IEnumerable<TItem>

The data.

Hidden

Gets or sets a value indicating whether this CartesianSeries<TItem> 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.

[Parameter]
public bool Hidden { get; set; }

Property Value

bool

true if hidden; otherwise, false.

Items

Stores Data as an IList of TItem.

protected IList<TItem> Items { get; set; }

Property Value

IList<TItem>

The items.

MarkerSize

public double MarkerSize { get; }

Property Value

double

MarkerType

public virtual MarkerType MarkerType { get; }

Property Value

MarkerType

Markers

public RadzenMarkers Markers { get; set; }

Property Value

RadzenMarkers

Overlays

Gets the list of overlays.

public IList<IChartSeriesOverlay> Overlays { get; }

Property Value

IList<IChartSeriesOverlay>

The Overlays list.

RenderingOrder

[Parameter]
public int RenderingOrder { get; set; }

Property Value

int

ShowInLegend

public bool ShowInLegend { get; }

Property Value

bool

Title

[Parameter]
public string Title { get; set; }

Property Value

string

TooltipTemplate

Gets or sets the tooltip template.

[Parameter]
public RenderFragment<TItem> TooltipTemplate { get; set; }

Property Value

RenderFragment<TItem>

The tooltip template.

ValueProperty

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

[Parameter]
public string ValueProperty { get; set; }

Property Value

string

Visible

Gets or sets a value indicating whether this CartesianSeries<TItem> 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.

[Parameter]
public bool Visible { get; set; }

Property Value

bool

true if visible; otherwise, false.

Methods

ComposeCategory(ScaleBase)

Helper function. Used internally.

protected Func<TItem, double> ComposeCategory(ScaleBase scale)

Parameters

scale ScaleBase

Returns

Func<TItem, double>

ComposeValue(ScaleBase)

Helper function. Used internally.

protected Func<TItem, double> ComposeValue(ScaleBase scale)

Parameters

scale ScaleBase

Returns

Func<TItem, double>

Contains(double, double, double)

public virtual bool Contains(double x, double y, double tolerance)

Parameters

x double
y double
tolerance double

Returns

bool

DataAt(double, double)

public virtual (object, Point) DataAt(double x, double y)

Parameters

x double
y double

Returns

(object, Point)

Dispose()

public void Dispose()

GetCategories()

Returns the category values

protected virtual IList<object> GetCategories()

Returns

IList<object>

GetDataLabels(double, double)

public virtual IEnumerable<ChartDataLabel> GetDataLabels(double offsetX, double offsetY)

Parameters

offsetX double
offsetY double

Returns

IEnumerable<ChartDataLabel>

GetMean()

public double GetMean()

Returns

double

GetMedian()

public double GetMedian()

Returns

double

GetMode()

public double GetMode()

Returns

double

GetTitle()

public string GetTitle()

Returns

string

GetTrend()

public (double a, double b) GetTrend()

Returns

(double a, double b)

Initialize()

protected override void Initialize()

InsidePolygon(Point, Point[])

Determines if the provided point is inside the provided polygon.

protected bool InsidePolygon(Point point, Point[] polygon)

Parameters

point Point

The point.

polygon Point[]

The polygon.

Returns

bool

true if the polygon contains the point, false otherwise.

InvokeClick(EventCallback<SeriesClickEventArgs>, object)

public Task InvokeClick(EventCallback<SeriesClickEventArgs> handler, object data)

Parameters

handler EventCallback<SeriesClickEventArgs>
data object

Returns

Task

IsDate(string)

Determines whether the property with the specified name is DateTime

protected bool IsDate(string propertyName)

Parameters

propertyName string

Name of the property.

Returns

bool

true if the specified property name is date; otherwise, false.

Exceptions

ArgumentException

Property {propertyName} does not exist

IsNumeric(string)

Determines whether the property with the specified name is numeric.

protected bool IsNumeric(string propertyName)

Parameters

propertyName string

Name of the property.

Returns

bool

true if the specified property name is numeric; otherwise, false.

Exceptions

ArgumentException

Property {propertyName} does not exist

MeasureLegend()

public virtual double MeasureLegend()

Returns

double

PickColor(int, IEnumerable<string>, string, IList<SeriesColorRange>, double)

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

protected string PickColor(int index, IEnumerable<string> colors, string defaultValue = null, IList<SeriesColorRange> colorRange = null, double value = 0)

Parameters

index int

The index.

colors IEnumerable<string>

The colors.

defaultValue string

The default value.

colorRange IList<SeriesColorRange>

The color range value.

value double

The value of the item.

Returns

string

Render(ScaleBase, ScaleBase)

public abstract RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)

Parameters

categoryScale ScaleBase
valueScale ScaleBase

Returns

RenderFragment

RenderLegendItem()

public virtual RenderFragment RenderLegendItem()

Returns

RenderFragment

RenderOverlays(ScaleBase, ScaleBase)

public RenderFragment RenderOverlays(ScaleBase categoryScale, ScaleBase valueScale)

Parameters

categoryScale ScaleBase
valueScale ScaleBase

Returns

RenderFragment

RenderTooltip(object, double, double, double)

public virtual RenderFragment RenderTooltip(object data, double marginLeft, double marginTop, double chartHeight)

Parameters

data object
marginLeft double
marginTop double
chartHeight double

Returns

RenderFragment

SetParametersAsync(ParameterView)

public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters ParameterView

Returns

Task

TooltipClass(TItem)

Gets the tooltip CSS class.

protected virtual string TooltipClass(TItem item)

Parameters

item TItem

The item.

Returns

string

TooltipLabel(TItem)

Gets the label of the tooltip displayed for this item.

protected virtual string TooltipLabel(TItem item)

Parameters

item TItem

The item.

Returns

string

TooltipStyle(TItem)

Gets the tooltip inline style.

protected virtual string TooltipStyle(TItem item)

Parameters

item TItem

The item.

Returns

string

TooltipTitle(TItem)

Gets the title of the tooltip displayed for this item.

protected virtual string TooltipTitle(TItem item)

Parameters

item TItem

The item.

Returns

string

TooltipValue(TItem)

Gets the value of the tooltip displayed for this item.

protected virtual string TooltipValue(TItem item)

Parameters

item TItem

The item.

Returns

string

System.String.

TransformCategoryScale(ScaleBase)

public virtual ScaleBase TransformCategoryScale(ScaleBase scale)

Parameters

scale ScaleBase

Returns

ScaleBase

TransformValueScale(ScaleBase)

public virtual ScaleBase TransformValueScale(ScaleBase scale)

Parameters

scale ScaleBase

Returns

ScaleBase