Articles in this section
Category / Section

How to bind the data source via chart wizard ?

2 mins read

Chart wizard allows us to customize the chart during design time. Follow the below steps to bind data source with chart during design-time

Note:

After binding the chart with data source, designer will display chart with random data. During run-time, you can see the chart with data from data source bounded in designer.

 

 

Step-1:

Open the Chart Wizard in designer. Chart wizard can be opened either by right-clicking the Chart control and choosing the Chart Wizard option in context menu or by clicking Chart Wizard option in smart tag of the Chart control. Chart wizard appears as follows.

https://help.syncfusion.com/windowsforms/chart/Chart-Data_images/Chart-Data_img20.png

 

https://help.syncfusion.com/windowsforms/chart/Chart-Data_images/Chart-Data_img21.png

Step-2:

In Chart Wizard, click Series button and click Data Source tab to choose the data source.

https://help.syncfusion.com/windowsforms/chart/Chart-Data_images/Chart-Data_img22.png

Step-3:

The combo box displays all the available data sources in the Form. Choose the data source for Chart from the data sources available in the combo box.

Note:

    When Form does not contain any data source, then only [none] and [new Binding Source…] options are present in the combo box. We assume that the form already contains the data source required for chart. Refer Binding chart to a data base using chart wizard for binding chart with a new data source.

 

 

https://help.syncfusion.com/windowsforms/chart/Chart-Data_images/Chart-Data_img24.png

Here, MyBindingSource is a binding source present in the form.

https://help.syncfusion.com/windowsforms/chart/Chart-Data_images/Chart-Data_img25.png

Step-4:

Click Series Data tab to map the data source fields with X and Y values of the Chart. Select a series in the combo box and other fields in this tab are enabled.

https://help.syncfusion.com/windowsforms/chart/Chart-Data_images/Chart-Data_img26.png

Step-5:

In the X Value combo box, choose the field that should be bound with the X value of series. Similarly, in Y Value combo box, choose the field that should be bound with the Y value of the series and click Finish button.

 

Note:

        You can also change series Type and Name here.

 

 

https://help.syncfusion.com/windowsforms/chart/Chart-Data_images/Chart-Data_img28.png

Designer displays default chart with random values but you can see the series bounded with binding source after running the application as in below screenshot.

 

Chart with series bounded with binding source

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied