Table of Contents

Class MudChartBase

Namespace
MudBlazor
Assembly
MudBlazor.dll

Shared a base class for designing category MudChart and MudTimeSeriesChart components.

public abstract class MudChartBase : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
Inheritance
MudChartBase
Implements
Derived
Inherited Members
Extension Methods

Constructors

MudChartBase()

protected MudChartBase()

Properties

CanHideSeries

Allows series to be hidden when ChartType is Line.

[Parameter]
[Category("Behavior")]
public bool CanHideSeries { get; set; }

Property Value

bool

Remarks

When true, checkboxes are displayed which can toggle visibility of each line.

ChartOptions

The display options applied to the chart.

[Parameter]
[Category("Appearance")]
public ChartOptions ChartOptions { get; set; }

Property Value

ChartOptions

ChartType

The type of chart to display.

[Parameter]
[Category("Behavior")]
public ChartType ChartType { get; set; }

Property Value

ChartType

ChildContent

ChildContent for this component

[Parameter]
[Category("Appearance")]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Classname

protected string Classname { get; }

Property Value

string

CustomGraphics

The custom graphics within this chart.

[Parameter]
[Category("Appearance")]
public RenderFragment? CustomGraphics { get; set; }

Property Value

RenderFragment

Height

The height of the chart, as a CSS style.

[Parameter]
[Category("Appearance")]
public string Height { get; set; }

Property Value

string

Remarks

Defaults to 80%. Values can be a percentage or pixel width such as 200px.

LegendPosition

The location of series labels.

[Parameter]
[Category("Appearance")]
public Position LegendPosition { get; set; }

Property Value

Position

Remarks

Defaults to Bottom.

RightToLeft

[CascadingParameter(Name = "RightToLeft")]
[Category("Behavior")]
public bool RightToLeft { get; set; }

Property Value

bool

SelectedIndex

The currently selected data point.

[Parameter]
[Category("Behavior")]
public int SelectedIndex { get; set; }

Property Value

int

Remarks

When this property changes, the SelectedIndexChanged event occurs.

SelectedIndexChanged

Occurs when the SelectedIndex has changed.

[Parameter]
[Category("Behavior")]
public EventCallback<int> SelectedIndexChanged { get; set; }

Property Value

EventCallback<int>

Width

The width of the chart, as a CSS style.

[Parameter]
[Category("Appearance")]
public string Width { get; set; }

Property Value

string

Remarks

Defaults to 80%. Values can be a percentage or pixel width such as 200px.

Methods

ToS(double, string?)

protected string ToS(double d, string? format = null)

Parameters

d double
format string

Returns

string