Chart 类

定义

用作 Chart 控件的根类。Serves as the root class of the Chart control.

public ref class Chart : System::Web::UI::WebControls::DataBoundControl, System::Web::UI::IPostBackEventHandler
[System.Drawing.ToolboxBitmap(typeof(System.Web.UI.DataVisualization.Charting.Chart), "ChartControl.ico")]
public class Chart : System.Web.UI.WebControls.DataBoundControl, System.Web.UI.IPostBackEventHandler
type Chart = class
    inherit DataBoundControl
    interface IPostBackEventHandler
Public Class Chart
Inherits DataBoundControl
Implements IPostBackEventHandler
继承
属性
实现

注解

此类公开图表 Web 控件的所有属性、方法和事件。This class exposes all of the properties, methods and events of the Chart Web control.

Chart类的两个重要属性Series是和ChartAreas属性,两者都是集合属性。Two important properties of the Chart class are the Series and ChartAreas properties, both of which are collection properties. 集合属性存储Series对象,这些对象用于存储要显示的数据,以及这些数据的属性。 SeriesThe Series collection property stores Series objects, which are used to store data that is to be displayed, along with attributes of that data. 集合属性存储ChartArea对象,这些对象主要用于使用一组轴绘制一个或多个图表。 ChartAreasThe ChartAreas collection property stores ChartArea objects, which are primarily used to draw one or more charts using one set of axes.

构造函数

Chart()

初始化 Chart 类的新实例。Initializes a new instance of the Chart class.

属性

AccessKey

获取或设置使您得以快速导航到 Web 服务器控件的访问键。Gets or sets the access key that allows you to quickly navigate to the Web server control.

(继承自 WebControl)
Adapter

获取控件的浏览器特定适配器。Gets the browser-specific adapter for the control.

(继承自 Control)
AlternateText

获取或设置当图表图像不可用时,Chart 控件中显示的替换文字。Gets or sets the alternate text displayed in the Chart control when the chart image is unavailable.

Annotations

获取或设置用于存储图表批注的 AnnotationCollection 对象。Gets or sets the AnnotationCollection object that is used to store chart annotations.

AntiAliasing

获取或设置一个值,该值决定绘制文本和图形时是否使用抗锯齿功能。Gets or sets a value that determines whether anti-aliasing is used when text and graphics are drawn.

AppRelativeTemplateSourceDirectory

获取或设置包含该控件的 PageUserControl 对象的应用程序相对虚拟目录。Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control.

(继承自 Control)
Attributes

获取与控件的特性不对应的任意特性(只用于呈现)的集合。Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.

(继承自 WebControl)
BackColor

获取或设置 Chart 对象的背景色。Gets or sets the background color of the Chart object.

BackGradientStyle

获取或设置 Chart 控件的背景渐变方向。Gets or sets the orientation for the background gradient of a Chart control. 还确定是否使用渐变。Also determines whether a gradient is used.

BackHatchStyle

获取或设置 Chart 控件的阴影样式。Gets or sets the hatching style of the Chart control.

BackImage

获取或设置 Chart 控件的背景图像。Gets or sets the background image of the Chart control.

BackImageAlignment

获取或设置用于 Unscaled 绘制模式的背景图像对齐方式。Gets or sets the background image alignment used for the Unscaled drawing mode.

BackImageTransparentColor

获取或设置 Chart 控件的颜色,该颜色将显示为透明效果。Gets or sets the color of the Chart control that will be displayed as transparent.

BackImageWrapMode

获取或设置 Chart 控件背景图像的绘制模式。Gets or sets the drawing mode for the background image of the Chart control.

BackSecondaryColor

获取或设置图表背景的辅助颜色。Gets or sets the secondary color of the chart background.

BindingContainer

获取包含该控件的数据绑定的控件。Gets the control that contains this control's data binding.

(继承自 Control)
BorderColor

获取或设置图表边框的颜色。Gets or sets the color of the chart border.

BorderlineColor

获取或设置整个图表图像边框的颜色。Gets or sets the color of the entire chart image border.

BorderlineDashStyle

获取或设置整个图表图像边框线的样式。Gets or sets the style of the entire chart image border line.

BorderlineWidth

获取或设置整个图表图像边框线的宽度。Gets or sets the width of the border line for the entire chart image.

BorderSkin

获取或设置 BorderSkin 对象,该对象提供 Chart 控件的边框外观功能。Gets or sets a BorderSkin object, which provides border skin functionality for the Chart control.

BorderStyle

获取或设置 Chart 的边框样式。Gets or sets the border style of the Chart.

BorderWidth

获取或设置图表边框的宽度。Gets or sets the width of the chart border.

BuildNumber

获取 Chart 控件的生成号。Gets the build number of the Chart control.

ChartAreas

获取用于存储 ChartAreaCollection 对象的只读 ChartArea 对象。Gets a read-only ChartAreaCollection object that is used to store ChartArea objects.

ChildControlsCreated

获取一个值,该值指示是否已创建服务器控件的子控件。Gets a value that indicates whether the server control's child controls have been created.

(继承自 Control)
ClientID

获取由 ASP.NET 生成的 HTML 标记的控件 ID。Gets the control ID for HTML markup that is generated by ASP.NET.

(继承自 Control)
ClientIDMode

获取或设置用于生成 ClientID 属性值的算法。Gets or sets the algorithm that is used to generate the value of the ClientID property.

(继承自 Control)
ClientIDSeparator

