Base class of RadzenChart series.
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
public abstract class CartesianSeries<TItem> : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartSeries, IChartValueAxisSeries| Name | Description |
|---|---|
| TItem | The type of the series data. |
Base class of RadzenChart series.
protected CartesianSeries<TItem>()The name of the property of TItem that provides the X axis (a.k.a. category axis) values.
public string CategoryProperty { get; set; }
| Type | Description |
|---|---|
| string | The name of the property of TItem that provides the X axis (a.k.a. category axis) values. |
Gets or sets the child content.
public RenderFragment ChildContent { get; set; }
| Type | Description |
|---|---|
| RenderFragment | Gets or sets the child content. |
public string Color { get; }
| Type | Description |
|---|---|
| string |
Gets the coordinate system of the series.
public CoordinateSystem CoordinateSystem { get; }
| Type | Description |
|---|---|
| CoordinateSystem | Gets the coordinate system of the series. |
Gets or sets the data of the series. The data is enumerated and its items are displayed by the series.
public IEnumerable<TItem> Data { get; set; }
| Type | Description |
|---|---|
| IEnumerable<TItem> | Gets or sets the data of the series. The data is enumerated and its items are displayed by the series. |
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.
public bool Hidden { get; set; }
| Type | Description |
|---|---|
| bool | 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. |
Stores Data as an IList of TItem.
protected IList<TItem> Items { get; set; }
| Type | Description |
|---|---|
| IList<TItem> | Stores Data as an IList of TItem. |
public double MarkerSize { get; }
| Type | Description |
|---|---|
| double |
public MarkerType MarkerType { get; }
| Type | Description |
|---|---|
| MarkerType |
public RadzenMarkers Markers { get; set; }
| Type | Description |
|---|---|
| RadzenMarkers |
Gets the list of overlays.
public IList<IChartSeriesOverlay> Overlays { get; }
| Type | Description |
|---|---|
| IList<IChartSeriesOverlay> | Gets the list of overlays. |
public int RenderingOrder { get; set; }
| Type | Description |
|---|---|
| int |
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.
public bool ShowActivePoint { get; }
| Type | Description |
|---|---|
| bool | 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. |
public bool ShowInLegend { get; }
| Type | Description |
|---|---|
| bool |
Specifies whether the legend swatch displays a line indicator instead of a filled marker. Overridden by line series.
protected bool ShowLineInLegend { get; }
| Type | Description |
|---|---|
| bool | Specifies whether the legend swatch displays a line indicator instead of a filled marker. Overridden by line series. |
public string Title { get; set; }
| Type | Description |
|---|---|
| string |
Gets or sets the tooltip template.
public RenderFragment<TItem> TooltipTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment<TItem> | Gets or sets the tooltip template. |
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.
public string ValueAxisName { get; set; }
| Type | Description |
|---|---|
| string | 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. |
The name of the property of TItem that provides the Y axis (a.k.a. value axis) values.
public string ValueProperty { get; set; }
| Type | Description |
|---|---|
| string | The name of the property of TItem that provides the Y axis (a.k.a. value axis) values. |
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.
public bool Visible { get; set; }
| Type | Description |
|---|---|
| bool | 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. |
Helper function. Used internally.
protected Func<TItem, double> ComposeCategory(ScaleBase scale)
| Type | Name | Description |
|---|---|---|
| ScaleBase | scale |
| Type | Description |
|---|---|
| Func<TItem, double> |
Helper function. Used internally.
protected Func<TItem, double> ComposeValue(ScaleBase scale)
| Type | Name | Description |
|---|---|---|
| ScaleBase | scale |
| Type | Description |
|---|---|
| Func<TItem, double> |
public virtual bool Contains(double x, double y, double tolerance)
| Type | Name | Description |
|---|---|---|
| double | x | |
| double | y | |
| double | tolerance |
| Type | Description |
|---|---|
| bool |
public virtual ValueTuple<object, Point> DataAt(double x, double y)
| Type | Name | Description |
|---|---|---|
| double | x | |
| double | y |
| Type | Description |
|---|---|
| ValueTuple<object, Point> |
Returns the category values
protected virtual IList<object> GetCategories()
| Type | Description |
|---|---|
| IList<object> |
public virtual IEnumerable<Rendering.ChartDataLabel> GetDataLabels(double offsetX, double offsetY)
| Type | Name | Description |
|---|---|---|
| double | offsetX | |
| double | offsetY |
| Type | Description |
|---|---|
| IEnumerable<Rendering.ChartDataLabel> |
public virtual IEnumerable<Rendering.ChartDataLabel> GetDataLabels(double offsetX, double offsetY, DataLabelPosition position)
| Type | Name | Description |
|---|---|---|
| double | offsetX | |
| double | offsetY | |
| DataLabelPosition | position |
| Type | Description |
|---|---|
| IEnumerable<Rendering.ChartDataLabel> |
public double GetMedian()
| Type | Description |
|---|---|
| double |
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.
protected Func<TItem, object> GetRawValueGetter()
| Type | Description |
|---|---|
| Func<TItem, object> |
public IList<Point> GetScaledDataPoints()
| Type | Description |
|---|---|
| IList<Point> |
public string GetTitle()
| Type | Description |
|---|---|
| string |
public Point GetTooltipPosition(object data)
| Type | Name | Description |
|---|---|---|
| object | data |
| Type | Description |
|---|---|
| Point |
https://en.wikipedia.org/wiki/Simple_linear_regression#Fitting_the_regression_line
public ValueTuple<double, double> GetTrend()
| Type | Description |
|---|---|
| ValueTuple<double, double> |
Determines if the provided point is inside the provided polygon.
protected bool InsidePolygon(Point point, Point[] polygon)
| Type | Name | Description |
|---|---|---|
| Point | point | The point. |
| Point[] | polygon | The polygon. |
| Type | Description |
|---|---|
| bool | true if the polygon contains the point, false otherwise. |
public Task InvokeClick(EventCallback<SeriesClickEventArgs> handler, object data)
| Type | Name | Description |
|---|---|---|
| EventCallback<SeriesClickEventArgs> | handler | |
| object | data |
| Type | Description |
|---|---|
| Task |
Determines whether the property with the specified name is DateTime
protected bool IsDate(string propertyName)
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property. |
| Type | Description |
|---|---|
| bool | true if the specified property name is date; otherwise, false. |
Determines whether the property with the specified name is numeric.
protected bool IsNumeric(string propertyName)
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property. |
| Type | Description |
|---|---|
| bool | true if the specified property name is numeric; otherwise, false. |
Returns true if the ValueProperty type is nullable.
protected bool IsValueNullable()
| Type | Description |
|---|---|
| bool |
public virtual double MeasureLegend()
| Type | Description |
|---|---|
| double |
public virtual IEnumerable<double> MeasureLegendItems()
| Type | Description |
|---|---|
| IEnumerable<double> |
Returns a color from the specified list of colors. Rotates colors.
protected string PickColor(int index, IEnumerable<string> colors, string defaultValue, IList<SeriesColorRange> colorRange, double value)
| 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. |
| Type | Description |
|---|---|
| string |
public abstract RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
| Type | Description |
|---|---|
| RenderFragment |
public virtual RenderFragment RenderLegendItem()
| Type | Description |
|---|---|
| RenderFragment |
protected virtual RenderFragment RenderLegendItem(bool clickable)
| Type | Name | Description |
|---|---|---|
| bool | clickable |
| Type | Description |
|---|---|
| RenderFragment |
public RenderFragment RenderOverlays(ScaleBase categoryScale, ScaleBase valueScale)
| Type | Description |
|---|---|
| RenderFragment |
public virtual RenderFragment RenderTooltip(object data)
| Type | Name | Description |
|---|---|---|
| object | data |
| Type | Description |
|---|---|
| RenderFragment |
public RenderFragment RenderTopOverlays(ScaleBase categoryScale, ScaleBase valueScale)
| Type | Description |
|---|---|
| RenderFragment |
Returns the parent RadzenChart instance or throws an InvalidOperationException if not present.
protected RadzenChart RequireChart()
| Type | Description |
|---|---|
| RadzenChart | The parent RadzenChart. |
public override Task SetParametersAsync(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
| Type | Description |
|---|---|
| Task |
Gets the tooltip CSS class.
protected virtual string TooltipClass(TItem item)
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
| Type | Description |
|---|---|
| string |
Gets the label of the tooltip displayed for this item.
protected virtual string TooltipLabel(TItem item)
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
| Type | Description |
|---|---|
| string |
Gets the tooltip inline style.
protected virtual string TooltipStyle(TItem item)
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
| Type | Description |
|---|---|
| string |
Gets the title of the tooltip displayed for this item.
protected virtual string TooltipTitle(TItem item)
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
| Type | Description |
|---|---|
| string |
Gets the value of the tooltip displayed for this item.
protected virtual string TooltipValue(TItem item)
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
| Type | Description |
|---|---|
| string | System.String. |
public virtual ScaleBase TransformCategoryScale(ScaleBase scale)
| Type | Name | Description |
|---|---|---|
| ScaleBase | scale |
| Type | Description |
|---|---|
| ScaleBase |
public virtual ScaleBase TransformValueScale(ScaleBase scale)
| Type | Name | Description |
|---|---|---|
| ScaleBase | scale |
| Type | Description |
|---|---|
| ScaleBase |