很菜的问题,用mschart画一条线

8slob 2004-10-14 03:18:14
代码如下为什么显示的时候什么也没有呢?代码如下:
Private Sub drawLine(key As String)
Dim tmpI As Integer
Dim tmpJ As Integer
With MSChart

.ShowLegend = True '显示图例
.Stacking = False '叠置系列
.TitleText = "指标计划值与实际值对比图" '图表标题
'.FootnoteText = "hehe" '页脚

.Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 30
.Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision = 30 \ 5
.Plot.Axis(VtChAxisIdY).ValueScale.MinorDivision = 5
.Plot.Axis(VtChAxisIdY2).AxisScale.Hide = True
.Plot.Axis(VtChAxisIdY).AxisTitle.TextLayout.Orientation = VtOrientationVertical
'.Plot.Axis(VtChAxisIdY).AxisTitle.TextLayout.Orientation = VtOrientationUp

.Plot.Axis(VtChAxisIdY).AxisTitle.Text = "sdfasd"
.ColumnCount = 1
.RowCount = 2
If rs.State = 1 Then
rs.Close
End If
Dim id
id = Right(key, Len(key) - 1)
rs.Open "SELECT * FROM project_criterion where criterionID = " & id, conn
.Row = 1
.RowLabel = "计划值"
.Data = Val(rs("planValue"))
.Row = 2
.RowLabel = "实际值"
.Data = Val(rs("factValue"))

'.DataGrid.ColumnLabel(2, 1) = "LLLLLLLLLLLLLLLLLLLLL"
'.DataGrid.RowLabel(2, 1) = "cccccc"


'.Enabled = False
'MsgBox .ActiveSeriesCount '图表系列数(即图例个数)
End With
End Sub
...全文
89 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
8slob 2004-10-15
  • 打赏
  • 举报
回复
我顶
8slob 2004-10-14
  • 打赏
  • 举报
回复
我说的不确切,是用mschart画表
junki 2004-10-14
  • 打赏
  • 举报
回复
在窗体上画
Line (10, 0)-(10, 1145), RGB(0, 0, 255), BF

7,759

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