Framework Reference
WEALTHLAB FRAMEWORK / CLASS REFERENCE

ChartPreferences

API documentation, members, signatures, and C# examples.

Search the framework

Find classes, members, and documentation.

NamespaceWealthLab.ChartWPF
Parent
Object

The ChartPreferences class contains the visual settings used to render a WealthLab chart, including its colors, Chart Style, bar spacing, panes, cursors, event icons, trade arrows, fonts, and other display options.

Constructors

1

ChartPreferences

public ChartPreferences()

Creates a new ChartPreferences instance using the default WealthLab chart settings.

Members

35

AdaptiveScaleStopLimit

public bool AdaptiveScaleStopLimit

If true, WealthLab adjusts the chart's y-axis scaling as necessary to ensure plotted stop and limit prices are visible when using methods such as PlotStopsAndLimits.

AlwaysShowToolbar

public bool AlwaysShowToolbar

Controls whether the chart toolbar remains visible at all times. If false, the chart can use its auto-hide toolbar behavior.

AntiAlias

public bool AntiAlias

Controls whether anti-aliasing is enabled when rendering the chart.

AxisFont

public WLFont AxisFont

Gets or sets the WLFont used to render chart axis labels.

BarSpacing

public double BarSpacing

Gets or sets the spacing between chart bars, in pixels. Values less than 1 are automatically adjusted to 1.

ChartStyleName

public string ChartStyleName

Gets or sets the name of the Chart Style used to render the price bars, for example "Bar" or "Candlestick".

ChartStyleSettings

public ParameterList ChartStyleSettings

Gets or sets the ParameterList containing the configuration parameters for the Chart Style identified by ChartStyleName.

ColorAxisBackground

public WLColor ColorAxisBackground

Gets or sets the background color used for the chart's axes.

ColorAxisLabels

public WLColor ColorAxisLabels

Gets or sets the color used to render the chart's x-axis and y-axis labels.

ColorBackground

public WLColor ColorBackground

Gets or sets the chart's primary background color.

ColorCursors

public WLColor ColorCursors

Gets or sets the color used to render the chart's vertical and crosshair cursors.

ColorDownBar

public WLColor ColorDownBar

Gets or sets the color used to render bars whose closing price is less than their opening price.

ColorGridlines

public WLColor ColorGridlines

Gets or sets the color used to render chart grid lines.

ColorPaneSeparator

public WLColor ColorPaneSeparator

Gets or sets the color used to render the separators between chart panes.

ColorPrePost

public WLColor ColorPrePost

Gets or sets the background color used for pre-market and post-market regions of intraday charts. If no separate color has been assigned, the getter returns ColorBackground.

ColorUpBar

public WLColor ColorUpBar

Gets or sets the color used to render bars whose closing price is greater than or equal to their opening price.

ColorWatermark

public WLColor ColorWatermark

Gets or sets the color used to render the chart watermark containing the symbol and security name.

CursorThickness

public int CursorThickness

Gets or sets the thickness, in pixels, of the vertical and crosshair cursor lines.

DisableRenderingOptimization

public bool DisableRenderingOptimization

If true, disables WealthLab's chart rendering optimizations. This can be useful for Chart Styles or other visual components that require full rendering behavior even at narrow bar spacing.

DisplayEvents

public bool DisplayEvents

Controls whether EventDataPoint glyphs, such as dividend and split icons, are displayed on the chart.

IndicatorSet

public string IndicatorSet

Gets or sets the name of the default Indicator Set associated with the chart preferences.

IsDarkBackground

public bool IsDarkBackground

Returns true when ColorBackground is considered a dark color.

IsLightBackground

public bool IsLightBackground

Returns true when the brightness of ColorBackground is greater than 0.5.

LogScale

public bool LogScale

Controls whether the chart's price axis uses logarithmic scaling. If false, the axis uses linear scaling.

Margin

public int Margin

Gets or sets the top and bottom margin used by chart panes. Values are constrained to the range 0 through 10.

Name

public string Name

Gets or sets the name of the Chart Preferences theme.

PaneSeparatorWidth

public int PaneSeparatorWidth

Gets or sets the width, in pixels, of the separators between chart panes.

ShowBarScale

public bool ShowBarScale

Controls whether the chart displays its bar scale.

ShowIndicatorHighlights

public bool ShowIndicatorHighlights

Controls whether Indicators display mouse-over highlighting.

ShowSignalLines

public bool ShowSignalLines

Controls whether horizontal Signal lines are displayed on the chart.

ShowStatusBar

public bool ShowStatusBar

Controls whether the chart status bar is displayed.

ShowVolumePane

public bool ShowVolumePane

Controls whether the chart's Volume pane is displayed.

SizeChartToIndicators

public bool SizeChartToIndicators

Controls whether plotted Indicators are included when WealthLab determines the minimum and maximum values required for a chart pane's vertical scale.

UseWL6StyleTradeArrows

public bool UseWL6StyleTradeArrows

Controls whether Strategy trades are rendered using the legacy WealthLab 6-style trade arrows.

Persistence

3

Clone

public ChartPreferences Clone()
public ChartPreferences Clone(ChartDisplaySettings cds)

The parameterless overload creates and returns a copy of the ChartPreferences instance, including its Name. The overload that accepts ChartDisplaySettings first clones the current ChartPreferences and then applies any chart display settings defined in cds, including colors, bar spacing, volume pane visibility, cursor settings, margins, toolbar and status-bar settings, trade arrows, adaptive stop/limit scaling, and bar-scale visibility.

Parse

public static ChartPreferences Parse(string s)

Creates and returns a ChartPreferences instance from the persisted string in s. The parser maintains backward compatibility with ChartPreferences strings created by earlier WealthLab versions.

Persist

public string Persist()

Returns a string containing the persisted ChartPreferences configuration.

Utility Methods

2

GetTextColor

public WLColor GetTextColor()

Returns an appropriate general-purpose text color for the current chart background. A dark text color is returned for a light background, and a light text color is returned for a dark background.

MassageColor

public WLColor MassageColor(WLColor color)

Returns a version of color adjusted, when necessary, to contrast with the chart's ColorBackground. On a light background, colors that are also too light are darkened. On a dark background, colors that are too dark are brightened.

Need help with this API?

Ask the community or explore custom development services.