+ -
当前位置:首页 → 问答吧 → VB 6.0 里mschart 的问题,在线等,大侠们帮帮忙

VB 6.0 里mschart 的问题,在线等,大侠们帮帮忙

时间:2011-11-21

来源:互联网

做一条线
MSChart1.TitleText = "MG使用量"

RowCount = res.RecordCount
  If res.RecordCount = 0 Then Exit Sub
  With MSChart1
  .RowCount = RowCount  
  .ColumnCount = 1

  .chartType = VtChChartType2dLine
   




  For i = 1 To .Plot.SeriesCollection.Count

  .Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint


  Next i

ReDim a(1 To 12, 1 To 2)

  For i = 1 To RowCount




a(i, 1) = res.Fields("date") 'X轴数据,横向数据1-12个月
a(i, 2) = res.Fields("zjl") 'y轴数据
  
  res.MoveNext
  Next i
  MSChart1.ChartData = a
 


End With
End Sub
X轴和y轴都是从数据库里读出来的 ,请问该怎么做谢谢·!死活图都出不来

作者: xiaofeng19850916   发布时间: 2011-11-21

作者: Veron_04   发布时间: 2011-11-21

热门下载

更多