Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Set Xvalues to an array of date, but the x-scale not correct

Sorry for missing information.
It is excel 97, line curve (the default one)

When i set xvalues (say "=Sheet1!$A$2:$A$5") in chart wizard, it is ok.
But when i set it by program or in macro's debug window, not ok.


"Tom Ogilvy" wrote in message ...
Are you using a scatter plot. If not, that is the only type chart that
would do what you describe.

--
Regards,
Tom Ogilvy

Alan Pong wrote in message
om...
a = array(cdate("2003/12/5"), cdate("2008/9/3") ,cdate("2013/9/2"),
cdate("2033/8/28"))
activesheet.chartobjects(1).chart.seriescollection (1).xvalues=a

b = array(.93, 3.26 , 4.35, 5.21)
activesheet.chartobjects(1).chart.seriescollection (1).values=b

what i see is that the x distance between two consecutive points is
uniform.
(the fourth point should be more far away.)

any cue?
thanks.
rgds.
alan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Set Xvalues to an array of date, but the x-scale not correct

Alan -

If the chart is a Line type, it may have applied a purely Category axis
type. You can change this to a time-scale axis type as follows:

ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlTimeScale

Or you can convert the chart to an XY Scatter type, as Tom suggested:

ActiveChart.ChartType = xlXYScatterLines

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Alan Pong wrote:
Sorry for missing information.
It is excel 97, line curve (the default one)

When i set xvalues (say "=Sheet1!$A$2:$A$5") in chart wizard, it is ok.
But when i set it by program or in macro's debug window, not ok.


"Tom Ogilvy" wrote in message ...

Are you using a scatter plot. If not, that is the only type chart that
would do what you describe.

--
Regards,
Tom Ogilvy

Alan Pong wrote in message
.com...

a = array(cdate("2003/12/5"), cdate("2008/9/3") ,cdate("2013/9/2"),
cdate("2033/8/28"))
activesheet.chartobjects(1).chart.seriescollect ion(1).xvalues=a

b = array(.93, 3.26 , 4.35, 5.21)
activesheet.chartobjects(1).chart.seriescollect ion(1).values=b

what i see is that the x distance between two consecutive points is
uniform.
(the fourth point should be more far away.)

any cue?
thanks.
rgds.
alan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Set Xvalues to an array of date, but the x-scale not correct

Thanks Jon and Tom!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date(Year,Month,Day) not returnign correct date jlclyde Excel Discussion (Misc queries) 8 October 16th 09 02:42 PM
Clipart will not scale with array of cells chuck New Users to Excel 0 June 6th 09 05:19 AM
Array formula correct but end up with 0 for answer Heather Excel Discussion (Misc queries) 5 July 30th 07 03:19 AM
date auto correct m.beebee Excel Discussion (Misc queries) 5 June 4th 07 01:53 PM
date scale problem Mary Walker Excel Discussion (Misc queries) 6 August 13th 06 10:08 PM


All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"