获取一个字符值,该值表示 ClientID 属性中使用的分隔符字符。Gets a character value representing the separator character used in the ClientID property.

(继承自 Control)
Compression

获取或设置图表图像的压缩量。Gets or sets the amount of compression for the chart image.

Context

为当前 Web 请求获取与服务器控件关联的 HttpContext 对象。Gets the HttpContext object associated with the server control for the current Web request.

(继承自 Control)
Controls

获取 ControlCollection 对象,该对象表示 UI 层次结构中的指定服务器控件的子控件。Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.

(继承自 Control)
ControlStyle

获取 Web 服务器控件的样式。Gets the style of the Web server control. 此属性主要由控件开发人员使用。This property is used primarily by control developers.

(继承自 WebControl)
ControlStyleCreated

获取一个值,该值指示是否已为 Style 属性创建了 ControlStyle 对象。Gets a value indicating whether a Style object has been created for the ControlStyle property. 此属性主要由控件开发人员使用。This property is primarily used by control developers.

(继承自 WebControl)
CssClass

获取或设置由 Web 服务器控件在客户端呈现的级联样式表 (CSS) 类。Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client.

(继承自 WebControl)
CurrentImageLocation

获取将呈现 Chart 控件的当前图像的 URL。Gets the URL of the current image into which the Chart control will be rendered.

DataItemContainer

如果命名容器实现 IDataItemContainer,则获取对命名容器的引用。Gets a reference to the naming container if the naming container implements IDataItemContainer.

(继承自 Control)
DataKeysContainer

如果命名容器实现 IDataKeysControl,则获取对命名容器的引用。Gets a reference to the naming container if the naming container implements IDataKeysControl.

(继承自 Control)
DataManipulator

获取 DataManipulator 对象,该对象提供处理数据的方法和属性。Gets a DataManipulator object, which provides methods and properties that handle data.

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.

(继承自 DataBoundControl)
DataSource

获取或设置 Chart 对象的数据源。Gets or sets the data source for the Chart object.

DataSourceID

获取或设置控件的 ID,数据绑定控件从该控件中检索其数据项列表。Gets or sets the ID of the control from which the data-bound control retrieves its list of data items.

(继承自 DataBoundControl)
DataSourceObject

获取一个对象,该对象实现 IDataSource 接口,以便提供对该对象的数据内容的访问。Gets an object that implements the IDataSource interface, which provides access to the object's data content.

(继承自 DataBoundControl)
DescriptionUrl

获取或设置 Chart 的详细说明的位置。Gets or sets the location of a detailed description of the Chart.

DesignMode

获取一个值,该值指示是否正在使用设计图面上的一个控件。Gets a value indicating whether a control is being used on a design surface.

(继承自 Control)
Enabled

获取或设置一个值,该值指示是否启用 Web 服务器控件。Gets or sets a value indicating whether the Web server control is enabled.

(继承自 WebControl)
EnableTheming

获取或设置一个值,该值指示主题是否应用于该控件。Gets or sets a value indicating whether themes apply to this control.

(继承自 WebControl)
EnableViewState

获取或设置一个标志,该标志决定了是否启用状态管理。Gets or sets a flag that determines whether state management is enabled.

Events

获取控件的事件处理程序委托列表。Gets a list of event handler delegates for the control. 此属性是只读的。This property is read-only.

(继承自 Control)
Font

获取控件的字体属性。Gets the font properties of the control.

ForeColor

获取或设置 Chart 控件的文本颜色。Gets or sets the text color of the Chart control.

HasAttributes

获取一个值,该值指示控件是否具有特性集。Gets a value indicating whether the control has attributes set.

(继承自 WebControl)
HasChildViewState

获取一个值,该值指示当前服务器控件的子控件是否具有任何已保存的视图状态设置。Gets a value indicating whether the current server control's child controls have any saved view-state settings.

(继承自 Control)
Height

获取或设置整个图表图像的高度(以像素为单位)。Gets or sets the height of the entire chart image in pixels.

ID

获取或设置分配给服务器控件的编程标识符。Gets or sets the programmatic identifier assigned to the server control.

(继承自 Control)
IdSeparator

获取用于分隔控件标识符的字符。Gets the character used to separate control identifiers.

(继承自 Control)
ImageLocation

获取或设置执行 ImageTag 呈现时,图像文件的保存位置。Gets or sets the location where an image file is saved when ImageTag rendering is performed.

Images

获取一个 NamedImagesCollection 对象,该对象存储图表的 NamedImage 对象。Gets a NamedImagesCollection object, which stores NamedImage objects for the chart.

ImageStorageMode

获取或设置图表图像呈现的存储模式。Gets or sets the storage mode for the chart image rendering.

ImageType

如果使用了 ImageTag 呈现,则获取或设置到其中呈现图表的图像类型。Gets or sets the type of image into which the chart is rendered if ImageTag rendering is used.

Initialized

获取一个值,该值指示数据绑定控件是否已经初始化。Gets a value indicating whether the data-bound control has been initialized.

(继承自 BaseDataBoundControl)
IsBoundUsingDataSourceID

获取指示是否设置 DataSourceID 属性的值。Gets a value indicating whether the DataSourceID property is set.

(继承自 BaseDataBoundControl)
IsChildControlStateCleared

获取一个值,该值指示该控件中包含的控件是否具有控件状态。Gets a value indicating whether controls contained within this control have control state.

(继承自 Control)
IsDataBindingAutomatic

获取一个值,该值指示数据绑定功能是否是自动的。Gets a value that indicates whether data binding is automatic.

