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


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

主题:图表

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


加好友 发短信
等级:婴狐 帖子:58 积分:713 威望:0 精华:0 注册:2015/5/11 20:47:00
图表  发帖心情 Post By:2015/9/7 14:51:00 [显示全部帖子]

你好!

帮我看看什么错误

“派工耗时,待修耗时,维修耗时,待检耗时,检验耗时, 申请日期”是表A的列名。

图表X轴是 “派工耗时,待修耗时,维修耗时,待检耗时,检验耗时 ”的列名

Y轴是“派工耗时,待修耗时,维修耗时,待检耗时,检验耗时 ”对应列数据的平均值

 

 

Dim Chart As WinForm.Chart                                                                                                                                  
Dim Series As WinForm.ChartSeries                                                                                                                      
Dim t As DataTable =  DataTables(“A")                                                                                                           
Chart = e.Form.Controls("Chart1")                                                                                                                        
Chart.ChartType = ChartTypeEnum.Bar                                                                                                               
Chart.SeriesList.Clear()
                                                                                                                                            


For Each c As dataCol in t.dataCols
    If c.Name
= “派工耗时,待修耗时,维修耗时,待检耗时,检验耗时Then
        Series = Chart.SeriesList.Add
()                                                                                                                        
       
Series.Text = c.Name                                                                                                                                        
       
Series.Length = t.Rows.Count                                                                                                                          
       
For r As Integer = 0 To t.Rows.Count - 1
            Series.X(r) =
r
           
Series.Y(r) = t.Compute(“Avg(c.Name)”,“[申请日期] = '" & t(r) & "'")                                             
        Next
    End If
Next
For r As Integer = 0 to t.Rows.Count - 1
    Chart.AxisX.SetValueLabel(r, t.Rows(r
)(“c.Name"))                                                                                            
Next


Chart.AxisX.AnnoWithLabels =
True                                                                                                                       
Chart.VisualEffect = True                                                                                                                                        
Chart.LegendVisible = True
Chart.LegendCompass= CompassEnum.South                                                                                                         


 回到顶部
帅哥哟,离线,有人找我吗?
cqlistone
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:58 积分:713 威望:0 精华:0 注册:2015/5/11 20:47:00
  发帖心情 Post By:2015/9/7 19:36:00 [显示全部帖子]

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


 回到顶部
帅哥哟,离线,有人找我吗?
cqlistone
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:58 积分:713 威望:0 精华:0 注册:2015/5/11 20:47:00
  发帖心情 Post By:2015/9/8 16:14:00 [显示全部帖子]

你好!

上面代码X轴显示的是一年12个月的统计信息,如果X轴要显示12个月的信息并且每增加一个月,月份是向后连续递减的怎么编写,

如:

目前是9月

X轴为 即本月、上月....(2015-09、2015-08、2015-07、2015-06、...... 2014-11、2014-10)

如果到了10月

X轴为 即本月、上月....(2015-10、2015-09、2015-08、2015-07、...... 2014-12、2014-11)


 回到顶部