cb中如何设置excel的chart的x轴属性?
小弟在cb中操作excel生成chart图表,使用的数据为A、B两列数据,比如:
0.08 6494
0.1 8454
0.12 10696
0.14 12942
0.16 15457
0.18 17659
0.2 19933
0.22 22453
由此生成的chart图表,其x轴显示的是坐标的顺序,比如1,2,3,4...等等,现在想让它显示真实的x轴,即0.08,0.1,0.12...等等,通过录制vba宏,发现宏语句如下:
ActiveChart.SeriesCollection(1).XValues = "=test!C1"
ActiveChart.SeriesCollection(2).XValues = "=test!C1"
但是在chart的属性窗口中,看到的却是:
=test!$A:$A
在cb中,两种办法我都试过了,发现都报错,请教达人该如何处理?不胜感激!
附我的语句:
Chart1.PG("SeriesCollection", 1).PS("XValues", "=test!$A:$A");
Chart1.PG("SeriesCollection", 2).PS("XValues", "=test!$A:$A");
or
Chart1.PG("SeriesCollection", 1).PS("XValues", "=test!C1");
Chart1.PG("SeriesCollection", 2).PS("XValues", "=test!C1");