ChartTheme Class

The colors, fonts and stroke widths of a chart.

public sealed class ChartTheme : IEquatable<ChartTheme>
Implements

Constructors

NameDescription
ChartTheme()

ChartTheme()

ChartTheme.cs
public ChartTheme()

No documentation is available.

Properties

NameDescription
AxisColorGets the color of the axis lines and of the ticks.
BackgroundGets the color of the background, or null for a transparent background.
DarkGets a theme with light text on a dark background.
FontFamilyGets the font family, or null to use the family of the text measurer.
FontSizeGets the size of the axis and legend labels.
ForegroundGets the color of the titles, the labels and the legend.
GridColorGets the color of the grid lines.
LightGets a theme with dark text on a white background.
LineWidthGets the stroke width of lines.
MarkStrokeColorGets the color of the outlines that separate adjacent shapes, such as the slices of a pie.
MutedForegroundGets the color of the tick labels and of the subtitle.
NegativeColorGets the color of decreases (waterfall, falling candlesticks).
NeutralColorGets the color of totals and of neutral elements.
PaletteGets the colors of the categories, used in order.
PositiveColorGets the color of increases (waterfall, rising candlesticks).
SubtitleFontSizeGets the size of the subtitle.
TickFontSizeGets the size of the tick labels.
TitleFontSizeGets the size of the title. The title is bold.

AxisColor

ChartTheme.cs

Gets the color of the axis lines and of the ticks.

public ChartColor AxisColor { get; init; }

Property value

ChartColor

Background

ChartTheme.cs

Gets the color of the background, or null for a transparent background.

public ChartColor? Background { get; init; }

Property value

ChartColor?

Gets a theme with light text on a dark background.

public static ChartTheme Dark { get; }

Property value

ChartTheme

FontFamily

ChartTheme.cs

Gets the font family, or null to use the family of the text measurer.

public string? FontFamily { get; init; }

Property value

string?

Gets the size of the axis and legend labels.

public double FontSize { get; init; }

Property value

double

Foreground

ChartTheme.cs

Gets the color of the titles, the labels and the legend.

public ChartColor Foreground { get; init; }

Property value

ChartColor

GridColor

ChartTheme.cs

Gets the color of the grid lines.

public ChartColor GridColor { get; init; }

Property value

ChartColor

Gets a theme with dark text on a white background.

public static ChartTheme Light { get; }

Property value

ChartTheme

LineWidth

ChartTheme.cs

Gets the stroke width of lines.

public double LineWidth { get; init; }

Property value

double

MarkStrokeColor

ChartTheme.cs

Gets the color of the outlines that separate adjacent shapes, such as the slices of a pie.

public ChartColor MarkStrokeColor { get; init; }

Property value

ChartColor

MutedForeground

ChartTheme.cs

Gets the color of the tick labels and of the subtitle.

public ChartColor MutedForeground { get; init; }

Property value

ChartColor

NegativeColor

ChartTheme.cs

Gets the color of decreases (waterfall, falling candlesticks).

public ChartColor NegativeColor { get; init; }

Property value

ChartColor

NeutralColor

ChartTheme.cs

Gets the color of totals and of neutral elements.

public ChartColor NeutralColor { get; init; }

Property value

ChartColor

Gets the colors of the categories, used in order.

public IReadOnlyList<ChartColor> Palette { get; init; }

PositiveColor

ChartTheme.cs

Gets the color of increases (waterfall, rising candlesticks).

public ChartColor PositiveColor { get; init; }

Property value

ChartColor

SubtitleFontSize

ChartTheme.cs

Gets the size of the subtitle.

public double SubtitleFontSize { get; init; }

Property value

double

TickFontSize

ChartTheme.cs

Gets the size of the tick labels.

public double TickFontSize { get; init; }

Property value

double

TitleFontSize

ChartTheme.cs

Gets the size of the title. The title is bold.

public double TitleFontSize { get; init; }

Property value

double

Methods

NameDescription
Equals(ChartTheme?)
Equals(object?)
GetHashCode()
GetPaletteColor(int)Gets the color of a category, by index in ChartTheme.Palette, cycling when the index is past its end.
ToString()

Equals overloads

Equals(ChartTheme?)

public bool Equals(ChartTheme? other)
Parameters
other ChartTheme?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

GetPaletteColor(int)

ChartTheme.cs

Gets the color of a category, by index in ChartTheme.Palette, cycling when the index is past its end.

public ChartColor GetPaletteColor(int index)

Parameters

index int
The index of the category.

Returns

ChartColor The color.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(ChartTheme?, ChartTheme?)
operator !=(ChartTheme?, ChartTheme?)

operator ==(ChartTheme?, ChartTheme?)

public static bool operator ==(ChartTheme? left, ChartTheme? right)

Parameters

left ChartTheme?
right ChartTheme?

Returns

bool

No documentation is available.

operator !=(ChartTheme?, ChartTheme?)

public static bool operator !=(ChartTheme? left, ChartTheme? right)

Parameters

left ChartTheme?
right ChartTheme?

Returns

bool

No documentation is available.