• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

Chart

like this, i has 1 data control and inside that data control i has 3 field.

so now i want to create a chart and i trying to do it in ms chart.

so how do i do it ?
0
JOHNHO
Asked:
JOHNHO
  • 4
  • 2
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
If it is an ADO data control, you can simply say:
Set chart1.DataSource = Adodc1
0
 
JOHNHOAuthor Commented:
whats the adodc1 mean ?

can u be more step by step emoreau ?
thanks a lot.
0
 
Éric MoreauSenior .Net ConsultantCommented:
adodc1 is the name of an ADO data control. Is this what you are using?

Check VB help file for the DataSource property.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
JOHNHOAuthor Commented:
i dont had time to check the ado emoreau.

im using data control which is data1.xxxx.

pls help me.
0
 
JOHNHOAuthor Commented:
i had try your way. this is the code that i sue.

public sub formload()
chart1.datasource=data1.recordsouse
end sub

the above code promtp me the error.

and i try the other one.

public sub formload()
chart1.datagrid=data1.recordsource
end sub

also problem.

help me please.
0
 
prakashbitraCommented:
Hi JOHNHO,

    u might be using chart for the first time is it so. send all the data to a grid control for better usage of a grid and also to the user.

use the below code where ever u necessary.

MSChart1.ColumnCount = 2
MSChart1.RowCount = MSFlexGrid1.Rows - 1

Private Sub Generate_Chart()
Dim i, j As Integer

For i = 1 To MSFlexGrid1.Cols - 1
    MSChart1.Column = i
    MSChart1.ColumnLabel = MSFlexGrid1.TextMatrix(0, i)
    For j = 1 To MSFlexGrid1.Rows - 1
        MSChart1.Row = j
        MSChart1.Data = MSFlexGrid1.TextMatrix(j, i)
        MSChart1.RowLabel = MSFlexGrid1.TextMatrix(j, 0)
    Next j
Next i
End Sub


i am very much sure that u will be succesful in doing so.

bye
happy working
0
 
JOHNHOAuthor Commented:
Thanks i can do it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now