(继承自 BaseDataBoundControl)
IsEnabled

获取一个值,该值指示是否启用控件。Gets a value indicating whether the control is enabled.

(继承自 WebControl)
IsMapAreaAttributesEncoded

获取或设置一个标志,该标志决定是否对映射区特性进行编码。Gets or sets a flag that determines whether map area attributes are encoded. 映射区属性可以从各种数据源加载数据。The map area attributes can load data from various data sources. 图表控件不会阻止最终用户加载来自不同数据源的不受信任数据。The Chart control does not prevent an end user from loading untrusted data from various data sources. 因此,建议您验证数据并自行对其编码。For this reason, it is recommended that you validate the data and encode it yourself.

IsMapEnabled

获取或设置一个标志,该标志决定了是否启用客户端图像映射。Gets or sets a flag that determines whether client-side image maps are enabled.

IsSoftShadows

获取或设置一个标志,该标志决定了在绘制阴影时是否应用平滑渐变。Gets or sets a flag that determines if a smooth gradient is applied when shadows are drawn.

IsTrackingViewState

获取一个值,用于指示服务器控件是否会将更改保存到其视图状态中。Gets a value that indicates whether the server control is saving changes to its view state.

(继承自 Control)
IsUsingModelBinders

获取一个值,该值指示是否使用模型绑定。Gets a value that indicates whether model binding is in use.

(继承自 DataBoundControl)
IsViewStateEnabled

获取一个值,该值指示是否为该控件启用了视图状态。Gets a value indicating whether view state is enabled for this control.

(继承自 Control)
ItemType

获取或设置强类型化数据绑定的数据项目类型的名称。Gets or sets the name of the data item type for strongly typed data binding.

(继承自 DataBoundControl)
Legends

获取或设置 LegendCollection 对象,该对象存储所有用于 Legend 控件的 Chart 对象。Gets or sets a LegendCollection object that is used to store all Legend objects used by the Chart control.

LoadViewStateByID

获取一个值,该值指示控件是否通过 ID 而不是索引参与加载其视图状态。Gets a value indicating whether the control participates in loading its view state by ID instead of index.

(继承自 Control)
MapAreas

获取一个 MapAreasCollection 对象,该对象存储图表的映射区。Gets a MapAreasCollection object, which stores the map areas for the chart.

NamingContainer

获取对服务器控件的命名容器的引用,此引用创建唯一的命名空间,以区分具有相同 ID 属性值的服务器控件。Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.

(继承自 Control)
Page

获取对包含服务器控件的 Page 实例的引用。Gets a reference to the Page instance that contains the server control.

(继承自 Control)
Palette

获取或设置 Chart 控件的调色板。Gets or sets the palette for the Chart control.

PaletteCustomColors

获取或设置自定义调色板颜色的数组。Gets or sets an array of custom palette colors.

Parent

获取对页 UI 层次结构中服务器控件的父控件的引用。Gets a reference to the server control's parent control in the page control hierarchy.

(继承自 Control)
RenderingCompatibility

获取一个值,该值指定呈现的 HTML 将与之兼容的 ASP.NET 版本。Gets a value that specifies the ASP.NET version that rendered HTML will be compatible with.

(继承自 Control)
RenderType

获取或设置用于显示图表图像的呈现方法。Gets or sets the rendering method used to display a chart image.

RequiresDataBinding

获取或设置一个值,该值指示是否应调用 DataBind() 方法。Gets or sets a value indicating whether the DataBind() method should be called.

(继承自 BaseDataBoundControl)
RightToLeft

获取或设置一个值,该值指示对于从右到左 (RTL) 语言,控件是否应从右到左绘制。Gets or sets a value that indicates whether the control should draw right-to-left for Right-to-Left (RTL) languages.

SelectArguments

获取数据绑定控件从数据源控件检索数据时使用的 DataSourceSelectArguments 对象。Gets a DataSourceSelectArguments object that the data-bound control uses when retrieving data from a data source control.

(继承自 DataBoundControl)
SelectMethod

为了读取数据要调用的方法的名称。The name of the method to call in order to read data.

(继承自 DataBoundControl)
Serializer

获取一个 ChartSerializer 对象,该对象用于图表序列化。Gets a ChartSerializer object, which is used for chart serialization.

Series

获取一个 SeriesCollection 对象,该对象包含 Series 对象。Gets a SeriesCollection object which contains Series objects.

Site

获取容器信息,该容器在呈现于设计图面上时承载当前控件。Gets information about the container that hosts the current control when rendered on a design surface.

(继承自 Control)
SkinID

获取或设置要应用于控件的外观。Gets or sets the skin to apply to the control.

(继承自 WebControl)
Style

获取将在 Web 服务器控件的外部标记上呈现为样式特性的文本特性的集合。Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.

(继承自 WebControl)
SupportsDisabledAttribute

获取一个值,该值指示在控件的 IsEnabled 属性为 disabled 时,控件是否应将呈现的 HTML 元素的 false 特性设置为“disabled”。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.

(继承自 BaseDataBoundControl)
SuppressExceptions

获取或设置一个标志,该标志决定是否应禁止显示非严重异常。Gets or sets a flag that determines whether noncritical exceptions should be suppressed.

TabIndex

获取或设置 Web 服务器控件的选项卡索引。Gets or sets the tab index of the Web server control.

(继承自 WebControl)
TagKey

获取对应于此 Web 服务器控件的 HtmlTextWriterTag 值。Gets the HtmlTextWriterTag value that corresponds to this Web server control. 此属性主要由控件开发人员使用。This property is used primarily by control developers.

