Skip to content
ChartForgeX
Class

VisualDivergingRamp

ChartForgeX.Themes

Namespace
ChartForgeX.Themes
Assembly
ChartForgeX
Modifiers
sealed

A diverging colour ramp for values around a meaningful midpoint: a negative arm, a neutral midpoint colour, and a positive arm. Each arm runs from the weakest to the strongest magnitude.

Inheritance

  • object
  • VisualDivergingRamp

Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Constructors

public VisualDivergingRamp(IEnumerable<ChartColor> negative, ChartColor neutral, IEnumerable<ChartColor> positive) #

Initializes a diverging ramp.

Parameters

negative System.Collections.Generic.IEnumerable<ChartForgeX.Primitives.ChartColor> required
The negative arm, weakest to strongest; at least one colour.
neutral ChartForgeX.Primitives.ChartColor required
The midpoint colour.
positive System.Collections.Generic.IEnumerable<ChartForgeX.Primitives.ChartColor> required
The positive arm, weakest to strongest; at least one colour.

Methods

public ChartColorScale ToColorScale(double? midpointValue = null) #

Creates a numeric color scale with every step of the ramp: the negative arm from its strongest colour at the minimum to its weakest next to the midpoint, the neutral midpoint, and the positive arm from its weakest to its strongest colour at the maximum.

Parameters

midpointValue double? = null optional
The value drawn in the neutral colour; null uses the middle of the data range.

Returns

ChartColorScale A diverging numeric color scale.

Properties

public IReadOnlyList<ChartColor> Negative { get; } #

Gets the negative arm, weakest to strongest.

public ChartColor Neutral { get; } #

Gets the midpoint colour.

public IReadOnlyList<ChartColor> Positive { get; } #

Gets the positive arm, weakest to strongest.