Search Framework:
PlotBase
Namespace: WealthLab.ChartWPF
Parent: Configurable
Descendants: BarGlyphBase

The base class for any object that can be plotted on the WL8 Chart.

Chart Related
Bars
public BarHistory Bars

Returns the BarHistory instance which represents the historical data currently being charted.


ChartPreferences
public ChartPreferences ChartPreferences

Returns an instance of the ChartPreferences class, which contains properties that describe the colors and styles to use when rendering the chart.


Color
public WLColor Color

Specifies the color that should be used when plotting this plot object.


DefaultBrush
public Brush DefaultBrush

Returns the default Brush object that should be used when rendering this plot object.


DefaultPen
public Pen DefaultPen

Returns the default Pen object that should be used when rendering this plot object.


GetBarColor
public virtual WLColor GetBarColor(int idx)

Returns the color that should be used to render the bar number corresponding to the the idx index.


GetMaxValue
public virtual double GetMaxValue(int start, int end)

Returns the highest y-axis value that the plot object requires within the specified start and end index range. The index range is based on the BarHistory instance being charted (the Bars property).


GetMinValue
public virtual double GetMinValue(int start, int end)

Returns the lowest y-axis value that the plot object requires within the specified start and end index range. The index range is based on the BarHistory instance being charted (the Bars property).


IsMouseOver
public virtual bool IsMouseOver(Point pt)

Returns whether the mouse position, contained in the pt parameter, is considered to be hovering over this plot object.


Opacity
public byte Opacity

Contains the opacity value that should be used when rendering this plot object. When reading this property, the value is returned as a byte in the range of 0 to 255. When setting the value, the setter expects a byte value in the range of 0 to 100 (it internally converts this input value to the 0 to 255 scale).



Configuration
ConfigKey
public virtual string ConfigKey

The key that is used when WL8 saves this item's Configuration to the user's local file system. By default, ConfigKey is composed of Name + "_Configuration". You can override this property in case you want to have two or more Configurable objects share the same configuration.


Configuration
public string Configuration

Contains the configuration of the item expressed as a single string. By default, this string is composed by persisting the Parameter instances contained in the Parameters property.


Description
public virtual string Description

Returns a short description of the item. If the user edits the item's Parameters, this text appears in the editor dialog.


EditConfig
public virtual string EditConfig()

The default implementation causes a parameter editor dialog to appear, allowing the user to modify the instance's Parameters. You can override this behavior to show your own editor interface. If you do so, pass the modified Configuration string back as the return value.


IsConfigurable
public virtual bool IsConfigurable

The default implementation returns true if the Parameters property contains one or more Parameter instances.


Name
public abstract string Name

Returns the name of the instance.


Parameters
public ParameterList Parameters

Contains the Parameter instances that comprise the configuration for this instance. See the ParameterList entry for more details.


ProcessConfig
public virtual void ProcessConfig()

You can override this method to perform special processing after the instance's Configuration has changed. The default implementation parses the Configuration string and assigns the result to a new Parameters instance.



Coordinate Conversion
ConvertDateTimeToX
public double ConvertDateTimeToX(DateTime dt)

Converts the specified DateTime value in the dt parameter to an x-axis pixel location on the chart.


ConvertIndexToX
public double ConvertIndexToX(int idx)

Converts an index value of the BarHistory instance being plotted (Bars property) to an x-axis pixel location.


ConvertValueToY
public double ConvertValueToY(double value)

Converts the specified double value to a y-axis pixel location on the chart.


ConvertXToDateTime
public DateTime ConvertXToDateTime(double x)

Converts an x-axis pixel location to a DateTime value that represents where the x-axis location occurs within the BarHistory instance (Bars property) being charted.


ConvertXToIndex
public virtual int ConvertXToIndex(double x)

Converts an x-axis pixel value to an index into the BarHistory instance (Bars property) being charted.


ConvertYToValue
public double ConvertYToValue(double y)

Converts the specified y-axis pixel location in the y parameter to a double value.



Rendering
HasMouseOverState
public virtual bool HasMouseOverState

Returns whether or not the plot object renders a special state when the user moves the mouse over it. This handles effects like the mouse-over highlighting when you drag an indicator atop another indicator, or move the mouse over a drawing object.


PostRender
public virtual void PostRender(DrawingContext dc)

WL8 calls this after completing the main rendering phase.


PreRender
public virtual void PreRender(DrawingContext dc)

WL8 calls this prior to entering the main rendering phase.


Render
public abstract void Render(DrawingContext dc)

WL8 calls this when the plot object should be rendered to the DrawingContext specified in dc.


RenderHighlight
public virtual void RenderHighlight(DrawingContext dc)

WL8 calls this when a mouse-over effect should be rendered for this plot object to the DrawingContext specified in dc.


RenderPass
public virtual int RenderPass

The WL8 chart renders in two passes. The first pass renders items, such as the chart bars and indicators, into a buffer. This first rendering pass occurs only when required, for example when the chart is scrolled or changes size. The second rendering pass copies this buffer to the display, and then renders items such as the crosshair cursor, indicator value labels, and mouse-over highlight effects. The RenderPass property returns either 1 or 2, instructing the chart on which rendering pass this plot object should take part in.


RenderPasses
public virtual int RenderPasses

The WL8 chart renders in three passes, passes 1, 2 and 4. This property determines which rendering pass the PlotBase object renders in. Objects in pass 1 appear under those in pass 2, and objects in pass 4 appear on top of 1 and 2. Override this property to return which render passes your object will be rendered in.

The value can be a logical or of the 3 possible render passes, which can cause your object to render in multiple passes. During the Render method, you can examine Chart.CurrentRenderPass to determine which pass is currently being rendered.