The Option-Graph Project Option-Graph.com

Basic Option Graph Step 6

Add the Chart Control

Visual Basic provides a ready-made Control for charting and graphing. All we need to do right now is add it from the Toolbox.

In Visual Basic, click on the tab that says "Form1.vb [Design]", so you are looking at the Form1 design. In the Toolbox, click on the Chart Control, which is grouped under Data. Then click anywhere on the background of Form1 to add the Chart Control to Form1.

Set the Size Property of the Chart to 819, 450, and use your mouse to position the Chart directly under the lowest Panel.

Set the BackColor Property to Gainsboro (or any other color you like) to make the chart stand out from the background.

Click on the background of Form1, and use the Form1 size "handles" with your mouse to make the Form large enough to contain the Chart Control. You may need to scroll the Visual Basic window in order to see the bottom of the Chart Control and the Form.

Visual Basic Design mode shows the chart control with a default bar chart as shown in the picture. We will actually be using line graphs, but that will be set up later in code.

Save your Project.

 

Home Page Downloads
Previous Step: Add Controls to the Last Panel
Next Step: Test the Names

Copyright 2017 option-info.com Privacy Policy

Questions, corrections, suggestions, comments to: this contact

Want to learn options, find strategies? Visit www.option-info.com