WebChartControl Class
The chart control for ASP.NET applications.
Namespace: DevExpress.XtraCharts.Web
Assembly: DevExpress.XtraCharts.v17.2.Web.dll
Declaration
[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.ChartControl.bmp")]
[ToolboxTabName("DX.17.2: Data & Analytics")]
public class WebChartControl :
ASPxDataWebControl,
IChartContainer,
ISupportBarsInteraction,
IServiceProvider,
ICommandAwareControl<ChartCommandId>,
IChartRenderProvider,
IChartDataProvider,
IChartEventsProvider,
IChartInteractionProvider,
ISupportInitialize,
ICustomTypeDescriptor,
ICoreReference,
IRequiresLoadPostDataControl,
IEndInitAccessor,
ISharePointEmptyDesignTimeControl
Related API Members
The following members accept/return WebChartControl objects:
Library | Related API Members |
---|---|
eXpressApp Framework | ASPxChartListEditor.ChartControl |
ASPxPivotGridListEditor.ChartControl | |
ASP.NET Web Forms Controls | CallbackStateEventArgs.Chart |
Remarks
The WebChartControl class is the control used to embed charts into Web pages.
In general, the WebChartControl provides the same functionality as the ChartControl, taking into account the specifics of the ASP.NET environment. In particular, note that there are some restrictions on using Web charts in the Medium Trust permission level. For more information, refer to Concepts.
To provide data for the WebChartControl, you first need to create a data source (any object which implements either the IList, IListSource or IBindingList interfaces), and then use either the ASPxDataWebControlBase.DataSourceID property at design time, or programmatically populate the data source and assign it to your chart’s ASPxDataWebControlBase.DataSource property.
The subsequent steps are similar to the ones for the ChartControl, as explained in Providing Data.
For code examples, please refer to:
- How to: Add a Chart to a Web Page (Runtime Sample)
- How to: Add a Chart to an ASPxCallbackPanel during its Callback (Runtime Sample)
- How to: Bind a Web Chart to Data (Runtime Sample)
In addition, the WebChartControl control implements a comprehensive client-side object model, written in JavaScript (client API), allowing you to programmatically manipulate the control on the client. For a tutorial on this, refer to How to: Show Custom Data Over a Web Chart Using ASPxPopupControl.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the WebChartControl class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.