以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  图形显示问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=21920)

--  作者:zhangc2000
--  发布时间:2012/7/27 14:20:00
--  图形显示问题

请帮我调试一下附件中的例子,因图形总出不来,其中cdbh是全局代码。

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:测试.rar


--  作者:狐狸爸爸
--  发布时间:2012/7/27 15:06:00
--  
Dim Chart As WinForm.Chart \'定义一个图表变量
Dim Series As WinForm.ChartSeries \'定义一个图系变量
Chart = e.Form.Controls("Chart1") \' 引用窗口中的图表
Chart.SeriesList.Clear() \'清除图表原来的图系
Series = Chart.SeriesList.Add() \'增加一个图系
\'Dim t As Table = Tables("子公司业绩") \'定义一个变量t引用数据表
Dim drs As List(of DataRow)
If DataTables("进货记录").find("[代理商编号] = \'" & cdbh & "\'") IsNot Nothing Then
    drs = DataTables("进货记录").Select("[代理商编号] = \'"& cdbh &"\'", "结算日期")
    Series.Length = drs.count
    Dim i As Integer = 0
    For Each dr As DataRow In drs
        Series.X(i) = i
        Series.Y(i) = dr("进货额")
        Chart.AxisX.SetValueLabel(i, dr("结算日期")) \'指定字符表示
        i = i + 1
    Next
    Chart.AxisX.AnnoWithLabels = True \'启用字符标示
Else
    MessageBox.Show("没有这个企业代码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If

--  作者:zhangc2000
--  发布时间:2012/7/27 15:32:00
--  
太谢谢了