Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a Chart

Status
Not open for further replies.

chasmith17

Technical User
Joined
May 25, 2006
Messages
47
Location
US
Hello,
I need to know how to create a chart that has more than 6 fields. In the chart wizard it will not let me pick more than 6 fields per chart. When I look up help it talks about using global charts but I can't find out how to select global charts. I have a chart already made in Excel can I import that? If not I need to make a graph for this. Thanks for your help.

Gun I Targ I Gun V Bmag V RF DRV PFN V
18x -1.28 2.13 -6.58 54.79 19.54 52.84
6x -2.67 59.07 -16.13 17.4 24.3 40.2
6e -0.99 0.11 -5.07 19.98 20.86 43.68
9e -0.99 0.11 -5.07 28.42 21.72 43.78
12e -0.11 0.11 -5.07 38.5 24.98 43.58
16e -0.7 0.11 -3.12 50.45 12.32 52.6
20e -0.7 0.11 -3.12 68.67 25.17 52.43

The top row Gun I, Targ I, Gun V, etc. are test points and 18X,6X,6e etc. are different modes you go into to check these test point. So for most modes the test point is going to ge different. Thanks for your help.
 
If you are talking about the mschrt.ocx, You can use a ado recordset, or dao to fill a chart. You have to reference the Mschrt20.ocx

BUt i used code, so if you need help with that, let me know.

In this case, I used a recordset to fill a sales chart in a report.

Dim oChart As MSChart
Dim rst As New ADODB.Recordset
Dim sSQL As String

Set oChart = ctlChart.Object ' this the the chart control on the form

'choose the data to go on the chart:
sSQL = "SELECT Sales,PayRollCost FROM tblSalesCost WHERE ((SalesDate)Between #" & dtFrom & "# AND #" & dtTo & "#)"
rst.Open sSQL, GetAppCon(e_SalesHistory), adOpenStatic, adLockReadOnly

If not rst.EOF and not rst.BOF Then
rst.MoveFirst ' there's a bug that requires moving to the first record.
oChart.chartType = VtChChartType2dLine
oChart.ColumnCount = 24
Set oChart.DataSource = rst
oChart.ShowLegend = True

End If

Set oChart = Nothing
Exit Sub

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top