API documentation, members, signatures, and C# examples.
Search the framework
Find classes, members, and documentation.
NamespaceWealthLab.Backtest
Parent
Object
The DataPanelItem class contains the information displayed in a row of the WL9 Data Panel. If you are building a Data Panel ScoreCard Extension, create DataPanelItem instances and add them to the List returned by its GetItems method.
public DataPanelItem(string header, string stringValue)
public DataPanelItem(string header, double numberValue, int? dec = null, bool colorize = false, string suffix = null)
public DataPanelItem(string header, double numberValue, WLColor color)
DataPanelItem provides several constructors for creating Data Panel rows. The parameterless constructor creates an uninitialized instance. Use the second constructor for an item containing a string value. Use the third constructor for a numeric value, optionally specifying the number of decimal places, whether the value should be colorized based on its sign, and a suffix. Use the fourth constructor for a numeric value with an explicitly assigned WLColor.
Determines whether the item should be colorized based on its NumberValue. When true, positive and negative values can be rendered using the Data Panel's corresponding profit and loss colors. The default value is false.
Contains an optional override for the number of decimal places used when formatting NumberValue. If null, DisplayValue determines the number of decimal places automatically.
Returns the formatted value to display in the Data Panel. If StringValue is not null, it is returned directly. Otherwise, NumberValue is formatted using an automatically determined number of decimal places, with a minimum of two decimal places. If Decimals is assigned, it overrides the automatically determined precision. If Suffix is not null, it is appended to the formatted numeric value.
Contains an optional string appended to the formatted NumberValue when calculating DisplayValue. For example, you can assign "%" to display a numeric value with a percent suffix.
Need help with this API?
Ask the community or explore custom development services.