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

Switch View :
ScriptFree
.NET Framework Class Library
Chart Class

Serves as the root class of the Chart control.

Inheritance Hierarchy

System.Object
  System.Web.UI.Control
    System.Web.UI.WebControls.WebControl
      System.Web.UI.WebControls.BaseDataBoundControl
        System.Web.UI.WebControls.DataBoundControl
          System.Web.UI.DataVisualization.Charting.Chart

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

Visual Basic
<ToolboxBitmapAttribute(GetType(Chart), "ChartControl.ico")> _
Public Class Chart _
	Inherits DataBoundControl _
	Implements IPostBackEventHandler
C#
[ToolboxBitmapAttribute(typeof(Chart), "ChartControl.ico")]
public class Chart : DataBoundControl, IPostBackEventHandler
Visual C++
[ToolboxBitmapAttribute(typeof(Chart), L"ChartControl.ico")]
public ref class Chart : public DataBoundControl, 
	IPostBackEventHandler
F#
[<ToolboxBitmapAttribute(typeof(Chart), "ChartControl.ico")>]
type Chart =  
    class
        inherit DataBoundControl
        interface IPostBackEventHandler
    end
ASP.NET
<asp:Chart />

The Chart type exposes the following members.

Constructors

  Name Description
Public method Chart Initializes a new instance of the Chart class.
Top
Properties

  Name Description