(继承自 WebControl)
TagName

获取控件标记的名称。Gets the name of the control tag. 此属性主要由控件开发人员使用。This property is used primarily by control developers.

(继承自 WebControl)
TemplateControl

获取或设置对包含该控件的模板的引用。Gets or sets a reference to the template that contains this control.

(继承自 Control)
TemplateSourceDirectory

获取包含当前服务器控件的 PageUserControl 的虚拟目录。Gets the virtual directory of the Page or UserControl that contains the current server control.

(继承自 Control)
TextAntiAliasingQuality

获取或设置向文本应用抗锯齿时使用的 TextAntiAliasingQuality 类型。Gets or sets the TextAntiAliasingQuality type to use when applying anti-aliasing to text.

Titles

获取或设置 TitleCollection 对象,该对象存储所有用于 Title 控件的 Chart 对象。Gets or sets a TitleCollection object which stores all Title objects used by the Chart control.

ToolTip

获取或设置当鼠标指针悬停在 Web 服务器控件上时显示的文本。Gets or sets the text displayed when the mouse pointer hovers over the Web server control.

(继承自 WebControl)
UniqueID

获取服务器控件的唯一的、以分层形式限定的标识符。Gets the unique, hierarchically qualified identifier for the server control.

(继承自 Control)
ValidateRequestMode

获取或设置指示控件是否检查来自浏览器的客户端输入是否具有潜在危险值的值。Gets or sets a value that indicates whether the control checks client input from the browser for potentially dangerous values.

(继承自 Control)
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.

(继承自 Control)
ViewStateContent

获取或设置一个值,该值决定了在客户端保持的视图状态。Gets or sets a value that determines the view state to be persisted at the client.

ViewStateData

获取或设置控件的用户定义视图状态。Gets or sets the user-defined view state of the control.

ViewStateIgnoresCase

获取一个值,该值指示 StateBag 对象是否不区分大小写。Gets a value that indicates whether the StateBag object is case-insensitive.

(继承自 Control)
ViewStateMode

获取或设置此控件的视图状态模式。Gets or sets the view-state mode of this control.

(继承自 Control)
Visible

获取或设置一个值,该值指示服务器控件是否作为 UI 呈现在页上。Gets or sets a value that indicates whether a server control is rendered as UI on the page.

(继承自 Control)
Width

获取或设置整个图表图像的宽度(以像素为单位)。Gets or sets the width of the entire chart image in pixels.

方法

AddAttributesToRender(HtmlTextWriter)

将需要呈现的 HTML 特性和样式添加到指定的 HtmlTextWriterTag 中。Adds HTML attributes and styles that need to be rendered to the specified HtmlTextWriterTag. 此方法主要由控件开发人员使用。This method is used primarily by control developers.

(继承自 WebControl)
AddedControl(Control, Int32)

在子控件添加到 Control 对象的 Controls 集合后调用。Called after a child control is added to the Controls collection of the Control object.

(继承自 Control)
AddParsedSubObject(Object)

通知服务器控件,分析了一个元素(XML 或 HTML),并将该元素添加到服务器控件的 ControlCollection 对象中。Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's ControlCollection object.

(继承自 Control)
AlignDataPointsByAxisLabel()

使用数据点的轴标签沿 X 轴排列数据点。Aligns data points along the X axis using their axis labels. 适用于对多个系列编制了索引且其 X 值是字符串的情况。Applicable when multiple series are indexed and their X-values are strings.

AlignDataPointsByAxisLabel(PointSortOrder)

使用数据点的轴标签对齐数据点。Aligns data points using their axis labels. 使用指定的排序顺序排列图表中的所有系列。All series in the chart are aligned, using the specified sort order.

AlignDataPointsByAxisLabel(String)

使用数据点的轴标签沿 X 轴排列不同系列的数据点。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.

AlignDataPointsByAxisLabel(String, PointSortOrder)

使用数据点的轴标签对齐数据点。Aligns data points using their axis labels.

ApplyPaletteColors()

设置自动分配的系列和数据点颜色,以允许在运行时以编程方式进行访问。Sets the automatically assigned series and data point colors, to allow programmatic access at run time.

ApplyStyle(Style)

将指定样式的所有非空白元素复制到 Web 控件,覆盖控件的所有现有的样式元素。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.

(继承自 WebControl)
ApplyStyleSheetSkin(Page)

将页样式表中定义的样式属性应用到控件。Applies the style properties defined in the page style sheet to the control.

(继承自 Control)
BeginRenderTracing(TextWriter, Object)

开始输出数据的设计时追踪。Begins design-time tracing of rendering data.

(继承自 Control)
BuildProfileTree(String, Boolean)

收集有关服务器控件的信息并将该信息发送到 Trace 属性,在启用页的跟踪功能时将显示该属性。Gathers information about the server control and delivers it to the Trace property to be displayed when tracing is enabled for the page.

(继承自 Control)
ClearCachedClientID()

将缓存的 ClientID 值设置为 nullSets the cached ClientID value to null.

(继承自 Control)
ClearChildControlState()

删除服务器控件的子控件的控件状态信息。Deletes the control-state information for the server control's child controls.

(继承自 Control)
ClearChildState()

删除服务器控件的所有子控件的视图状态和控件状态信息。Deletes the view-state and control-state information for all the server control's child controls.

(继承自 Control)
ClearChildViewState()

删除服务器控件的所有子控件的视图状态信息。Deletes the view-state information for all the server control's child controls.

