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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

graph control

Status
Not open for further replies.

vishalmarya

Programmer
Aug 19, 2001
28

I want to plot a graph of distance with time using MSCHART control.
time at x axis, distance at y axis
example:
'''******************
dim ponits(2, 0) As Integer

points(0, 0) = 0
points(1, 0) = 7
points(2, 0) = 10

Chart1.RowCount = 3
Chart1.ColumnCount = 1

Chart1.ChartData = points
'''******************

this means dist travelled at 1 sec dist is 7 mtrs,at 2 its is 10 mtrs and so on.
I am able to plot it.

But what if data is like :

at 5 sec dist is 22 mtrs,at 12 it is 41 mtrs .

I am not able to control values of x axis in MSCHART control.
 
You need to use a scatter plot to control the values in both x and y axes.
Code:
Chart1.ChartType = VtChChartType2dXY
and supply two series of data points ... one for each axis.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top