View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Pfister Bill Pfister is offline
external usenet poster
 
Posts: 132
Default X-axis values in xlLine chart problem

Gary, do you need to assign the Xvalues property directly? Unless there is a
specific preclusion, I find it easier to assign the formula property instead
(i.e. SeriesCollection(1).formula = "=SERIES(,Sheet1!$B$A:$A$93,
Sheet1!$D$3:$D$93,1)", where Sheet1!$D$3:$D$93 is the y-values range).

Regards,
Bill


"Gary" wrote:

Hi,

I have the following code:
$Range = $Sheet-Range( "A3:A93" );
if ($Range)
{
$Chart-SeriesCollection( 1 )-{XValues} = $Range-{Value};
}


it doesn't set the X-axis values as I would expect to "-60, -59, ....
39, 40" instead it displays values "1, 4, 7, .....91".


my range contains values "-60" to "40".


it works fine if the range contain positive values .


any help would be greatly appreciated.


-Gary