Table of Contents

Struct ChartColor

Namespace
TwBlazor.Charting
Assembly
TwBlazor.dll

A themed color reference: a ChartColorRole and, for Series, the slot.

public readonly struct ChartColor : IEquatable<ChartColor>
Implements
Inherited Members

Constructors

ChartColor(ChartColorRole, int)

A themed color reference: a ChartColorRole and, for Series, the slot.

public ChartColor(ChartColorRole Role, int Slot = 0)

Parameters

Role ChartColorRole

The job the color does.

Slot int

The zero-based series slot. Ignored by every role except Series.

Properties

Axis

Gets the color for baselines and axis lines.

public static ChartColor Axis { get; }

Property Value

ChartColor

Grid

Gets the color for gridlines.

public static ChartColor Grid { get; }

Property Value

ChartColor

Ink

Gets the high-contrast ink color.

public static ChartColor Ink { get; }

Property Value

ChartColor

Negative

Gets the color for an unfavourable change.

public static ChartColor Negative { get; }

Property Value

ChartColor

Positive

Gets the color for a favourable change.

public static ChartColor Positive { get; }

Property Value

ChartColor

Role

The job the color does.

public ChartColorRole Role { get; init; }

Property Value

ChartColorRole

Sequential

Gets the single hue used to show magnitude through opacity.

public static ChartColor Sequential { get; }

Property Value

ChartColor

Slot

The zero-based series slot. Ignored by every role except Series.

public int Slot { get; init; }

Property Value

int

Total

Gets the color for a neutral summary value.

public static ChartColor Total { get; }

Property Value

ChartColor

Track

Gets the color for an unfilled track.

public static ChartColor Track { get; }

Property Value

ChartColor

Methods

Deconstruct(out ChartColorRole, out int)

public void Deconstruct(out ChartColorRole Role, out int Slot)

Parameters

Role ChartColorRole
Slot int

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(ChartColor)

public bool Equals(ChartColor other)

Parameters

other ChartColor

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Series(int)

Gets the categorical color for a series. A series keeps its slot when others are hidden.

public static ChartColor Series(int slot)

Parameters

slot int

The zero-based series slot.

Returns

ChartColor

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ChartColor, ChartColor)

public static bool operator ==(ChartColor left, ChartColor right)

Parameters

left ChartColor
right ChartColor

Returns

bool

operator !=(ChartColor, ChartColor)

public static bool operator !=(ChartColor left, ChartColor right)

Parameters

left ChartColor
right ChartColor

Returns

bool