|
-
Aug 2nd, 2001, 06:01 PM
#1
how edit X and Y axis text (MSchart)
Anybody know how edit text in X-Axis and Y-Axis in a chart whith ADO recordset.
Basically, when change data
Thank
Felipe
-
Aug 7th, 2001, 05:40 PM
#2
row/column label
Chris, I need edit the row/column label
Thank
-
Aug 8th, 2001, 06:19 AM
#3
PowerPoster
fdelpuerto, I posted the code that I wrote sometimes ago in my reporting application. You juz need to look at the syntax that containt the .ColumnLabel and .RowLabel will do 
VB Code:
'Get the X-Axis component.
Graph_SQL = "SELECT Avg_Call, F_Description FROM REPORT;"
Set R_GraphRs = GraphDb.OpenRecordset(Graph_SQL, dbOpenSnapshot)
R_GraphRs.MoveLast
R_GraphRs.MoveFirst
'Generate the default Graph...
With MSChart1
.chartType = 1
.ColumnCount = R_GraphRs.RecordCount
.RowCount = 1
.ColumnLabelCount = .ColumnCount
.RowLabelCount = .RowCount
For column = 1 To .ColumnCount
'Check 4 UserAbort
DoEvents
If UserAbort% = 1 Then GoTo Process_Abort
For row = 1 To .RowCount
'Check 4 UserAbort
DoEvents
If UserAbort% = 1 Then GoTo Process_Abort
.column = column
.row = row
.Data = R_GraphRs!Avg_Call
'Save the respective data into the column label...
.ColumnLabel = R_GraphRs!F_Description
.RowLabel = " "
Next row
R_GraphRs.MoveNext
Next column
'Close the recordset
R_GraphRs.Close
Set R_GraphRs = Nothing
' Use the chart as the backdrop of the legend.
Select Case G_Mode
Case "1000" 'Daily
.TitleText = Get_GraphTitle("Daily Top 5 Fault Analysis Graph", frmRptMain.txtStartDate.Text)
Case "0100" 'Weekly
.TitleText = Get_GraphTitle("Weekly Top 5 Fault Analysis Graph", frmRptMain.txtStartDate.Text & "-" & frmRptMain.txtEndDate.Text)
Case "0010" 'Monthly
.TitleText = Get_GraphTitle("Monthly Top 5 Fault Analysis Graph", frmRptMain.cboMonth.Text & " of " & Trim(frmRptMain.cboYear.Text))
Case "0001" 'Yearly
.TitleText = Get_GraphTitle("Yearly Top 5 Fault Analysis Graph", "Year " & frmRptMain.cboYear.Text)
End Select
.Plot.Axis(VtChAxisIdY, 1).AxisTitle = "No. Of Fault"
.Plot.Axis(VtChAxisIdX, 1).AxisTitle = ""
.Plot.Axis(VtChAxisIdZ, 1).AxisTitle = "Fault"
End With
regards,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|