AxisBase Class

Base class for an axis in RadzenChart.

Inheritance

Implements

IComponent

IHandleEvent

IHandleAfterRender

IChartAxis

Inherited Members

RadzenChartComponentBase.Initialize

RadzenChartComponentBase.SetParametersAsync

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 AxisBase : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartAxis

Constructors

AxisBaseLink to this section

Base class for an axis in RadzenChart.

Declaration
protected AxisBase()

Properties

ChildContentLink to this section

Gets or sets the child content.

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

CrossesAtLink to this section

Specifies the value on the perpendicular axis where this axis should cross. When set, the axis line and ticks are positioned at the corresponding location instead of the chart edge. For example, setting CrossesAt="0" on the category axis positions it where 0 is on the value axis.

Declaration
public object CrossesAt { get; set; }
Property Value
Type Description
objectSpecifies the value on the perpendicular axis where this axis should cross. When set, the axis line and ticks are positioned at the corresponding location instead of the chart edge. For example, setting CrossesAt="0" on the category axis positions it where 0 is on the value axis.

CrosshairLink to this section

Gets or sets the crosshair configuration of the current axis.

Declaration
public RadzenAxisCrosshair Crosshair { get; set; }
Property Value
Type Description
RadzenAxisCrosshairGets or sets the crosshair configuration of the current axis.

FormatStringLink to this section

Gets or sets the format string used to display the axis values.

Declaration
public string FormatString { get; set; }
Property Value
Type Description
stringGets or sets the format string used to display the axis values.

FormatterLink to this section

Gets or sets a formatter function that formats the axis values.

Declaration
public Func<object, string> Formatter { get; set; }
Property Value
Type Description
Func<object, string>Gets or sets a formatter function that formats the axis values.

GridLinesLink to this section

Gets or sets the grid lines configuration of the current axis.

Declaration
public RadzenGridLines GridLines { get; set; }
Property Value
Type Description
RadzenGridLinesGets or sets the grid lines configuration of the current axis.

InvertedLink to this section

Gets or sets a value indicating whether this axis is inverted. When true, the axis direction is reversed: values increase in the opposite visual direction and categories are displayed in reverse order.

Declaration
public bool Inverted { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether this axis is inverted. When true, the axis direction is reversed: values increase in the opposite visual direction and categories are displayed in reverse order.

LabelAutoRotationLink to this section

Specifies the automatic label rotation angle in degrees. If set RadzenChart will automatically rotate the labels to fit the available space by the specified value. Has lower precedence than LabelRotation.

Declaration
public double? LabelAutoRotation { get; set; }
Property Value
Type Description
double?Specifies the automatic label rotation angle in degrees. If set RadzenChart will automatically rotate the labels to fit the available space by the specified value. Has lower precedence than LabelRotation.

LabelRotationLink to this section

Specifies the label rotation angle in degrees. Set to null by default which means no rotation is applied. Has higher precedence than LabelAutoRotation.

Declaration
public double? LabelRotation { get; set; }
Property Value
Type Description
double?Specifies the label rotation angle in degrees. Set to null by default which means no rotation is applied. Has higher precedence than LabelAutoRotation.

LineTypeLink to this section

Gets or sets the type of the line used to display the axis.

Declaration
public LineType LineType { get; set; }
Property Value
Type Description
LineTypeGets or sets the type of the line used to display the axis.

LogarithmicLink to this section

Gets or sets a value indicating whether this axis uses a logarithmic scale. When true, the axis displays values on a logarithmic scale (base 10 by default). Only positive values are supported. Set LogarithmicBase to change the base.

Declaration
public bool Logarithmic { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether this axis uses a logarithmic scale. When true, the axis displays values on a logarithmic scale (base 10 by default). Only positive values are supported. Set LogarithmicBase to change the base.

LogarithmicBaseLink to this section

Gets or sets the base of the logarithmic scale. Default is 10. Only used when Logarithmic is true.

Declaration
public double LogarithmicBase { get; set; }
Property Value
Type Description
doubleGets or sets the base of the logarithmic scale. Default is 10. Only used when Logarithmic is true.

MaxLink to this section

Specifies the maximum value of the axis.

Declaration
public object Max { get; set; }
Property Value
Type Description
objectSpecifies the maximum value of the axis.

MinLink to this section

Specifies the minimum value of the axis.

Declaration
public object Min { get; set; }
Property Value
Type Description
objectSpecifies the minimum value of the axis.

StepLink to this section

Specifies the step of the axis.

Declaration
public object Step { get; set; }
Property Value
Type Description
objectSpecifies the step of the axis.

StrokeLink to this section

Gets or sets the stroke (line color) of the axis.

Declaration
public string Stroke { get; set; }
Property Value
Type Description
stringGets or sets the stroke (line color) of the axis.

StrokeWidthLink to this section

Gets or sets the pixel width of axis.

Declaration
public double StrokeWidth { get; set; }
Property Value
Type Description
doubleGets or sets the pixel width of axis.

TickDistanceLink to this section

Gets or sets the pixel distance between axis ticks. It is used to calculate the number of visible ticks depending on the available space. Set to 100 by default; Setting Step will override this value.

Declaration
public int TickDistance { get; set; }
Property Value
Type Description
intGets or sets the pixel distance between axis ticks. It is used to calculate the number of visible ticks depending on the available space. Set to 100 by default; Setting Step will override this value.

TicksLink to this section

Gets or sets the ticks configuration.

Declaration
public RadzenTicks Ticks { get; set; }
Property Value
Type Description
RadzenTicksGets or sets the ticks configuration.

TitleLink to this section

Gets or sets the title configuration.

Declaration
public RadzenAxisTitle Title { get; set; }
Property Value
Type Description
RadzenAxisTitleGets or sets the title configuration.

VisibleLink to this section

Gets or sets a value indicating whether this AxisBase is visible.

Declaration
public bool Visible { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether this AxisBase is visible.

WidthLink to this section

Gets or sets the width of the axis in pixels. If not set, the width is calculated automatically based on the axis content. The parameter only has effect for vertically rendered value axes. It is ignored on the category axis in normal charts and on value axes in inverted (bar) charts

Declaration
public int? Width { get; set; }
Property Value
Type Description
int?Gets or sets the width of the axis in pixels. If not set, the width is calculated automatically based on the axis content. The parameter only has effect for vertically rendered value axes. It is ignored on the category axis in normal charts and on value axes in inverted (bar) charts

Methods

ShouldRefreshChartLink to this section

Declaration
protected override bool ShouldRefreshChart(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
bool
An error has occurred. This app may no longer respond until reloaded. Reload 🗙