Search Framework:
DataPanelItem
Namespace: WealthLab.Backtest
Parent: Object

Contains the information to be displayed in a row in the WL8 Data Panel. If you are building a Data Panel ScoreCard Extension, you'll create instances of DataPanelItem objects and add them to the List returned in the GetItems method.

Constructors
DataPanelItem
public DataPanelItem()
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 exposes several constructs for flexibility in creating instances. Use the second constructor if your item contains a string value. Use the third constructor if your item is based on a numeric value. The optional parameters let you control the decimal places to use, and whether the item should be colored (green/red) based on positive/negative values. Use the fourth constructor if your item is based on a numeric value, and you want to set an explicit color.



Properties
Color
public WLColor Color

If assigned a non-null WLColor value, determines the color to use when rendering the item in the Data Panel.


Colorize
public bool Colorize

Determines whether the text used when rendering the item in the Data Panel should be colorized based on its NumberValue. If true, the text will render green if the NumberValue is greater than zero, and red if less than zero.


Decimals
public int? Decimals

If assigned a non-null int value, determines the number of decimals places to use when rendering the item's NumberValue in the "Value" column of the Data Panel.


public string Header

Contains the header text that will be displayed in the "Item" column of the Data Panel.


NumberValue
public double NumberValue

If StringValue is null, the content of the item's "Value" in the Data Panel will be based on this numeric value.


StringValue
public double StringValue

If assigned a non-null string value, it will be used as the content of the item's "Value" in the Data Panel.


Suffix
public string Suffix

If assigned a non-null string, the string will be appended to the text of the item's "Value" column in the Data Panel.