Class CartesianSeries<TItem>
Base class of RadzenChart series.
Inheritance
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public abstract class CartesianSeries<TItem> : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartSeries, IDisposable
Type Parameters
| Name | Description |
|---|---|
| TItem | The type of the series data. |
Constructors
CartesianSeries()
Base class of RadzenChart series.
Declaration
protected CartesianSeries()
Properties
CategoryProperty
The name of the property of TItem that provides the X axis (a.k.a. category axis) values.
Declaration
[Parameter]
public string CategoryProperty { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ChildContent
Gets or sets the child content.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment | The child content. |
Color
Gets the color.
Declaration
public abstract string Color { get; }
Property Value
| Type | Description |
|---|---|
| string | The color. |
CoordinateSystem
Gets the coordinate system of the series.
Declaration
public virtual CoordinateSystem CoordinateSystem { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
[Parameter]
public IEnumerable<TItem> Data { get; set; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
[Parameter]
public bool Hidden { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Items
Stores Data as an IList of TItem.
Declaration
protected IList<TItem> Items { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<TItem> | The items. |
MarkerSize
Gets the size of the marker.
Declaration
public double MarkerSize { get; }
Property Value
| Type | Description |
|---|---|
| double | The size of the marker. |
MarkerType
Gets the series marker type.
Declaration
public virtual MarkerType MarkerType { get; }
Property Value
| Type | Description |
|---|---|
| MarkerType | The type of the marker. |
Markers
Gets or sets the series marker configuration.
Declaration
public RadzenMarkers Markers { get; set; }
Property Value
| Type | Description |
|---|---|
| RadzenMarkers |
Overlays
Gets the list of overlays.
Declaration
public IList<IChartSeriesOverlay> Overlays { get; }
Property Value
| Type | Description |
|---|---|
| IList<IChartSeriesOverlay> | The Overlays list. |
RenderingOrder
Gets or sets the rendering order.
Declaration
[Parameter]
public int RenderingOrder { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The rendering order. |
ShowInLegend
Gets a value indicating whether this series should appear in the legend.
Declaration
public bool ShowInLegend { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Title
Gets or sets the title of the series. The title is displayed in tooltips and the legend.
Declaration
[Parameter]
public string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The title. |
TooltipTemplate
Gets or sets the tooltip template.
Declaration
[Parameter]
public RenderFragment<TItem> TooltipTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment<TItem> | The tooltip template. |
ValueProperty
The name of the property of TItem that provides the Y axis (a.k.a. value axis) values.
Declaration
[Parameter]
public string ValueProperty { get; set; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
[Parameter]
public bool Visible { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Methods
ComposeCategory(ScaleBase)
Helper function. Used internally.
Declaration
protected Func<TItem, double> ComposeCategory(ScaleBase scale)
Parameters
| Type | Name | Description |
|---|---|---|
| ScaleBase | scale |
Returns
| Type | Description |
|---|---|
| Func<TItem, double> |
ComposeValue(ScaleBase)
Helper function. Used internally.
Declaration
protected Func<TItem, double> ComposeValue(ScaleBase scale)
Parameters
| Type | Name | Description |
|---|---|---|
| ScaleBase | scale |
Returns
| Type | Description |
|---|---|
| Func<TItem, double> |
Contains(double, double, double)
Determines if the series contains the specified coordinates with a given tolerance.
Declaration
public virtual bool Contains(double x, double y, double tolerance)
Parameters
| Type | Name | Description |
|---|---|---|
| double | x | The x. |
| double | y | The y. |
| double | tolerance | The tolerance. |
Returns
| Type | Description |
|---|---|
| bool |
|
DataAt(double, double)
Returns the data at the specified coordinates;
Declaration
public virtual (object, Point) DataAt(double x, double y)
Parameters
| Type | Name | Description |
|---|---|---|
| double | x | The x. |
| double | y | The y. |
Returns
| Type | Description |
|---|---|
| (object, Point) |
Dispose()
Base class of RadzenChart series.
Declaration
public void Dispose()
GetCategories()
Returns the category values
Declaration
protected virtual IList<object> GetCategories()
Returns
| Type | Description |
|---|---|
| IList<object> |
GetDataLabels(double, double)
Returns data chart position
Declaration
public virtual IEnumerable<ChartDataLabel> GetDataLabels(double offsetX, double offsetY)
Parameters
| Type | Name | Description |
|---|---|---|
| double | offsetX | |
| double | offsetY |
Returns
| Type | Description |
|---|---|
| IEnumerable<ChartDataLabel> |
GetMean()
Returns series mean
Declaration
public double GetMean()
Returns
| Type | Description |
|---|---|
| double |
GetMedian()
Returns series median
Declaration
public double GetMedian()
Returns
| Type | Description |
|---|---|
| double |
GetMode()
Returns series mode
Declaration
public double GetMode()
Returns
| Type | Description |
|---|---|
| double |
GetTitle()
Gets the title.
Declaration
public string GetTitle()
Returns
| Type | Description |
|---|---|
| string |
GetTooltipPosition(object)
Get position of the series tooltip.
Declaration
public Point GetTooltipPosition(object data)
Parameters
| Type | Name | Description |
|---|---|---|
| object | data | The data. |
Returns
| Type | Description |
|---|---|
| Point | Position. |
GetTrend()
Declaration
public (double a, double b) GetTrend()
Returns
| Type | Description |
|---|---|
| (double a, double b) |
Initialize()
Perform initialization when Chart is set.
Declaration
protected override void Initialize()
Overrides
InsidePolygon(Point, Point[])
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 |
|---|---|
| bool |
|
InvokeClick(EventCallback<SeriesClickEventArgs>, object)
Invokes the click handler with the provided data item.
Declaration
public Task InvokeClick(EventCallback<SeriesClickEventArgs> handler, object data)
Parameters
| Type | Name | Description |
|---|---|---|
| EventCallback<SeriesClickEventArgs> | handler | The handler. |
| object | data | The data. |
Returns
| Type | Description |
|---|---|
| Task |
IsDate(string)
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 |
|---|---|
| bool |
|
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Property {propertyName} does not exist |
IsNumeric(string)
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 |
|---|---|
| bool |
|
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Property {propertyName} does not exist |
MeasureLegend()
Measures the legend.
Declaration
public virtual double MeasureLegend()
Returns
| Type | Description |
|---|---|
| double | System.Double. |
PickColor(int, IEnumerable<string>, string, IList<SeriesColorRange>, double)
Returns a color from the specified list of colors. Rotates colors.
Declaration
protected string PickColor(int index, IEnumerable<string> colors, string defaultValue = null, IList<SeriesColorRange> colorRange = null, double value = 0)
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 |
Render(ScaleBase, ScaleBase)
Renders the series with the specified category and value scales.
Declaration
public abstract RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
| Type | Name | Description |
|---|---|---|
| ScaleBase | categoryScale | The category scale. |
| ScaleBase | valueScale | The value scale. |
Returns
| Type | Description |
|---|---|
| RenderFragment | RenderFragment. |
RenderLegendItem()
Renders the legend item.
Declaration
public virtual RenderFragment RenderLegendItem()
Returns
| Type | Description |
|---|---|
| RenderFragment | RenderFragment. |
RenderLegendItem(bool)
Renders the legend item for this series.
Declaration
protected virtual RenderFragment RenderLegendItem(bool clickable)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | clickable |
Returns
| Type | Description |
|---|---|
| RenderFragment |
RenderOverlays(ScaleBase, ScaleBase)
Renders the series overlays with the specified category and value scales.
Declaration
public RenderFragment RenderOverlays(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
| Type | Name | Description |
|---|---|---|
| ScaleBase | categoryScale | The category scale. |
| ScaleBase | valueScale | The value scale. |
Returns
| Type | Description |
|---|---|
| RenderFragment | RenderFragment. |
RenderSharedTooltipItem(object)
Renders a tooltip item with the specified data to be displayed in a shared tooltip
Declaration
public virtual RenderFragment RenderSharedTooltipItem(object category)
Parameters
| Type | Name | Description |
|---|---|---|
| object | category |
Returns
| Type | Description |
|---|---|
| RenderFragment |
RenderTooltip(object)
Renders the series tooltip.
Declaration
public virtual RenderFragment RenderTooltip(object data)
Parameters
| Type | Name | Description |
|---|---|---|
| object | data | The data. |
Returns
| Type | Description |
|---|---|
| RenderFragment | RenderFragment. |
SetParametersAsync(ParameterView)
Base class of RadzenChart series.
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
TooltipClass(TItem)
Gets the tooltip CSS class.
Declaration
protected virtual string TooltipClass(TItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
Returns
| Type | Description |
|---|---|
| string |
TooltipLabel(TItem)
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 |
TooltipStyle(TItem)
Gets the tooltip inline style.
Declaration
protected virtual string TooltipStyle(TItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
Returns
| Type | Description |
|---|---|
| string |
TooltipTitle(TItem)
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 |
TooltipValue(TItem)
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 |
|---|---|
| string | System.String. |
TransformCategoryScale(ScaleBase)
Transforms a category scale to new one.
Declaration
public virtual ScaleBase TransformCategoryScale(ScaleBase scale)
Parameters
| Type | Name | Description |
|---|---|---|
| ScaleBase | scale | The scale. |
Returns
| Type | Description |
|---|---|
| ScaleBase |
TransformValueScale(ScaleBase)
Transforms a category scale to new one.
Declaration
public virtual ScaleBase TransformValueScale(ScaleBase scale)
Parameters
| Type | Name | Description |
|---|---|---|
| ScaleBase | scale | The scale. |
Returns
| Type | Description |
|---|---|
| ScaleBase |