MyHeadHurts
MyHeadHurts

Reputation: 1562

Microsoft Chart Controls runtime chart

I am using microsoft chart controls in VB.net. The graph data currently comes from my database, but all the series and chart formats were made before runtime. I want to know how to make charts on runtime, being able to select the x axis from my dataset and multiple y columns from my dataset. Thanks

Upvotes: 0

Views: 1464

Answers (1)

Hans Passant
Hans Passant

Reputation: 941495

"Made before runtime" is very unclear, I'll assume you used the designer and changed properties in the Property grid window.

In the Solution Explorer window, click the "Show All Files" icon. That shows a node next to your form, open it and double-click the Designer.vb file. Scroll down to the InitializeComponent method, you'll see code that was generated by the designer to initialize the chart control.

Copy and paste this code into your own method. That gives you a major running start on the code you need to configure the chart yourself at runtime.

Upvotes: 1

Related Questions