PlotBase is the base class for objects that can be plotted on a WL9 chart. It provides access to the chart, pane, historical data, chart preferences, coordinate conversion, rendering passes, configuration, and a number of helper methods for rendering lines, rectangles, and text.
Returns the BarHistory instance currently associated with this plot object. If BarsOverride is not null, Bars returns that instance instead of the BarHistory being charted.
Allows a PlotBase instance to use a BarHistory other than the one currently displayed by the chart. When this property is not null, the Bars property returns BarsOverride instead of Chart.Bars.
Returns the CoreChart associated with this plot object's Pane, or null if the plot object is not associated with a pane.
Returns the ChartPreferences that should be used when rendering this plot object. If ChartPreferencesOverride is not null, that instance is returned. Otherwise, the ChartPreferences of the associated Chart is returned.
Allows the plot object to use a ChartPreferences instance other than the one belonging to the associated chart.
Specifies the primary color used when rendering this plot object. If the Parameters collection contains a Parameter named "Color", the property uses that Parameter's value. Otherwise, it uses the plot object's internal color value.
Returns ConfigurableType.ParameterList, indicating that PlotBase instances use a ParameterList for their configuration.
Returns a WPF Brush using the plot object's current Color. The Brush is obtained through PenBrushFactory.
Returns the default WPF Pen for rendering this plot object. The Pen uses the plot object's current Color. Its default thickness is 2. If the Parameters collection contains a Parameter named "Thickness", that Parameter's integer value is used instead.
Returns the color that should be used to render the bar at the specified idx. The default implementation returns the plot object's Color. Override this method when a plot object can render different bars using different colors.
Returns the highest y-axis value required by the plot object within the specified start and end bar index range. Derived classes should override this method when their values affect the chart pane's vertical scaling. The default implementation returns Double.MinValue.
Returns the lowest y-axis value required by the plot object within the specified start and end bar index range. Derived classes should override this method when their values affect the chart pane's vertical scaling. The default implementation returns Double.MaxValue.
Returns a ValueMarker associated with this plot object. Derived classes can override this method to provide a value marker for display on the chart's value axis. The default implementation returns null.
Returns true if the chart coordinate specified by pt is considered to be over this plot object. Derived classes can override this method to provide hit testing. The default implementation returns false.
Returns the runtime type name of the PlotBase instance.
Gets or sets the opacity used when rendering this plot object. The property works with a Parameter named Opacity (0-100) when that Parameter is present in the Parameters collection. When read, the Parameter's 0-to-100 value is converted to a byte in the range 0 to 255. If no opacity Parameter exists, the property returns 255. When assigned, the supplied byte value is converted from the 0-to-255 range to the Parameter's 0-to-100 range.
Contains the standard Parameter name used by PlotBase for an opacity Parameter.
Gets or sets the ChartPane associated with this plot object. The Chart property derives its value from this Pane.
Gets or sets the pane tag associated with this plot object. Plot objects such as indicators can use PaneTag to specify the chart pane in which they should be rendered.
Inherited from Configurable. Contains the key used when WL9 saves this item's configuration to the user's local file system. By default, ConfigKey is composed from Name plus "_Configuration". Derived classes can override it when multiple Configurable objects should share the same configuration.
Inherited from Configurable. Contains the item's configuration represented as a single string. For ParameterList-based objects such as PlotBase, the configuration is based on the Parameter instances contained in Parameters.
Inherited from Configurable. Returns a short description of the configurable item. If the user edits the object's Parameters, this text can be displayed in the parameter editor dialog.
Inherited from Configurable. The default implementation displays a Parameter editor that allows the user to modify the object's Parameters. Derived classes can override this method to provide a custom configuration interface.
Inherited from Configurable. Indicates whether the object exposes configuration that can be edited.
Inherited from Configurable. Contains the Parameter instances that comprise the configuration for this plot object. See the ParameterList QuickRef entry for more information.
Restores PlotBase-specific state from the string specified in s. The method restores PaneTag, parses the persisted ParameterList, and assigns the saved Parameter values to the existing Parameters collection.
Returns a string containing the state that PlotBase persists for the chart. The persisted data contains the plot object's pane tag followed by its serialized Parameters. If the object is currently associated with a Pane, the Pane's PaneTag is persisted. Otherwise, the object's PaneTag property is used.
Inherited from Configurable. Processes the current Configuration after it has changed. Derived classes can override this method to perform additional processing after configuration changes.
Converts the specified DateTime dt to an x-axis pixel coordinate on the chart. Returns 0 if the plot object is not associated with a Chart.
Converts the specified BarHistory index idx to an x-axis pixel coordinate. Returns 0 if the plot object is not associated with a Chart.
Converts the specified data value to a y-axis pixel coordinate using the associated Pane.
Converts the x-axis pixel coordinate x to the corresponding DateTime on the chart. Returns DateTime.MinValue if the plot object is not associated with a Chart.
Converts the x-axis pixel coordinate x to an index in the BarHistory being charted. Returns 0 if the plot object is not associated with a Chart. Derived classes can override this behavior if they use a different x-axis mapping.
Converts the y-axis pixel coordinate y to a data value using the associated Pane.
Returns true if the plot object has a special rendering state when the mouse is positioned over it. The default implementation returns false. Derived classes can override this property to support effects such as highlighting drawing objects or indicators during mouse interaction.
WL9 calls this method after the main rendering phase for the plot object. The default implementation does nothing.
WL9 calls this method before the main rendering phase for the plot object. The default implementation does nothing.
WL9 calls this method when the plot object should render itself to the specified WPF DrawingContext dc. Derived PlotBase classes must implement this method.
Determines whether the plot object should render on every applicable chart rendering pass. The default implementation returns false.
WL9 calls this method when the plot object's mouse-over or highlight state should be rendered to the specified DrawingContext. The default implementation does nothing.
Specifies the chart rendering passes in which the plot object participates. WL9 uses render passes 1, 2, and 4. A derived class can return one pass or combine multiple passes using a bitwise OR. Objects rendered in pass 1 appear beneath those in pass 2, while objects rendered in pass 4 appear above passes 1 and 2. The default implementation returns 4. During rendering, a derived class that participates in multiple passes can inspect the chart's current render pass to determine which pass is being processed.
Renders a line between two bar index/value coordinates. The method converts idx1, value1, idx2, and value2 to chart pixel coordinates and obtains an appropriate Pen from PenBrushFactory.
Renders an unfilled rectangle whose opposite corners are defined by the two supplied bar index/value coordinates. The rectangle outline uses the specified color, width, and lineStyle.
Renders text to the specified DrawingContext. The first overload accepts a bar index and data value and converts them to chart pixel coordinates. The second overload accepts x and y pixel coordinates directly. The third overload also renders a background rectangle behind the text using colorBkg and allows the font size to be specified. When center is true, the text is horizontally centered on the supplied x coordinate. When aboveBar is true, the text is shifted upward by its rendered height. The optional xOffset and yOffset values provide additional pixel positioning adjustments.