txtData = txtData & "," txtData2 = txtData2 & "," end if Next
’---下面开始绘图---------- ’添加数据序列1 set ch =cspace.Charts.Add() set s = ch.SeriesCollection.Add() s.name="通话费用(元)" s.Caption=s.name s.SetData c.chDimCategories,c.chDataLiteral, txtCat s.SetData c.chDimValues, c.chDataLiteral, txtData s.type=8 ’曲线图
’设定时间刻度轴格式 Set axCategory = cspace.Charts(0).Axes(c.chAxisPositionCategory) with axCategory .GroupingUnitType = c.chAxisUnitMonth ’月 .GroupingUnit = 1 ’单位 .NumberFormat="Short Date" ’短日期 end with