ChartPreferences
public ChartPreferences()Creates a new ChartPreferences instance using the default WealthLab chart settings.
API documentation, members, signatures, and C# examples.
Find classes, members, and documentation.
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.
public ChartPreferences()Creates a new ChartPreferences instance using the default WealthLab chart settings.
public bool AdaptiveScaleStopLimitIf 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.
public bool AlwaysShowToolbarControls whether the chart toolbar remains visible at all times. If false, the chart can use its auto-hide toolbar behavior.
public bool AntiAliasControls whether anti-aliasing is enabled when rendering the chart.
public WLFont AxisFontGets or sets the WLFont used to render chart axis labels.
public double BarSpacingGets or sets the spacing between chart bars, in pixels. Values less than 1 are automatically adjusted to 1.
public string ChartStyleNameGets or sets the name of the Chart Style used to render the price bars, for example "Bar" or "Candlestick".
public ParameterList ChartStyleSettingsGets or sets the ParameterList containing the configuration parameters for the Chart Style identified by ChartStyleName.
public WLColor ColorAxisBackgroundGets or sets the background color used for the chart's axes.
public WLColor ColorAxisLabelsGets or sets the color used to render the chart's x-axis and y-axis labels.
public WLColor ColorBackgroundGets or sets the chart's primary background color.
public WLColor ColorCursorsGets or sets the color used to render the chart's vertical and crosshair cursors.
public WLColor ColorDownBarGets or sets the color used to render bars whose closing price is less than their opening price.
public WLColor ColorGridlinesGets or sets the color used to render chart grid lines.
public WLColor ColorPaneSeparatorGets or sets the color used to render the separators between chart panes.
public WLColor ColorPrePostGets 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.
public WLColor ColorUpBarGets or sets the color used to render bars whose closing price is greater than or equal to their opening price.
public WLColor ColorWatermarkGets or sets the color used to render the chart watermark containing the symbol and security name.
public int CursorThicknessGets or sets the thickness, in pixels, of the vertical and crosshair cursor lines.
public bool DisableRenderingOptimizationIf 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.
public bool DisplayEventsControls whether EventDataPoint glyphs, such as dividend and split icons, are displayed on the chart.
public bool DisplayTradeArrowsControls whether Strategy trade arrows are displayed on the chart.
public string IndicatorSetGets or sets the name of the default Indicator Set associated with the chart preferences.
public bool IsDarkBackgroundReturns true when ColorBackground is considered a dark color.
public bool IsLightBackgroundReturns true when the brightness of ColorBackground is greater than 0.5.
public bool LogScaleControls whether the chart's price axis uses logarithmic scaling. If false, the axis uses linear scaling.
public int MarginGets or sets the top and bottom margin used by chart panes. Values are constrained to the range 0 through 10.
public string NameGets or sets the name of the Chart Preferences theme.
public int PaneSeparatorWidthGets or sets the width, in pixels, of the separators between chart panes.
public bool ShowBarScaleControls whether the chart displays its bar scale.
public bool ShowIndicatorHighlightsControls whether Indicators display mouse-over highlighting.
public bool ShowSignalLinesControls whether horizontal Signal lines are displayed on the chart.
public bool ShowStatusBarControls whether the chart status bar is displayed.
public bool ShowVolumePaneControls whether the chart's Volume pane is displayed.
public bool SizeChartToIndicatorsControls whether plotted Indicators are included when WealthLab determines the minimum and maximum values required for a chart pane's vertical scale.
public bool UseWL6StyleTradeArrowsControls whether Strategy trades are rendered using the legacy WealthLab 6-style trade arrows.
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.
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.
public string Persist()Returns a string containing the persisted ChartPreferences configuration.
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.
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.
Ask the community or explore custom development services.