Question 2
You can set values ββin a separate series using the value property of the series object.
However, the help states that the values ββin the series may be
range on a sheet or an array of constant values,
but not both.
This means that if you want to specify the values ββof a series as a range, such as C1: C10, then I think you will need to add cells if you want to add data points to the series.
If you do not want to add a cell, you need to specify all values ββas an array constant.
1
, , XValues ββ.
:
"1" Excel "Chart1". y1 1, y2 2, y3 3.
A B C D
1 x y1 y2 y3
2 1 10 100 400
3 2 20 200 500
4 3 30 300 600
y2.
A B C D
1 x y1 y2 y3
2 1 10 100 400
3 2 20 200 500
4 3 30 300 600
5 4 1000
( 2 "y2" ) Value "C2: C5"
'using ranges
Charts("chart1").SeriesCollection("y2").Values = Worksheets("Sheet1").Range("C2:C5")
'using array constant
Charts("chart1").SeriesCollection("y2").Values = Array(100, 200, 300, 1000)
XValues, XValue
'using ranges
Charts("chart1").SeriesCollection("y2").XValues = Worksheets("Sheet1").Range("A2:A5")
'using array constant
Charts("chart1").SeriesCollection("y2").XValues = Array(1, 2, 3, 4)
:
XValues ββ .
, Valal .
.
XValues ββ .