Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Scale in MSChart...

Status
Not open for further replies.

bzac

Programmer
Dec 20, 2000
55
0
0
US
I have assigned a two dimensional array as the datasource for my MSChart. Instead of starting the Scale from 0, I had to start from the least value in my array and end with the max. value in my array.

How can I set the min. and max scale value of mschart?
What is the easy way to find the least and highest value from a two dimensional array?
 
The easiest way to find the min and max values in your array is to step through all of them using a FOR loop.

The code to set the upper and lower limits of the chart is:
Code:
    chtTimePen.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = txtUpperLimit
    chtTimePen.Plot.Axis(VtChAxisIdY).ValueScale.Minimum = txtLowerLimit
    chtTimePen.Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
In my code snippet, txtUpperLimit and txtLowerLimit are textboxes on a form. chtTimePen is the name I gave the MSChart control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top