Example E1046
Visible to All Users

Chart for WinForms - How to Combine Several Charts on a Single 3D XY-diagram

This example demonstrates how to display several series of different view types within a single diagram.

Chart

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Example Code

Form1.cs(vb)
C#
using System; using System.Windows.Forms; using DevExpress.XtraCharts; // ... namespace CombineSeveralCharts3D { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { // Create an empty chart. ChartControl combinedChart = new ChartControl(); // Create two series of different types. Series series1 = new Series("Area Series", ViewType.Spline3D); Series series2 = new Series("Line Series", ViewType.Bar3D); // Add points to them. series1.Points.Add(new SeriesPoint(1, new double[] { 10 })); series1.Points.Add(new SeriesPoint(2, new double[] { 2 })); series1.Points.Add(new SeriesPoint(3, new double[] { 14 })); series1.Points.Add(new SeriesPoint(4, new double[] { 17 })); series2.Points.Add(new SeriesPoint(1, new double[] { 5 })); series2.Points.Add(new SeriesPoint(2, new double[] { 16 })); series2.Points.Add(new SeriesPoint(3, new double[] { 4 })); series2.Points.Add(new SeriesPoint(4, new double[] { 11 })); // Add the series to the chart. combinedChart.Series.Add(series2); combinedChart.Series.Add(series1); // Hide the legend (if necessary). combinedChart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; // Add the chart to the form. combinedChart.Dock = DockStyle.Fill; this.Controls.Add(combinedChart); } } }
Program.cs(vb)
C#
using System; using System.Collections.Generic; using System.Windows.Forms; namespace CombineSeveralCharts3D { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } }

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.