(继承自 Control)
ClearEffectiveClientIDMode()

将当前控件实例和任何子控件的 ClientIDMode 属性设置为 InheritSets the ClientIDMode property of the current control instance and of any child controls to Inherit.

(继承自 Control)
ConfirmInitState()

设置数据绑定控件的初始化状态。Sets the initialized state of the data-bound control.

(继承自 BaseDataBoundControl)
CopyBaseAttributes(WebControl)

Style 对象未封装的属性从指定的 Web 服务器控件复制到从中调用此方法的 Web 服务器控件。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.

(继承自 WebControl)
CreateChildControls()

由 ASP.NET 页框架调用,以通知服务器控件在准备回发或呈现时使用基于撰写的实现来创建其所包含任何子控件。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.

(继承自 Control)
CreateControlCollection()

创建一个新 ControlCollection 对象来保存服务器控件的子控件(包括文本控件和服务器控件)。Creates a new ControlCollection object to hold the child controls (both literal and server) of the server control.

(继承自 Control)
CreateControlStyle()

创建由 WebControl 类在内部用来实现所有与样式有关的属性的样式对象。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.

(继承自 WebControl)
CreateDataSourceSelectArguments()

如果未指定参数,则创建由数据绑定控件使用的默认 DataSourceSelectArguments 对象。Creates a default DataSourceSelectArguments object used by the data-bound control if no arguments are specified.

(继承自 DataBoundControl)
DataBind()

将数据源绑定到被调用的服务器控件及其所有子控件。Binds a data source to the invoked server control and all its child controls.

(继承自 BaseDataBoundControl)
DataBind(Boolean)

将数据源绑定到调用的服务器控件及其所有子控件,同时可以选择引发 DataBinding 事件。Binds a data source to the invoked server control and all its child controls with an option to raise the DataBinding event.

(继承自 Control)
DataBindChildren()

将数据源绑定到服务器控件的子控件。Binds a data source to the server control's child controls.

(继承自 Control)
DataBindCrossTable(IEnumerable, String, String, String, String)

数据将图表绑定到表,其中具有在给定列中为每个唯一值所创建一个序列。Data binds a chart to the table, with one series created per unique value in a given column.

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.

DataBindTable(IEnumerable)

自动创建系列数据并将其绑定到指定的数据表。Automatically creates and binds series data to the specified data table.

DataBindTable(IEnumerable, String)

自动创建系列数据并将其绑定到指定的数据表,还可以选择填充 X 值。Automatically creates and binds series data to the specified data table, and optionally populates X-values.

Dispose()

使用 IDisposable 接口释放对象。Disposes of the object, using the IDisposable interface.

Dispose(Boolean)

释放非托管资源和(可选)托管资源。Releases unmanaged and, optionally, managed resources.

EndRenderTracing(TextWriter, Object)

结束输出数据的设计时追踪。Ends design-time tracing of rendering data.

(继承自 Control)
EnsureChildControls()

确定服务器控件是否包含子控件。Determines whether the server control contains child controls. 如果不包含,则创建子控件。If it does not, it creates child controls.

(继承自 Control)
EnsureDataBound()

如果设置了 DataBind() 属性且数据绑定控件标记为需要绑定,则调用 DataSourceID 方法。Calls the DataBind() method if the DataSourceID property is set and the data-bound control is marked to require binding.

(继承自 BaseDataBoundControl)
EnsureID()

为尚未分配标识符的控件创建标识符。Creates an identifier for controls that do not have an identifier assigned.

(继承自 Control)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
FindControl(String)

在当前的命名容器中搜索带指定 id 参数的服务器控件。Searches the current naming container for a server control with the specified id parameter.

(继承自 Control)
FindControl(String, Int32)

使用指定的 idpathOffset 参数(该参数有助于搜索)中指定的整数在当前命名容器中搜索服务器控件。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. 不应重写此版本的 FindControl 方法。You should not override this version of the FindControl method.

(继承自 Control)
Focus()

为控件设置输入焦点。Sets input focus to a control.

(继承自 Control)
GetChartElementOutline(Object, ChartElementType)

返回图表元素的轮廓。Returns the chart element outline.

GetData()

检索数据绑定控件用于执行数据操作的 DataSourceView 对象。Retrieves a DataSourceView object that the data-bound control uses to perform data operations.

(继承自 DataBoundControl)
GetDataSource()

检索与数据绑定控件关联的 IDataSource 接口(如果有)。Retrieves the IDataSource interface that the data-bound control is associated with, if any.

(继承自 DataBoundControl)
GetDesignModeState()

获取控件的设计时数据。Gets design-time data for a control.

(继承自 Control)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetHtmlImageMap(String)

返回当前所呈现图表的 HTML 图像映射。Returns the HTML image map of the currently rendered chart. 必须在调用此方法之前先调用 Chart 中重载的 SaveImage 方法之一。One of the overloaded SaveImage methods in the Chart must be called before calling this method.

GetRouteUrl(Object)

获取与一组路由参数对应的 URL。Gets the URL that corresponds to a set of route parameters.

(继承自 Control)
GetRouteUrl(RouteValueDictionary)

获取与一组路由参数对应的 URL。Gets the URL that corresponds to a set of route parameters.

(继承自 Control)
GetRouteUrl(String, Object)

获取与一组路由参数以及某个路由名称对应的 URL。Gets the URL that corresponds to a set of route parameters and a route name.

(继承自 Control)
GetRouteUrl(String, RouteValueDictionary)

