[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Collapse]Chart Control
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Concepts
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Collapse]Examples
     How to: Add a Chart to a Web Application
     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 an Individual Series to a Data Source (Runtime Sample)
     How to: Bind a Web Chart to Data (Runtime Sample)
     How to: Bind a Web Chart to an ASPxPivotGrid
     How to: Show Custom Data Over a Web Chart Using ASPxPopupControl
     How to: Use the Client-Side Model of the WebChartControl
     How to: Show Custom Tooltips for a WebChartControl
     How to: Invoke the Client Chart Designer
     How to: Configure a Chart for Printing
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Bind a Web Chart to Data (Runtime Sample)

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E1015.

This example demonstrates how to bind a web chart to data using series templates. For specific information on working with the ASP.NET Chart Control, refer to Concepts.

To accomplish this task, create a new ASP.NET Web Application, add a WebChartControl, and add a data source to it (these steps are similar to steps 1-8 of the Lesson 4 - Use the Series Template for Auto-Created Series tutorial).

Next, add a button to your application, and handle its Click event as follows.

Note

For the WebChartControl to be properly bound to its data source, and to create series points, call the ASPxWebControl.DataBind method after customizing the chart's properties. When resolving the data source, the data source identified by the ASPxDataWebControlBase.DataSourceID property takes precedence. If the ASPxDataWebControlBase.DataSourceID is not set, the object identified by the ASPxDataWebControlBase.DataSource property is used.

Expanded See Also

Is this topic helpful?​​​​​​​