A Rectangle "band" or background object

Namespace:  RightEdge.Common.ChartObjects
Assembly:  Common (in Common.dll)
Version: 2008.1.0.0 (2008.1.0.0)

Syntax

C#
[SerializableAttribute]
public class ChartRectangleBand : ChartRectangle
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class ChartRectangleBand _
	Inherits ChartRectangle
Visual C++
[SerializableAttribute]
public ref class ChartRectangleBand : public ChartRectangle

Remarks

This object will create a background rectangle on the chart. The rectangle consumes the entire vertical portion of the pane with the specified color over the specified period of time.

Examples

Create a band rectangle programmatically (C#)
CopyC#
// Setup our X coordinates.
DateTime leftPoint = DateTime.Now.AddDays(-7);
DateTime rightPoint = DateTime.Now;

// Create the rectangle band object with the default color.
ChartRectangleBand rectangle = new ChartRectangleBand(new ChartPoint(leftPoint, 20.00), new ChartPoint(rightPoint, 25.00), Color.RoyalBlue, 3);

// Add this object to the chart.  "symbol" would equal the current symbol object in the system.
ChartObjects.Add(symbol, rectangle);

Inheritance Hierarchy

System..::.Object
  RightEdge.Common.ChartObjects..::.ChartObjectBase
    RightEdge.Common.ChartObjects..::.ChartRectangle
      RightEdge.Common.ChartObjects..::.ChartRectangleBand

See Also