Class CartesianSeries<TItem>
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
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
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
MarkerType
public virtual MarkerType MarkerType { get; }
Property Value
Markers
public RadzenMarkers Markers { get; set; }
Property Value
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
ShowInLegend
public bool ShowInLegend { get; }
Property Value
Title
[Parameter]
public string Title { get; set; }
Property Value
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
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
ComposeValue(ScaleBase)
Helper function. Used internally.
protected Func<TItem, double> ComposeValue(ScaleBase scale)
Parameters
scale
ScaleBase
Returns
Contains(double, double, double)
public virtual bool Contains(double x, double y, double tolerance)
Parameters
Returns
DataAt(double, double)
public virtual (object, Point) DataAt(double x, double y)
Parameters
Returns
Dispose()
public void Dispose()
GetCategories()
Returns the category values
protected virtual IList<object> GetCategories()
Returns
GetDataLabels(double, double)
public virtual IEnumerable<ChartDataLabel> GetDataLabels(double offsetX, double offsetY)
Parameters
Returns
GetMean()
public double GetMean()
Returns
GetMedian()
public double GetMedian()
Returns
GetMode()
public double GetMode()
Returns
GetTitle()
public string GetTitle()
Returns
GetTrend()
public (double a, double b) GetTrend()
Returns
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
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
IsDate(string)
Determines whether the property with the specified name is DateTime
protected bool IsDate(string propertyName)
Parameters
propertyName
stringName 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
stringName 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
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
intThe index.
colors
IEnumerable<string>The colors.
defaultValue
stringThe default value.
colorRange
IList<SeriesColorRange>The color range value.
value
doubleThe value of the item.
Returns
Render(ScaleBase, ScaleBase)
public abstract RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Returns
RenderLegendItem()
public virtual RenderFragment RenderLegendItem()
Returns
RenderOverlays(ScaleBase, ScaleBase)
public RenderFragment RenderOverlays(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Returns
RenderTooltip(object, double, double, double)
public virtual RenderFragment RenderTooltip(object data, double marginLeft, double marginTop, double chartHeight)
Parameters
Returns
SetParametersAsync(ParameterView)
public override Task SetParametersAsync(ParameterView parameters)
Parameters
parameters
ParameterView
Returns
TooltipClass(TItem)
Gets the tooltip CSS class.
protected virtual string TooltipClass(TItem item)
Parameters
item
TItemThe item.
Returns
TooltipLabel(TItem)
Gets the label of the tooltip displayed for this item.
protected virtual string TooltipLabel(TItem item)
Parameters
item
TItemThe item.
Returns
TooltipStyle(TItem)
Gets the tooltip inline style.
protected virtual string TooltipStyle(TItem item)
Parameters
item
TItemThe item.
Returns
TooltipTitle(TItem)
Gets the title of the tooltip displayed for this item.
protected virtual string TooltipTitle(TItem item)
Parameters
item
TItemThe item.
Returns
TooltipValue(TItem)
Gets the value of the tooltip displayed for this item.
protected virtual string TooltipValue(TItem item)
Parameters
item
TItemThe item.
Returns
- string
System.String.
TransformCategoryScale(ScaleBase)
public virtual ScaleBase TransformCategoryScale(ScaleBase scale)
Parameters
scale
ScaleBase
Returns
TransformValueScale(ScaleBase)
public virtual ScaleBase TransformValueScale(ScaleBase scale)
Parameters
scale
ScaleBase