Public property AccessKey Gets or sets the access key that allows you to quickly navigate to the Web server control. (Inherited from WebControl.)
Protected property Adapter Gets the browser-specific adapter for the control. (Inherited from Control.)
Public property AlternateText Gets or sets the alternate text displayed in the Chart control when the chart image is unavailable.
Public property Annotations Stores the chart annotations.
Public property AntiAliasing Gets or sets a value that determines whether anti-aliasing is used when text and graphics are drawn.
Public property AppRelativeTemplateSourceDirectory Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control. (Inherited from Control.)
Public property Attributes Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control. (Inherited from WebControl.)
Public property BackColor Gets or sets the background color of the Chart object. (Overrides WebControl.BackColor.)
Public property BackGradientStyle Gets or sets the orientation for the background gradient of a Chart control. Also determines whether a gradient is used.
Public property BackHatchStyle Gets or sets the hatching style of the Chart control.
Public property BackImage Gets or sets the background image of the Chart control.
Public property BackImageAlignment Gets or sets the background image alignment used for the Unscaled drawing mode.
Public property BackImageTransparentColor Gets or sets the color of the Chart control that will be displayed as transparent.
Public property BackImageWrapMode Gets or sets the drawing mode for the background image of the Chart control.
Public property BackSecondaryColor Gets or sets the secondary color of the chart background.
Public property BindingContainer Infrastructure. Gets the control that contains this control's data binding. (Inherited from Control.)
Public property BorderColor Infrastructure. Gets or sets the color of the chart border. (Overrides WebControl.BorderColor.)
Public property BorderlineColor Gets or sets the color of the entire chart image border.
Public property BorderlineDashStyle Gets or sets the style of the entire chart image border line.
Public property BorderlineWidth Gets or sets the width of the border line for the entire chart image.
Public property BorderSkin Gets or sets a BorderSkin object, which provides border skin functionality for the Chart control.
Public property BorderStyle Gets or sets the border style of the Chart. (Overrides WebControl.BorderStyle.)
Public property BorderWidth Infrastructure. Gets or sets the width of the chart border. (Overrides WebControl.BorderWidth.)
Public property BuildNumber Infrastructure. Gets the build number of the Chart control.
Public property ChartAreas Gets a read-only ChartAreaCollection object that is used to store ChartArea objects.
Protected property ChildControlsCreated Gets a value that indicates whether the server control's child controls have been created. (Inherited from Control.)
Public property ClientID Gets the control ID for HTML markup that is generated by ASP.NET. (Inherited from Control.)
Public property ClientIDMode Gets or sets the algorithm that is used to generate the value of the ClientID property. (Inherited from Control.)
Protected property ClientIDSeparator Gets a character value representing the separator character used in the ClientID property. (Inherited from Control.)
Public property Compression Gets or sets the amount of compression for the chart image.
Protected property Context Gets the HttpContext object associated with the server control for the current Web request. (Inherited from Control.)
Public property Controls Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy. (Inherited from Control.)
Public property ControlStyle Gets the style of the Web server control. This property is used primarily by control developers. (Inherited from WebControl.)
Public property ControlStyleCreated Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers. (Inherited from WebControl.)
Public property CssClass Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client. (Inherited from WebControl.)
Public property CurrentImageLocation Gets the URL of the current image into which the Chart control will be rendered.
Public property DataItemContainer Gets a reference to the naming container if the naming container implements IDataItemContainer. (Inherited from Control.)
Public property DataKeysContainer Gets a reference to the naming container if the naming container implements IDataKeysControl. (Inherited from Control.)
Public property DataManipulator Gets a DataManipulator object, which provides methods and properties that handle data.
Public property DataMember Gets or sets the name of the list of data that the data-bound control binds to, in cases where the data source contains more than one distinct list of data items. (Inherited from DataBoundControl.)
Public property DataSource Gets or sets the data source for the Chart object. (Overrides BaseDataBoundControl.DataSource.)
Public property DataSourceID Gets or sets the ID of the control from which the data-bound control retrieves its list of data items. (Inherited from DataBoundControl.)
Public property DataSourceObject Gets an object that implements the IDataSource interface, which provides access to the object's data content. (Inherited from DataBoundControl.)
Public property DescriptionUrl Gets or sets the location of a detailed description of the Chart.
Protected property DesignMode Gets a value indicating whether a control is being used on a design surface. (Inherited from Control.)
Public property Enabled Gets or sets a value indicating whether the Web server control is enabled. (Inherited from WebControl.)
Public property EnableTheming Gets or sets a value indicating whether themes apply to this control. (Inherited from WebControl.)
Public property EnableViewState Gets or sets a flag that determines whether state management is enabled. (Overrides Control.EnableViewState.)
Protected property Events Gets a list of event handler delegates for the control. This property is read-only. (Inherited from Control.)
Public property Font Infrastructure. Gets the font properties of the control. (Overrides WebControl.Font.)
Public property ForeColor Gets or sets the text color of the Chart control. (Overrides WebControl.ForeColor.)
Public property HasAttributes Gets a value indicating whether the control has attributes set. (Inherited from WebControl.)
Protected property HasChildViewState Gets a value indicating whether the current server control's child controls have any saved view-state settings. (Inherited from Control.)
Public property Height Gets or sets the height of the entire chart image in pixels. (Overrides WebControl.Height.)
Public property ID Gets or sets the programmatic identifier assigned to the server control. (Inherited from Control.)
Protected property IdSeparator Infrastructure. Gets the character used to separate control identifiers. (Inherited from Control.)
Public property ImageLocation Gets or sets the location where an image file is saved when ImageTag rendering is performed.
Public property Images Gets a NamedImagesCollection object, which stores NamedImage objects for the chart.
Public property ImageStorageMode Gets or sets the chart rendering type.
Public property ImageType Gets or sets the type of image into which the chart is rendered if ImageTag rendering is used.
Protected property Initialized Gets a value indicating whether the data-bound control has been initialized. (Inherited from BaseDataBoundControl.)
Protected property IsBoundUsingDataSourceID Gets a value indicating whether the DataSourceID property is set. (Inherited from BaseDataBoundControl.)
Protected property IsChildControlStateCleared Gets a value indicating whether controls contained within this control have control state. (Inherited from Control.)
Protected property IsEnabled Gets a value indicating whether the control is enabled. (Inherited from WebControl.)
Public property IsMapAreaAttributesEncoded Gets or sets a flag that determines whether map area attributes are encoded.
Public property IsMapEnabled Gets or sets a flag that determines whether client-side image maps are enabled.
Public property IsSoftShadows Gets or sets a flag that determines if a smooth gradient is applied when shadows are drawn.
Protected property IsTrackingViewState Gets a value that indicates whether the server control is saving changes to its view state. (Inherited from Control.)
Protected property IsViewStateEnabled Gets a value indicating whether view state is enabled for this control. (Inherited from Control.)
Public property Legends Stores all Legend objects used by the Chart control.
Protected property LoadViewStateByID Gets a value indicating whether the control participates in loading its view state by ID instead of index. (Inherited from Control.)
Public property MapAreas Gets a MapAreasCollection object, which stores the map areas for the chart.
Public property NamingContainer Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same Control.ID property value. (Inherited from Control.)
Public property Page Gets a reference to the Page instance that contains the server control. (Inherited from Control.)
Public property Palette Gets or sets the palette for the Chart control.
Public property PaletteCustomColors Gets or sets an array of custom palette colors.
Public property Parent Gets a reference to the server control's parent control in the page control hierarchy. (Inherited from Control.)
Public property RenderingCompatibility Gets a value that specifies the ASP.NET version that rendered HTML will be compatible with. (Inherited from Control.)
Public property RenderType Gets or sets the rendering method used to display a chart image.
Protected property RequiresDataBinding Gets or sets a value indicating whether the DataBind method should be called. (Inherited from BaseDataBoundControl.)
Public property RightToLeft Gets or sets a value that indicates whether the control should draw right-to-left for Right-to-Left (RTL) languages.
Protected property SelectArguments Gets a DataSourceSelectArguments object that the data-bound control uses when retrieving data from a data source control. (Inherited from DataBoundControl.)
Public property Serializer Gets a ChartSerializer object, which is used for chart serialization.
Public property Series Gets a SeriesCollection object.
Public property Site Gets information about the container that hosts the current control when rendered on a design surface. (Inherited from Control.)
Public property SkinID Gets or sets the skin to apply to the control. (Inherited from WebControl.)
Public property Style Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control. (Inherited from WebControl.)
Public property SupportsDisabledAttribute Gets a value that indicates whether the control should set the disabled attribute of the rendered HTML element to "disabled" when the control's IsEnabled property is false. (Inherited from BaseDataBoundControl.)
Public property SuppressExceptions Gets or sets a flag that determines whether noncritical exceptions should be suppressed.
Public property TabIndex Gets or sets the tab index of the Web server control. (Inherited from WebControl.)
Protected property TagKey Gets the HtmlTextWriterTag value that corresponds to this Web server control. This property is used primarily by control developers. (Inherited from WebControl.)
Protected property TagName Gets the name of the control tag. This property is used primarily by control developers. (Inherited from WebControl.)
Public property TemplateControl Gets or sets a reference to the template that contains this control. (Inherited from Control.)
Public property TemplateSourceDirectory Gets the virtual directory of the Page or UserControl that contains the current server control. (Inherited from Control.)
Public property TextAntiAliasingQuality Gets or sets the TextAntiAliasingQuality type to use when applying anti-aliasing to text.
Public property Titles Stores all Title objects used by the Chart control.
Public property ToolTip Gets or sets the text displayed when the mouse pointer hovers over the Web server control. (Inherited from WebControl.)
Public property UniqueID Gets the unique, hierarchically qualified identifier for the server control. (Inherited from Control.)
Protected property ViewState Gets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page. (Inherited from Control.)
Public property ViewStateContent Gets or sets a value that determines the view state to be persisted at the client.
Public property ViewStateData Obsolete. Gets or sets the user-defined view state of the control.
Protected property ViewStateIgnoresCase Gets a value that indicates whether the StateBag object is case-insensitive. (Inherited from Control.)
Public property ViewStateMode Gets or sets the view-state mode of this control. (Inherited from Control.)
Public property Visible Gets or sets a value that indicates whether a server control is rendered as UI on the page. (Inherited from Control.)
Public property Width Gets or sets the width of the entire chart image in pixels. (Overrides WebControl.Width.)
Top
Methods

  Name Description
