[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
View this topic on docs.devexpress.com (Learn more)

How to: Bind an Individual Series to a Data Source (Runtime Sample)

This example shows how to add a web chart control to a web page, create a series and bind it to a data source.

  1. Create an ASP.NET Web Application (Visual studio 2012, 2013, 2015 or 2017), or open an existing one.

  2. Open the form's .aspx.cs file. In the Page.Load event handler, create a new WebChartControl class instance and add it to the form's Controls collection.

    Add the required assemblies and register them in the Web.config file. For more details, refer to the Adding a Web Chart document.

    You can also add a WebChartControl at design time by dropping a WebChartControl onto the form from the toolbox. In this case, the required assemblies are automatically added. To learn how to do this, refer to the How to: Add a Chart to a Web Application document.

  3. Then, create a new series and add it to the chart.

  4. To assign a data source to the series, specify the Series.DataSource property.

  5. Define the SeriesBase.ArgumentDataMember and SeriesBase.ValueDataMembers properties to determine columns that provide data point arguments and values.

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