[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • 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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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