Protected method AddAttributesToRender Adds HTML attributes and styles that need to be rendered to the specified HtmlTextWriterTag. This method is used primarily by control developers. (Inherited from WebControl.)
Protected method AddedControl Called after a child control is added to the Controls collection of the Control object. (Inherited from Control.)
Protected method AddParsedSubObject Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's ControlCollection object. (Inherited from Control.)
Public method AlignDataPointsByAxisLabel() Aligns data points along the X axis using their axis labels. Applicable when multiple series are indexed and their X-values are strings.
Public method AlignDataPointsByAxisLabel(PointSortOrder) Aligns data points using their axis labels. All series in the chart are aligned, using the specified sort order.
Public method AlignDataPointsByAxisLabel(String) Aligns data points from different series along the X axis using their axis labels. The specified series in the chart are aligned using an ascending sort order.
Public method AlignDataPointsByAxisLabel(String, PointSortOrder) Aligns data points using their axis labels.
Public method ApplyPaletteColors Sets the automatically assigned series and data point colors, to allow programmatic access at run time.
Public method ApplyStyle Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers. (Inherited from WebControl.)
Public method ApplyStyleSheetSkin Applies the style properties defined in the page style sheet to the control. (Inherited from Control.)
Protected method BuildProfileTree Infrastructure. Gathers information about the server control and delivers it to the Trace property to be displayed when tracing is enabled for the page. (Inherited from Control.)
Protected method ClearCachedClientID Infrastructure. Sets the cached ClientID value to null. (Inherited from Control.)
Protected method ClearChildControlState Deletes the control-state information for the server control's child controls. (Inherited from Control.)
Protected method ClearChildState Deletes the view-state and control-state information for all the server control's child controls. (Inherited from Control.)
Protected method ClearChildViewState Deletes the view-state information for all the server control's child controls. (Inherited from Control.)
Protected method ClearEffectiveClientIDMode Infrastructure. Sets the ClientIDMode property of the current control instance and of any child controls to Inherit. (Inherited from Control.)
Protected method ConfirmInitState Sets the initialized state of the data-bound control. (Inherited from BaseDataBoundControl.)
Public method CopyBaseAttributes Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers. (Inherited from WebControl.)
Protected method CreateChildControls Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering. (Inherited from Control.)
Protected method CreateControlCollection Creates a new ControlCollection object to hold the child controls (both literal and server) of the server control. (Inherited from Control.)
Protected method CreateControlStyle Creates the style object that is used internally by the WebControl class to implement all style related properties. This method is used primarily by control developers. (Inherited from WebControl.)
Protected method CreateDataSourceSelectArguments Creates a default DataSourceSelectArguments object used by the data-bound control if no arguments are specified. (Inherited from DataBoundControl.)
Public method DataBind() Binds a data source to the invoked server control and all its child controls. (Inherited from BaseDataBoundControl.)
Protected method DataBind(Boolean) Binds a data source to the invoked server control and all its child controls with an option to raise the DataBinding event. (Inherited from Control.)
Protected method DataBindChildren Binds a data source to the server control's child controls. (Inherited from Control.)
Public method DataBindCrossTable(IEnumerable, String, String, String, String) Data binds a chart to the table, with one series created per unique value in a given column.
Public method DataBindCrossTable(IEnumerable, String, String, String, String, PointSortOrder) Data binds a chart to the table, with one series created per unique value in a given column.
Public method DataBindTable(IEnumerable) Automatically creates and binds series data to the specified data table.
Public method DataBindTable(IEnumerable, String) Automatically creates and binds series data to the specified data table, and optionally populates X-values.
Public method Dispose() Disposes of the object, using the IDisposable interface. (Overrides Control.Dispose().)
Protected method Dispose(Boolean) Releases unmanaged and, optionally, managed resources.
Protected method EnsureChildControls Determines whether the server control contains child controls. If it does not, it creates child controls. (Inherited from Control.)
Protected method EnsureDataBound Calls the DataBind method if the DataSourceID property is set and the data-bound control is marked to require binding. (Inherited from BaseDataBoundControl.)
Protected method EnsureID Creates an identifier for controls that do not have an identifier assigned. (Inherited from Control.)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
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 FindControl(String) Searches the current naming container for a server control with the specified id parameter. (Inherited from Control.)
Protected method FindControl(String, Int32) Infrastructure. Searches the current naming container for a server control with the specified id and an integer, specified in the pathOffset parameter, which aids in the search. You should not override this version of the FindControl method. (Inherited from Control.)
Public method Focus Sets input focus to a control. (Inherited from Control.)
Public method GetChartElementOutline Returns the chart element outline.
Protected method GetData Retrieves a DataSourceView object that the data-bound control uses to perform data operations. (Inherited from DataBoundControl.)
Protected method GetDataSource Retrieves the IDataSource interface that the data-bound control is associated with, if any. (Inherited from DataBoundControl.)
Protected method GetDesignModeState Infrastructure. Gets design-time data for a control. (Inherited from Control.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetHtmlImageMap Returns the HTML image map of the currently rendered chart. One of the overloaded SaveImage methods in the Chart must be called before calling this method.
Public method GetRouteUrl(Object) Gets the URL that corresponds to a set of route parameters. (Inherited from Control.)
Public method GetRouteUrl(RouteValueDictionary) Gets the URL that corresponds to a set of route parameters. (Inherited from Control.)
Public method GetRouteUrl(String, Object) Gets the URL that corresponds to a set of route parameters and a route name. (Inherited from Control.)
Public method GetRouteUrl(String, RouteValueDictionary) Gets the URL that corresponds to a set of route parameters and a route name. (Inherited from Control.)
Public method GetService Returns the requested chart service.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetUniqueIDRelativeTo Returns the prefixed portion of the UniqueID property of the specified control. (Inherited from Control.)
Public method HasControls Determines if the server control contains any child controls. (Inherited from Control.)
Protected method HasEvents Returns a value indicating whether events are registered for the control or any child controls. (Inherited from Control.)
Public method HitTest(Int32, Int32) Determines the chart element, if any, that is located at a point defined by the given X and Y coordinates.
Public method HitTest(Int32, Int32, Boolean) Determines the chart element, if any, that is located at a point defined by given X and Y coordinates. Transparent elements can optionally be ignored.
Public method HitTest(Int32, Int32, ChartElementType) Determines whether a chart element of a given type is located at a point defined by the given X and Y coordinates.
Public method HitTest(Int32, Int32, Boolean, ChartElementType[]) Determines whether a chart element that is one of the specified types is located at a point defined by the given X and Y coordinates.
Protected method IsLiteralContent Infrastructure. Determines if the server control holds only literal content. (Inherited from Control.)
Protected method LoadControlState Restores control-state information from a previous page request that was saved by the SaveControlState method. (Inherited from Control.)
Public method LoadTemplate(Stream) Loads a template into the Chart control from an image stream.
Public method LoadTemplate(String) Loads a template with the specified filename from the disk.
Protected method LoadViewState Restores view-state information from a previous page request that was saved by the SaveViewState method. (Overrides WebControl.LoadViewState(Object).)
Protected method MapPathSecure Retrieves the physical path that a virtual path, either absolute or relative, maps to. (Inherited from Control.)
Protected method MarkAsDataBound Sets the state of the control in view state as successfully bound to data. (Inherited from DataBoundControl.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method MergeStyle Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers. (Inherited from WebControl.)
Protected method OnBubbleEvent Determines whether the event for the server control is passed up the page's UI server control hierarchy. (Inherited from Control.)
Protected method OnClick Invokes delegates that were registered with the Click event.
Protected method OnCustomize Occurs when all chart data is prepared to be customized before drawing.
Protected method OnCustomizeLegend Occurs when all chart legend data is prepared to be customized before drawing.
Protected method OnCustomizeMapAreas Occurs when chart image map data is prepared to be rendered.
Protected method OnDataBinding Raises the DataBinding event. (Inherited from Control.)
Protected method OnDataBound Raises the DataBound event. (Inherited from BaseDataBoundControl.)
Protected method OnDataPropertyChanged Rebinds the data-bound control to its data after one of the base data source identification properties changes. (Inherited from DataBoundControl.)
Protected method OnDataSourceViewChanged Raises the DataSourceViewChanged event. (Inherited from DataBoundControl.)
Protected method OnFormatNumber Converts a numeric value to a string.
Protected method OnInit Handles the Init event. (Inherited from BaseDataBoundControl.)
Protected method OnLoad Handles the Control.Load event. (Inherited from DataBoundControl.)
Protected method OnPagePreLoad Sets the initialized state of the data-bound control before the control is loaded. (Inherited from DataBoundControl.)
Protected method OnPostPaint Occurs when a chart element is painted.
Protected method OnPrePaint Occurs when the chart element background is painted.
Protected method OnPreRender Handles the PreRender event. (Inherited from BaseDataBoundControl.)
Protected method OnUnload Raises the Unload event. (Inherited from Control.)
Protected method OpenFile Gets a Stream used to read a file. (Inherited from Control.)
Public method Paint Draws the chart image in the graphics.
Protected method PerformDataBinding Data binds the specified data source to the Chart control. (Overrides DataBoundControl.PerformDataBinding(IEnumerable).)
Protected method PerformSelect Retrieves data from the associated data source. (Inherited from DataBoundControl.)
Protected method RaiseBubbleEvent Assigns any sources of the event and its information to the control's parent. (Inherited from Control.)
Protected method RaisePostBackEvent Raises events for the Chart control when a form is posted back to the server.
Protected method RemovedControl Called after a child control is removed from the Controls collection of the Control object. (Inherited from Control.)
Protected method Render Renders the Chart control to the output parameter specified. (Overrides WebControl.Render(HtmlTextWriter).)
Public method RenderBeginTag Renders the HTML opening tag of the control to the specified writer. This method is used primarily by control developers. (Inherited from WebControl.)
Protected method RenderChildren Outputs the content of a server control's children to a provided HtmlTextWriter object, which writes the content to be rendered on the client. (Inherited from Control.)
Protected method RenderContents Renders the contents of the control to the specified writer. This method is used primarily by control developers. (Inherited from WebControl.)
Public method RenderControl(HtmlTextWriter) Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled. (Inherited from Control.)
Protected method RenderControl(HtmlTextWriter, ControlAdapter) Outputs server control content to a provided HtmlTextWriter object using a provided ControlAdapter object. (Inherited from Control.)
Public method RenderEndTag Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers. (Inherited from WebControl.)
Public method ResetAutoValues Resets automatically calculated chart property values to "Auto".
Protected method ResolveAdapter Gets the control adapter responsible for rendering the specified control. (Inherited from Control.)
Public method ResolveClientUrl Gets a URL that can be used by the browser. (Inherited from Control.)
Public method ResolveUrl Converts a URL into one that is usable on the requesting client. (Inherited from Control.)
Protected method SaveControlState Saves any server control state changes that have occurred since the time the page was posted back to the server. (Inherited from Control.)
Public method SaveImage(Stream) Saves the chart image to the specified stream. The properties ImageType, Compression and other Chart control properties are used.
Public method SaveImage(String) Saves the chart image to the specified file. The properties ImageType, Compression and other Chart control properties are used.
Public method SaveImage(Stream, ChartImageFormat) Saves the chart image to the specified stream.
Public method SaveImage(String, ChartImageFormat) Saves a chart image to the file.
Protected method SaveViewState Saves any server control view-state changes that have occurred since the time the page was posted back to the server. (Overrides WebControl.SaveViewState().)
Public method SaveXml Saves the current state of the chart to an XML file. This method is mainly used for support purposes. The executing thread must have file write permission.
Protected method SetDesignModeState Sets design-time data for a control. (Inherited from Control.)
Public method SetRenderMethodDelegate Infrastructure. Assigns an event handler delegate to render the server control and its content into its parent control. (Inherited from Control.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Protected method TrackViewState Causes the control to track changes to its view state so they can be stored in the object's ViewState property. (Inherited from WebControl.)
Protected method ValidateDataSource Verifies that a data-bound control can work with the object it will bind to. (Overrides DataBoundControl.ValidateDataSource(Object).)
Top
Events

  Name Description
Public event Click Occurs when the active image map area defined by PostBackValue() on the Chart control is clicked.
Public event Customize Occurs just before the chart image is drawn. All chart data is available and all chart properties have been set.
Public event CustomizeLegend Occurs just before the chart legend is drawn. Use this event to customize the chart legend items.
Public event CustomizeMapAreas Occurs just before the chart image map is rendered. Use this event to customize the map areas items.
Public event DataBinding Occurs when the server control binds to a data source. (Inherited from Control.)
Public event DataBound Occurs after the server control binds to a data source. (Inherited from BaseDataBoundControl.)
Public event Disposed Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested. (Inherited from Control.)
Public event FormatNumber Called when a numeric value has to be converted to a string.
Public event Init Occurs when the server control is initialized, which is the first step in its lifecycle. (Inherited from Control.)
Public event Load Occurs when the server control is loaded into the Page object. (Inherited from Control.)
Public event PostPaint Occurs after chart element was drawn. This event is raised for elements such as ChartArea and Legend.
Public event PrePaint Occurs after the chart element backround is drawn. This event is raised for elements such as ChartArea and Legend.
Public event PreRender Occurs after the Control object is loaded but prior to rendering. (Inherited from Control.)
Public event Unload Occurs when the server control is unloaded from memory. (Inherited from Control.)
Top
Extension Methods

  Name Description
Public Extension Method EnablePersistedSelection Enables selection to be persisted in data controls that support selection and paging. (Defined by DynamicDataExtensions.)
Public Extension Method FindDataSourceControl Returns the data source that is associated with the data control for the specified control. (Defined by DynamicDataExtensions.)
Public Extension Method FindFieldTemplate Returns the field template for the specified column in the specified control's naming container. (Defined by DynamicDataExtensions.)
Public Extension Method FindMetaTable Returns the metatable object for the containing data control. (Defined by DynamicDataExtensions.)
Top
Explicit Interface Implementations

  Name Description
Explicit interface implemetation Private method IAttributeAccessor.GetAttribute Infrastructure. Gets an attribute of the Web control with the specified name. (Inherited from WebControl.)
Explicit interface implemetation Private method IAttributeAccessor.SetAttribute Sets an attribute of the Web control to the specified name and value. (Inherited from WebControl.)
Explicit interface implemetation Private property IControlBuilderAccessor.ControlBuilder For a description of this member, see IControlBuilderAccessor.ControlBuilder. (Inherited from Control.)
Explicit interface implemetation Private method IControlDesignerAccessor.GetDesignModeState For a description of this member, see IControlDesignerAccessor.GetDesignModeState. (Inherited from Control.)
Explicit interface implemetation Private method IControlDesignerAccessor.SetDesignModeState For a description of this member, see IControlDesignerAccessor.SetDesignModeState. (Inherited from Control.)
Explicit interface implemetation Private method IControlDesignerAccessor.SetOwnerControl Infrastructure. For a description of this member, see IControlDesignerAccessor.SetOwnerControl. (Inherited from Control.)
Explicit interface implemetation Private property IControlDesignerAccessor.UserData For a description of this member, see IControlDesignerAccessor.UserData. (Inherited from Control.)
Explicit interface implemetation Private property IDataBindingsAccessor.DataBindings For a description of this member, see IDataBindingsAccessor.DataBindings. (Inherited from Control.)
Explicit interface implemetation Private property IDataBindingsAccessor.HasDataBindings For a description of this member, see IDataBindingsAccessor.HasDataBindings. (Inherited from Control.)
Explicit interface implemetation Private property IExpressionsAccessor.Expressions For a description of this member, see IExpressionsAccessor.Expressions. (Inherited from Control.)
Explicit interface implemetation Private property IExpressionsAccessor.HasExpressions For a description of this member, see IExpressionsAccessor.HasExpressions. (Inherited from Control.)
Explicit interface implemetation Private method IParserAccessor.AddParsedSubObject For a description of this member, see IParserAccessor.AddParsedSubObject. (Inherited from Control.)
Explicit interface implemetation Private method IPostBackEventHandler.RaisePostBackEvent Raises events for the Chart control when a form is posted back to the server.
Top
Remarks

This class exposes all of the properties, methods and events of the Chart Web control.

Two important properties of the Chart class are the Series and ChartAreas properties, both of which are collection properties. The Series collection property stores Series objects, which are used to store data that is to be displayed, along with attributes of that data. The ChartAreas collection property stores ChartArea objects, which are primarily used to draw one or more charts using one set of axes.

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