Foxtable(狐表)用户栏目专家坐堂 → 生成图表


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

主题:生成图表

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/5/27 17:04:00 [显示全部帖子]

 

试试

 

Dim Chart1 As WinForm.Chart
Dim Series1 As WinForm.ChartSeries
Dim t1 As Table = Tables("库存")
Chart1= Forms("查看库存").Controls("Chart2")
Chart1.ChartType = ChartTypeEnum.Bar' 引用窗口中的图表
Chart1.SeriesList.Clear()
Chart1.AxisX.ClearValueLabel
Series1 = Chart1.SeriesList.Add()
Series1.Length = t1.Rows.Count
For i As Integer = 0 To t1.Rows.Count - 1
    Series1.X(i) = i
    Series1.Y(i) = t1.Rows(i)("库存")
    Chart1.AxisX.SetValueLabel(i, t1.Rows(i)("球拍型号"))
Next
Chart1.AxisX.AnnoWithLabels = True

 


 回到顶部