获取与一组路由参数以及某个路由名称对应的 URL。Gets the URL that corresponds to a set of route parameters and a route name.

(继承自 Control)
GetService(Type)

返回所请求的图表服务。Returns the requested chart service.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetUniqueIDRelativeTo(Control)

返回指定控件的 UniqueID 属性的前缀部分。Returns the prefixed portion of the UniqueID property of the specified control.

(继承自 Control)
HasControls()

确定服务器控件是否包含任何子控件。Determines if the server control contains any child controls.

(继承自 Control)
HasEvents()

返回一个值,该值指示是否为控件或任何子控件注册事件。Returns a value indicating whether events are registered for the control or any child controls.

(继承自 Control)
HitTest(Int32, Int32)

确定位于由所给定 X、Y 坐标定义的点处的图表元素(如果有)。Determines the chart element, if any, that is located at a point defined by the given X and Y coordinates.

HitTest(Int32, Int32, Boolean)

确定位于由给定 X 和 Y 坐标定义的点处的图表元素(如果有)。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.

HitTest(Int32, Int32, Boolean, ChartElementType[])

确定指定类型之一的图表元素是否位于给定 X 和 Y 坐标定义的点。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.

HitTest(Int32, Int32, ChartElementType)

确定给定类型的图表元素是否位于由给定的 X 和 Y 坐标定义的点处。Determines whether a chart element of a given type is located at a point defined by the given X and Y coordinates.

IsLiteralContent()

确定服务器控件是否只包含文字内容。Determines if the server control holds only literal content.

(继承自 Control)
LoadControlState(Object)

SaveControlState() 方法保存的上一个页请求还原控件状态信息。Restores control-state information from a previous page request that was saved by the SaveControlState() method.

(继承自 Control)
LoadTemplate(Stream)

将图像流中的模板加载到 Chart 控件中。Loads a template into the Chart control from an image stream.

LoadTemplate(String)

从磁盘中加载具有指定文件名的模板。Loads a template with the specified filename from the disk.

LoadViewState(Object)

从用 SaveViewState() 方法保存的上一个页面请求还原视图状态信息。Restores view-state information from a previous page request that was saved by the SaveViewState() method.

MapPathSecure(String)

检索虚拟路径(绝对的或相对的)映射到的物理路径。Retrieves the physical path that a virtual path, either absolute or relative, maps to.

(继承自 Control)
MarkAsDataBound()

将视图状态中的控件状态设置为成功绑定到数据。Sets the state of the control in view state as successfully bound to data.

(继承自 DataBoundControl)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MergeStyle(Style)

将指定样式的所有非空白元素复制到 Web 控件,但不覆盖该控件现有的任何样式元素。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.

(继承自 WebControl)
OnBubbleEvent(Object, EventArgs)

确定服务器控件的事件是否沿页的 UI 服务器控件层次结构向上传递。Determines whether the event for the server control is passed up the page's UI server control hierarchy.

(继承自 Control)
OnClick(ImageMapEventArgs)

调用使用 Click 事件注册的代理。Invokes delegates that were registered with the Click event.

OnCreatingModelDataSource(CreatingModelDataSourceEventArgs)

引发 CreatingModelDataSource 事件。Raises the CreatingModelDataSource event.

(继承自 DataBoundControl)
OnCustomize(EventArgs)

在绘制之前所有图表数据已准备好进行自定义时发生。Occurs when all chart data is prepared to be customized before drawing.

OnCustomizeLegend(CustomizeLegendEventArgs)

在绘制之前所有图表图例数据已准备好进行自定义时发生。Occurs when all chart legend data is prepared to be customized before drawing.

OnCustomizeMapAreas(CustomizeMapAreasEventArgs)

在绘制之前映射区域数据已准备好进行自定义时发生。Occurs when map areas data is prepared to be customized before drawing.

OnDataBinding(EventArgs)

引发 DataBinding 事件。Raises the DataBinding event.

(继承自 Control)
OnDataBound(EventArgs)

引发 DataBound 事件。Raises the DataBound event.

(继承自 BaseDataBoundControl)
OnDataPropertyChanged()

在某一基数据源标识属性更改后,将数据绑定控件重新绑定到其数据。Rebinds the data-bound control to its data after one of the base data source identification properties changes.

(继承自 DataBoundControl)
OnDataSourceViewChanged(Object, EventArgs)

引发 DataSourceViewChanged 事件。Raises the DataSourceViewChanged event.

(继承自 DataBoundControl)
OnFormatNumber(Object, FormatNumberEventArgs)

在将数值转换为字符串时发生。Occurs when converting a numeric value to a string.

OnInit(EventArgs)

处理 Init 事件。Handles the Init event.

(继承自 BaseDataBoundControl)
OnLoad(EventArgs)

处理 Load 事件。Handles the Load event.

(继承自 DataBoundControl)
OnPagePreLoad(Object, EventArgs)

在加载数据绑定控件之前设置该控件的初始化状态。Sets the initialized state of the data-bound control before the control is loaded.

(继承自 DataBoundControl)
OnPostPaint(ChartPaintEventArgs)

在绘制图表元素后发生。Occurs after a chart element is painted.

OnPrePaint(ChartPaintEventArgs)

在绘制图表元素背景后发生。Occurs after the chart element background is painted.

OnPreRender(EventArgs)

处理 PreRender 事件。Handles the PreRender event.

(继承自 BaseDataBoundControl)
OnUnload(EventArgs)

