Title Class (System.Web.UI.DataVisualization.Charting)

Switch View :
ScriptFree
.NET Framework Class Library
Title Class

Represents a title for the entire chart image.

Inheritance Hierarchy

System.Object
  System.Web.UI.DataVisualization.Charting.ChartElement
    System.Web.UI.DataVisualization.Charting.ChartNamedElement
      System.Web.UI.DataVisualization.Charting.Title

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)
Syntax

Visual Basic
Public Class Title _
	Inherits ChartNamedElement _
	Implements IDisposable, IChartMapArea
C#
public class Title : ChartNamedElement, IDisposable, 
	IChartMapArea
Visual C++
public ref class Title : public ChartNamedElement, 
	IDisposable, IChartMapArea
F#
type Title =  
    class
        inherit ChartNamedElement
        interface IDisposable
        interface IChartMapArea
    end

The Title type exposes the following members.

Constructors

  Name Description
Public method Title() Initializes a new instance of the Title class.
Public method Title(String) Initializes a new instance of the Title class with the specified title text.
Public method Title(String, Docking) Initializes a new instance of the Title class with the specified title text and docking value.
Public method Title(String, Docking, Font, Color) Initializes a new instance of the Title class with the specified title text, docking value, font and color.
Top
Properties

  Name Description
Public property Alignment Gets or sets the alignment of the title.
Public property BackColor Gets or sets the background color of the title.
Public property BackGradientStyle Gets or sets the orientation for the background gradient of a title. Also determines whether a gradient is used.
Public property BackHatchStyle Gets or sets the hatching style for the title.
Public property BackImage Gets or sets the background image of the title.
Public property BackImageAlignment Gets or sets the alignment of the title background image.
Public property BackImageTransparentColor Gets or sets a color that will drawn as transparent when the background image is drawn.
Public property BackImageWrapMode Gets or sets the drawing mode for the background image of the title.
Public property BackSecondaryColor Gets or sets the secondary color of the title background.
Public property BorderColor Gets or sets the border color of the title.
Public property BorderDashStyle Gets or sets the border style of the title.
Public property BorderWidth Gets or sets the border width of the title.
Public property DockedToChartArea Gets or sets the name of the ChartArea where the title will be docked.
Public property Docking Gets or sets a value that determines where the title is docked.
Public property DockingOffset Gets or sets the positive or negative offset of the docked title position.
Public property Font Gets or sets the font for the title.
Public property ForeColor Gets or sets the color of the title text.
Public property IsDockedInsideChartArea Gets or sets a flag that specifies whether the title should be docked within a ChartArea object.
Public property MapAreaAttributes Gets or sets map area attributes of the title.
Public property Name Gets or sets the unique name of a Title object. (Overrides ChartNamedElement.Name.)
Public property Position Gets or sets an ElementPosition object, which can be used to get or set the position of the title.
Public property PostBackValue Gets or sets the postback value that can be processed on a Click event.
Public property ShadowColor Gets or sets the shadow color for the title.
Public property ShadowOffset Gets or sets the shadow offset, in pixels, of the title.
Public property Tag Gets or sets an object associated with this chart element. (Inherited from ChartElement.)
Public property Text Gets or sets the text for the title.
Public property TextOrientation Gets or sets the orientation of the text in the title.
Public property TextStyle Gets or sets the style of the text for the title.
Public property ToolTip Gets or sets the tooltip for the title.
Public property Url Gets or sets the target URL of the hyperlink for the title.
Public property Visible Gets or sets the visibility flag of the title.
Top
Methods

  Name Description
Public method Dispose() Releases the resources used by the ChartElement. (Inherited from ChartElement.)
Protected method Dispose(Boolean) Releases the unmanaged resources used by the Title and optionally releases the managed resources. (Overrides ChartElement.Dispose(Boolean).)
Public method Equals Determines whether the specified Object is equal to the current ChartElement. (Inherited from ChartElement.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Returns a hash function for a particular type. (Inherited from ChartElement.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current Object. (Inherited from ChartElement.)
Top
Remarks

The Title class encapsulates all the functionality of a title for the Chart control. This class is exposed using the Titles collection property of the root Chart object.

There can be any number of titles for an entire chart image.

Titles are able to:

  • Be docked and aligned or custom-positioned.

  • Be displayed inside or outside the plotted chart areas.

  • Use a predefined TextStyle such as Embed or Shadow.

  • Use hatching, gradient colors and background images.

  • Be sized and positioned anywhere within the chart image.

Version Information

.NET Framework

Supported in: 4
Platforms

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Reference