Solved

xy scatter graph in vb 6.0

Posted on 2009-04-01
7
815 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
Comment Utility
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
Comment Utility

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
Comment Utility
Like this?

    With .Plot.SeriesCollection(CurSeries * 2 - 1).DataPoints(-1).DataPointLabel

        .LocationType = VtChLabelLocationTypeAbovePoint

        .VtFont.Size = 8

    End With

Open in new window

0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:Aiysha
Comment Utility
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
Comment Utility
Sorry, not sure how to do it...
0
 

Author Comment

by:Aiysha
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now