Solved

xy scatter graph in vb 6.0

Posted on 2009-04-01
7
820 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

713 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