引发 Unload 事件。Raises the Unload event.

(继承自 Control)
OpenFile(String)

获取用于读取文件的 StreamGets a Stream used to read a file.

(继承自 Control)
Paint(Graphics, Rectangle)

在图形中绘制图表图像。Draws the chart image in the graphics.

PerformDataBinding(IEnumerable)

将指定数据源数据绑定到 Chart 控件。Data binds the specified data source to the Chart control.

PerformSelect()

从关联的数据源中检索数据。Retrieves data from the associated data source.

(继承自 DataBoundControl)
RaiseBubbleEvent(Object, EventArgs)

将所有事件源及其信息分配给控件的父级。Assigns any sources of the event and its information to the control's parent.

(继承自 Control)
RaisePostBackEvent(String)

当窗体回发到服务器时引发 Chart 控件的事件。Raises events for the Chart control when a form is posted back to the server.

RemovedControl(Control)

Control 对象的 Controls 集合移除子控件后调用。Called after a child control is removed from the Controls collection of the Control object.

(继承自 Control)
Render(HtmlTextWriter)

Chart 控件呈现到指定的输出参数。Renders the Chart control to the output parameter specified.

RenderBeginTag(HtmlTextWriter)

将控件的 HTML 开始标记呈现到指定的编写器中。Renders the HTML opening tag of the control to the specified writer. 此方法主要由控件开发人员使用。This method is used primarily by control developers.

(继承自 WebControl)
RenderChildren(HtmlTextWriter)

将服务器控件子级的内容输出到提供的 HtmlTextWriter 对象,此对象编写将在客户端呈现的内容。Outputs the content of a server control's children to a provided HtmlTextWriter object, which writes the content to be rendered on the client.

(继承自 Control)
RenderContents(HtmlTextWriter)

将控件的内容呈现到指定的编写器中。Renders the contents of the control to the specified writer. 此方法主要由控件开发人员使用。This method is used primarily by control developers.

(继承自 WebControl)
RenderControl(HtmlTextWriter)

将服务器控件内容输出到所提供的 HtmlTextWriter 对象,如果启用了跟踪,则还将存储有关该控件的跟踪信息。Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.

(继承自 Control)
RenderControl(HtmlTextWriter, ControlAdapter)

使用提供的 HtmlTextWriter 对象将服务器控件内容输出到提供的 ControlAdapter 对象。Outputs server control content to a provided HtmlTextWriter object using a provided ControlAdapter object.

(继承自 Control)
RenderEndTag(HtmlTextWriter)

将控件的 HTML 结束标记呈现到指定的编写器中。Renders the HTML closing tag of the control into the specified writer. 此方法主要由控件开发人员使用。This method is used primarily by control developers.

(继承自 WebControl)
ResetAutoValues()

将自动计算的图表属性值重置为“Auto”。Resets automatically calculated chart property values to "Auto".

ResolveAdapter()

获取负责呈现指定控件的控件适配器。Gets the control adapter responsible for rendering the specified control.

(继承自 Control)
ResolveClientUrl(String)

获取浏览器可以使用的 URL。Gets a URL that can be used by the browser.

(继承自 Control)
ResolveUrl(String)

将 URL 转换为在请求客户端可用的 URL。Converts a URL into one that is usable on the requesting client.

(继承自 Control)
SaveControlState()

保存将页面回发到服务器之后发生的所有服务器控件状态更改。Saves any server control state changes that have occurred since the time the page was posted back to the server.

(继承自 Control)
SaveImage(Stream)

将图表图像保存到指定的流。Saves the chart image to the specified stream. 使用属性 ImageTypeCompression 以及其他 Chart 控件属性。The properties ImageType, Compression and other Chart control properties are used.

SaveImage(Stream, ChartImageFormat)

将图表图像保存到指定的流。Saves the chart image to the specified stream.

SaveImage(String)

将图表图像保存到指定的文件。Saves the chart image to the specified file. 使用属性 ImageTypeCompression 以及其他 Chart 控件属性。The properties ImageType, Compression and other Chart control properties are used.

SaveImage(String, ChartImageFormat)

将图表图像保存到文件。Saves a chart image to the file.

SaveViewState()

保存将页面回发到服务器之后发生的所有服务器控件视图状态更改。Saves any server control view-state changes that have occurred since the time the page was posted back to the server.

SaveXml(String)

将图表的当前状态保存到 XML 文件。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.

SetDesignModeState(IDictionary)

为控件设置设计时数据。Sets design-time data for a control.

(继承自 Control)
SetRenderMethodDelegate(RenderMethod)

分配事件处理程序委托,以将服务器控件及其内容呈现到父控件中。Assigns an event handler delegate to render the server control and its content into its parent control.

(继承自 Control)
SetTraceData(Object, Object)

使用跟踪数据键和跟踪数据值,为呈现数据的设计时追踪设置跟踪数据。Sets trace data for design-time tracing of rendering data, using the trace data key and the trace data value.

(继承自 Control)
SetTraceData(Object, Object, Object)

使用跟踪对象、跟踪数据键和跟踪数据值,为呈现数据的设计时追踪设置跟踪数据。Sets trace data for design-time tracing of rendering data, using the traced object, the trace data key, and the trace data value.

(继承自 Control)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)
TrackViewState()

导致要跟踪的控件的视图状态的更改,以便这些更改可以存储到控件的 StateBag 对象中。Causes view-state changes to the control to be tracked so they can be stored in the control's StateBag object.

(继承自 DataBoundControl)
ValidateDataSource(Object)

