求助:MSChart控件的用法!!!!!!

dreamvikey 2003-05-21 10:16:33
请问,MSChart控件只能DataSource与Adodc控件连接吗,它的横坐标和纵坐标能不能分别与一个已经赋值的数组连接上呢?还有,怎么改纵坐标显示的数值范围和格式??
...全文
65 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
GhSoft 2003-09-15
.Column = 1
.ColumnLabel = "本旬出口数量"
.Column = 2
.ColumnLabel = "去年同期对比百分数"


怎么显示不出.ColumnLabel ?? 请指教
回复
dreamvikey 2003-05-23
呵呵,洪根兄,怎么每个分论坛都有你的身影呀?而且都是"一语中的",我的问题又解决了,小弟真的是佩服的五体投地,再次致以十分万分十万分的感谢:)
回复
lihonggen0 2003-05-22
Private Sub Command2_Click()
If MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2) <> "" And IsNull(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2)) = False Then '该表格有数据
With MSChart1
.ChartType = VtChChartType2dBar
.ColumnCount = 2
.RowCount = MSHFlexGrid1.Rows - 1
.RowCount = 1
.TitleText = "直方图示例 本旬出口数量与去年同期对比值"
Dim XXX, XXXX As Double
For I = 1 To MSHFlexGrid1.Rows - 1
XXX = Val(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2))
XXXX = Val(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2))
.Column = 1
.Row = 1
.Data = XXX
.Column = 2
.Row = 1
.Data = XXXX
.RowLabel = MSHFlexGrid1.TextMatrix(I, 1)
.RowLabel = ""
Next I
.Column = 1
.ColumnLabel = "本旬出口数量"
.Column = 2
.ColumnLabel = "去年同期对比百分数"
End With
End If
End Sub
回复
lihonggen0 2003-05-22
If MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2) <> "" And IsNull(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2)) = False Then '该表格有数据
With MSChart1
.ChartType = VtChChartType2dPie
.ColumnCount = 2
.RowCount = 1
Dim XXX As Double
XXX = Val(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2))
.TitleText = "饼图示例 完成百分比"
.Column = 1
.Row = 1
.Data = XXX
.ColumnLabel = "完成百分比" & str(XXX) & "%"
.Column = 2
.Row = 1
.Data = 100 - XXX
.ColumnLabel = "剩余百分比" & str(100 - XXX) & "%"
End With


' With MSChart1
' .ChartType = VtChChartType2dPie
' .ColumnCount = 2
' .RowCount = 1
' Dim XXX As Double
' XXX = Val(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2))
' .TitleText = "饼图示例 完成百分比"
' .Column = 1
' .Row = 1
' .Data = XXX
' .ColumnLabel = "完成百分比" & Str(XXX) & "%"
' .Column = 2
' .Row = 1
' .Data = 100 - XXX
' .ColumnLabel = "剩余百分比" & Str(100 - XXX) & "%"
' End With

End If
回复
相关推荐
发帖
控件
创建于2007-09-28

1428

社区成员

VB 控件
申请成为版主
帖子事件
创建了帖子
2003-05-21 10:16
社区公告
暂无公告