WebChartControl Class
The chart control for ASP.NET applications.
Namespace: DevExpress.XtraCharts.Web
Assembly: DevExpress.XtraCharts.v24.1.Web.dll
NuGet Package: DevExpress.Web.Visualization
Declaration
public class WebChartControl :
ASPxDataWebControl,
IChartContainer,
IChartRenderProvider,
IChartDataProvider,
IChartEventsProvider,
IChartInteractionProvider,
ISupportInitialize,
ICustomTypeDescriptor,
ICoreReference,
IRequiresLoadPostDataControl,
IEndInitAccessor,
ISharePointEmptyDesignTimeControl
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, 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, to learn more on the available client model). For a tutorial on this, refer to How to: Show Custom Data Over a Web Chart Using ASPxPopupControl.