Table of Contents

Class ChartOptions

Namespace
MudBlazor
Assembly
MudBlazor.dll

Represents options which customize the display of a MudChart.

public class ChartOptions
Inheritance
ChartOptions
Inherited Members
Extension Methods

Remarks

This class is typically used to control display features of a chart such as: colors, the number of horizontal and vertical ticks, and line smoothing options.

Constructors

ChartOptions()

public ChartOptions()

Properties

ChartPalette

The list of colors applied to series values.

public string[] ChartPalette { get; set; }

Property Value

string[]

Remarks

Defaults to an array of 20 colors.

DefaultDataMarkerTooltipTitleFormat

public string DefaultDataMarkerTooltipTitleFormat { get; set; }

Property Value

string

EnableSmoothGradient

Enables smooth color transitions for heatmap cells and removes all padding between cells in a HeatMap Defaults to false

public bool EnableSmoothGradient { get; set; }

Property Value

bool

InterpolationOption

The technique used to smooth lines.

public InterpolationOption InterpolationOption { get; set; }

Property Value

InterpolationOption

Remarks

Defaults to Straight. Only takes effect when the MudChart type is Line.

LineStrokeWidth

The width of lines, in pixels.

public double LineStrokeWidth { get; set; }

Property Value

double

Remarks

Defaults to 3 for three pixels. Only takes effect when the MudChart type is Line.

MaxNumYAxisTicks

The maximum allowed number of vertical tick marks.

public int MaxNumYAxisTicks { get; set; }

Property Value

int

Remarks

If the number of ticks calculated exceeds this value, the tick marks will automatically be thinned out.

ShowLabels

Enables labels for every box in a HeatMap Defaults to true

public bool ShowLabels { get; set; }

Property Value

bool

ShowLegend

Shows the chart series legend.

public bool ShowLegend { get; set; }

Property Value

bool

Remarks

Defaults to true.

ShowLegendLabels

Enables label values for the legend boxes in a HeatMap Defaults to false

public bool ShowLegendLabels { get; set; }

Property Value

bool

ShowToolTips

Enables tooltips for values Defaults to true

public bool ShowToolTips { get; set; }

Property Value

bool

ValueFormatString

The format applied to labels for every box in a HeatMap Defaults to "F2"

public string ValueFormatString { get; set; }

Property Value

string

XAxisLabelPosition

The position of the X axis labels as either top or bottom in a HeatMap. Defaults to Bottom

public XAxisLabelPosition XAxisLabelPosition { get; set; }

Property Value

XAxisLabelPosition

XAxisLines

Shows horizontal axis lines.

public bool XAxisLines { get; set; }

Property Value

bool

Remarks

Defaults to false.

YAxisFormat

The format applied to numbers on the vertical axis.

public string? YAxisFormat { get; set; }

Property Value

string

Remarks

Values in this property are standard .NET format strings, such as those passed into the ToString() method. For a list of common formats, see: https://learn.microsoft.com/dotnet/standard/base-types/formatting-types

YAxisLabelPosition

The position of the Y axis labels as either left or right in a HeatMap. Defaults to Left

public YAxisLabelPosition YAxisLabelPosition { get; set; }

Property Value

YAxisLabelPosition

YAxisLines

Shows vertical axis lines.

public bool YAxisLines { get; set; }

Property Value

bool

Remarks

Defaults to true.

YAxisRequireZeroPoint

Shows zero point on vertical axis. Only takes effect when the MudChart type is Line or MudTimeSeriesChartBase is used. Defaults to false

public bool YAxisRequireZeroPoint { get; set; }

Property Value

bool

YAxisTicks

The spacing between vertical tick marks.

public int YAxisTicks { get; set; }

Property Value

int

Remarks

Defaults to 20.