Skip to main content

ChartWizard.ShowDialog() Method

Invokes the Chart Wizard for the chart control.

Namespace: DevExpress.XtraCharts.Wizard

Assembly: DevExpress.XtraCharts.v23.2.Wizard.dll

NuGet Package: DevExpress.Win.Charts

Declaration

public DialogResult ShowDialog()

Returns

Type Description
DialogResult

A DialogResult enumeration member that indicates the return value of a dialog box.

Remarks

Use this method to allow the user to construct the chart, customize its appearance and adjust the layout.

The ChartWizard uses the standard Look And Feel and Skinning, unless the UserLookAndFeel object is specified as a constructor parameter.

Example

This example demonstrates how to show the Chart Wizard at runtime with a pre-filled data source. This may be useful for those applications when a chart is mostly configured by an end-user.

To run the Chart Wizard at runtime you should use the ChartWizard.ShowDialog method of a ChartWizard object. The following code demonstrates how to create a chart object, bind it to a data source, then let an end-user adjust the chart’s settings via the wizard, and show a form with a chart in it.

using System.Windows.Forms;
using DevExpress.XtraCharts;
using DevExpress.XtraCharts.Wizard;
// ...

// Create a chart.
ChartControl chart = new ChartControl();

// Set its data source.
// You can set any other specific options for the chart here.
chart.DataSource = dataSet11;

// Create a ChartWizard for a new ChartControl
ChartWizard wiz = new ChartWizard(chart);

// Invoke the chart's wizard.
wiz.ShowDialog();

// Create a form, add the chart to it, and display the form.
Form form = new Form();
form.Controls.Add(chart);
form.Show();
See Also