SetValueLabel
为给定的数值设置字符表示。
语法:
SetValueLabel(Value, Label)
Value: 数值
Label: 字符表示
例如对于下面的表格:

上表中产品列是字符型,并不是数值型,如果手工编写图示代码,就必须使用SetValueLabel函数:
Dim
Chart
As WinForm.Chart
'定义一个图表变量
Dim Series As
WinForm.ChartSeries '定义一个图系变量
Dim t As
Table =
Tables("统计表1")
'定义一个变量t引用数据表
Chart= Forms("窗口1").Controls("Chart1")
' 引用窗口中的图表
Chart.SeriesList.Clear() '清除图表原来的图系
Series = Chart.SeriesList.Add() '增加一个图系
Series.Length = t.Rows.Count '设置图系的长度
For i As
integer =
0
to t.Rows.Count -
1
'指定每个数据点的位置
Series.X(i) = i '指定水平坐标
Series.Y(i) = t.Rows(i)("数量")
'指定垂直坐标
Chart.AxisX.SetValueLabel(i, t.Rows(i)("产品"))
'指定字符表示
Next
Chart.AxisX.AnnoWithLabels =
True '启用字符标示
生成的图表:

本页地址:http://www.foxtable.com/webhelp/topics/1032.htm