[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Collapse]Charts Suite
   [Expand]Chart Control
   [Collapse]Chart3D Control
    [Collapse]Getting Started
      Lesson 1 - Create a Simple Unbound 3D Chart
      Lesson 2 - Create a Chart3D Control with a Series Bound to Data
      Lesson 3 - Create a 3D Chart with Automatically Generated Series
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Lesson 3 - Create a 3D Chart with Automatically Generated Series

This tutorial will guide you through the steps needed to create 3D series automatically based on an underlying data source.

Expanded Step 1. Prepare an Application

In this step, you will add a data file to a project and design the Model and ViewModel classes.


Note that this step can be skipped. To obtain a solution that is the result of the first step, download it from the DevExpress Support Center.

  • Run Microsoft Visual Studio 2012, 2013, 2015, 2017 or 2019.
  • Create a new WPF Application project.
  • Add a new folder to the solution, name it Data.
  • Add a data file to the newly created folder. To do this, right-click this folder and select the Add | Existing Item... element.

  • In the invoked window, browse the IrisDataSet.xml file that is stored in the C:\Users\Public\Documents\DevExpress Demos 19.2\Components\WPF\CS\ChartsDemo.Wpf\Data directory by default. Click Add to include the file into the project.
  • Then, you need to design a new model class. To do this, add a new code file to the project. Right-click the project and select Add | New Item.

  • In the invoked window, select the Code group and in the item list, select the Code File item. Then, set item name to Iris.cs and click Add.

    Implement the data model presentation by placing the following code to the previously created file.

  • In the following step, develop a View Model that will load data objects from the data file based on the model. For this, create a code file as you did before, and set the file name as IrisesViewModel.

    Place the code below to this blank file.

  • Build the solution.
  • Then, assign the ViewModel to the Window.DataContext property. To do this, select the window in the design view. Then, locate the DataContext property in the Properties window and click the New button opposite this property. In the invoked dialog, select the Chart3D_Lesson3.IrisesViewModel class and click OK.

The preparatory phase is completed. Go to the next step to learn how to bind a chart to the data source.

Expanded Step 2. Add a Chart and Bind It to Data

In this section, you will add a chart and bind this chart to the prepared data source. Follow the steps below to do this.

Expanded Step 3. Customize Chart Appearance

In this step, you will learn how to configure the appearance chart settings. To do this, follow the steps below.

Expanded Result

After performing all the steps above, your code will appear as follows.

Run the project to see the results. The following image shows the resulting chart while the application is running.

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