Foxtable(狐表)用户栏目专家坐堂 → 图表的绑定


  共有2620人关注过本帖树形打印复制链接

主题:图表的绑定

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110594 积分:562866 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2015/8/30 19:47:00 [显示全部帖子]

参考示列2
http://www.foxtable.com/help/index.html?n=0970.htm
Dim Chart As WinForm.Chart
Dim Series As WinForm.ChartSeries
Chart= e.Form.Controls("Chart1")
Chart.SeriesList.Clear()
Series = Chart.SeriesList.Add()
Dim n As List(of String) = DataTables("配种产仔分析_Table1").GetValues("年")
Dim b As List(of String) = DataTables("配种产仔分析_Table1").GetValues("编号")
MessageBox.Show(1)
Series.Length = n.Count
MessageBox.Show(2)
For bi As Integer = 0 To b.Count - 1
    For ni As Integer = 0 To n.Count - 1
        MessageBox.Show(3)
        Dim dr As DataRow = DataTables("配种产仔分析_Table1").find("[编号] = '" & b(bi) & "' and [年]= " & val(n(ni)) )
        MessageBox.Show(4)
        If dr IsNot Nothing Then
            MessageBox.Show(5)
            Series.X(ni) = ni
            MessageBox.Show(6)
            Series.Y(ni) = dr("配种分娩率")
            MessageBox.Show(7)
        End If
    Next
    For r As Integer = 0 To n.Count - 1
        Chart.AxisX.SetValueLabel(r, n(r)) '指定字符表示
    Next
Next

 回到顶部