检查数据绑定控件是否可与它将绑定到的对象一同使用。Verifies that a data-bound control can work with the object it will bind to.

事件

CallingDataMethods

在数据方法正被调用时发生。Occurs when data methods are being called.

(继承自 DataBoundControl)
Click

单击 PostBackValue 控件上由 Chart 定义的活动图像映射区时发生。Occurs when the active image map area defined by PostBackValue on the Chart control is clicked.

CreatingModelDataSource

ModelDataSource 对象正被创建时发生。Occurs when the ModelDataSource object is being created.

(继承自 DataBoundControl)
Customize

恰好在绘制图表图像之前发生。Occurs just before the chart image is drawn. 所有图表数据都可用并且已设置所有图表属性。All chart data is available and all chart properties have been set.

CustomizeLegend

恰好在绘制图表图例之前发生。Occurs just before the chart legend is drawn. 可使用此事件自定义图表图例项。Use this event to customize the chart legend items.

CustomizeMapAreas

恰好在呈现图像映射之前发生。Occurs just before the chart image map is rendered. 可使用此事件自定义映射区项。Use this event to customize the map areas items.

DataBinding

当服务器控件绑定到数据源时发生。Occurs when the server control binds to a data source.

(继承自 Control)
DataBound

在服务器控件绑定到数据源后发生。Occurs after the server control binds to a data source.

(继承自 BaseDataBoundControl)
Disposed

当从内存释放服务器控件时发生,这是请求 ASP.NET 页时服务器控件生存期的最后阶段。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.

(继承自 Control)
FormatNumber

在必须将数值转换为字符串时调用。Called when a numeric value has to be converted to a string.

Init

当服务器控件初始化时发生;初始化是控件生存期的第一步。Occurs when the server control is initialized, which is the first step in its lifecycle.

(继承自 Control)
Load

当服务器控件加载到 Page 对象中时发生。Occurs when the server control is loaded into the Page object.

(继承自 Control)
PostPaint

绘制图表元素之后发生。Occurs after chart element was drawn. 此事件对诸如 ChartAreaLegend 等元素引发。This event is raised for elements such as ChartArea and Legend.

PrePaint

在绘制图表元素背景后发生。Occurs after the chart element background is drawn. 此事件对诸如 ChartAreaLegend 等元素引发。This event is raised for elements such as ChartArea and Legend.

PreRender

在加载 Control 对象之后、呈现之前发生。Occurs after the Control object is loaded but prior to rendering.

(继承自 Control)
Unload

当服务器控件从内存中卸载时发生。Occurs when the server control is unloaded from memory.

(继承自 Control)

显式接口实现

IAttributeAccessor.GetAttribute(String)

获取具有指定名称的 Web 控件的特性。Gets an attribute of the Web control with the specified name.

(继承自 WebControl)
IAttributeAccessor.SetAttribute(String, String)

将 Web 控件的特性设置为指定的名称和值。Sets an attribute of the Web control to the specified name and value.

(继承自 WebControl)
IControlBuilderAccessor.ControlBuilder

有关此成员的说明,请参见 ControlBuilderFor a description of this member, see ControlBuilder.

(继承自 Control)
IControlDesignerAccessor.GetDesignModeState()

有关此成员的说明,请参见 GetDesignModeState()For a description of this member, see GetDesignModeState().

(继承自 Control)
IControlDesignerAccessor.SetDesignModeState(IDictionary)

有关此成员的说明,请参见 SetDesignModeState(IDictionary)For a description of this member, see SetDesignModeState(IDictionary).

(继承自 Control)
IControlDesignerAccessor.SetOwnerControl(Control)

有关此成员的说明,请参见 SetOwnerControl(Control)For a description of this member, see SetOwnerControl(Control).

(继承自 Control)
IControlDesignerAccessor.UserData

有关此成员的说明,请参见 UserDataFor a description of this member, see UserData.

(继承自 Control)
IDataBindingsAccessor.DataBindings

有关此成员的说明,请参见 DataBindingsFor a description of this member, see DataBindings.

(继承自 Control)
IDataBindingsAccessor.HasDataBindings

有关此成员的说明,请参见 HasDataBindingsFor a description of this member, see HasDataBindings.

(继承自 Control)
IExpressionsAccessor.Expressions

有关此成员的说明,请参见 ExpressionsFor a description of this member, see Expressions.

(继承自 Control)
IExpressionsAccessor.HasExpressions

有关此成员的说明,请参见 HasExpressionsFor a description of this member, see HasExpressions.

(继承自 Control)
IParserAccessor.AddParsedSubObject(Object)

有关此成员的说明,请参见 AddParsedSubObject(Object)For a description of this member, see AddParsedSubObject(Object).

(继承自 Control)
IPostBackEventHandler.RaisePostBackEvent(String)

当窗体回发到服务器时引发 Chart 控件的事件。Raises events for the Chart control when a form is posted back to the server.

扩展方法

EnablePersistedSelection(BaseDataBoundControl)

使选定内容能够保留在支持选择和分页的数据控件中。Enables selection to be persisted in data controls that support selection and paging.

FindDataSourceControl(Control)

返回与指定控件的数据控件关联的数据源。Returns the data source that is associated with the data control for the specified control.

FindFieldTemplate(Control, String)

返回指定控件的命名容器中指定列的字段模板。Returns the field template for the specified column in the specified control's naming container.

FindMetaTable(Control)

返回包含数据控件的元表对象。Returns the metatable object for the containing data control.

适用于