Solved

xy scatter graph in vb 6.0

Posted on 2009-04-01
7
819 Views
Last Modified: 2012-05-06
I want to use whatever capability vb 6.0 has to make graph in it using data from an array.
in short:
Data type : xyscatter
X data : xVAlues(20)
Y data: yValues(20)
Min of x axis: -20
MaximumMin of x axis: -20
min of y axis : 20
 max of x axis : 20
Can I use the mschart1 capability to do this task.
Thank you for the anticipated help of all the experts.
0
Comment
Question by:Aiysha
  • 3
  • 3
7 Comments
 
LVL 19

Accepted Solution

by:
Rimvis earned 500 total points
ID: 24047105
Check this:

Creating 2D XY scatter charts on an unbound MSChart Control
http://vbcity.com/pubs/article.asp?alias=scatter_charts
0
 

Author Comment

by:Aiysha
ID: 24072883

My code is based on the link you have send, I have adapted it according to my needs, all is need to be able to put text in the label for the points.
0
 
LVL 19

Expert Comment

by:Rimvis
ID: 24074910
Like this?

    With .Plot.SeriesCollection(CurSeries * 2 - 1).DataPoints(-1).DataPointLabel
        .LocationType = VtChLabelLocationTypeAbovePoint
        .VtFont.Size = 8
    End With

Open in new window

0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:Aiysha
ID: 24112384
I am trying to put a text label on the data points in the mschart1 ..so far I have the following code which does not work

For lRow = 1 To UBound(ChartPoints, 1)
 .plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeLeft
 .plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.Custom = True
 .plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.Component = VtChLabelComponentSeriesName
 .plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.Text = T(lRow)
   
Next lRow
0
 
LVL 19

Expert Comment

by:Rimvis
ID: 24114018
Sorry, not sure how to do it...
0
 

Author Comment

by:Aiysha
ID: 25899373
None of the above solution worked for me. I ended up opening an excel workbook in vb 6.0 and looking at my graph as if working directly in Excel.

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question