View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
inquirer inquirer is offline
external usenet poster
 
Posts: 74
Default viewing big charts

Greg
Thanks for your comments, I have taken them on board and will probably
change my approach as a result.

I have many groups of time series and would like to compare them in dfferent
combinations - plotting them all together on one x axis is too confusing.

I was planning to be able to select combinations for plotting via a vba prog
and display them with the same x scale - say a 3 month period always appears
4 inches wide on the screen. Then the x scale would always seem the same on
screen irrespective of the total time period.

I think I have everything under control except the x scaling bit. I
understand "ScaleWidth 1.98" changes the shape of the original by 1.98 but
a) what is the width of the original shape? b) can I define the width of the
original shape?
Thanks
Chris
"Greg Wilson" wrote in message
...
Inquirer,

I thought you just wanted a very large chart - bigger than the screen

size.
I get the impression you want to dynamically change the width of the chart
proportional to the amount of x-data (time) instead of just changing the
amount of plotted data (in which case the chart's scaling will adjust
automatically to accomodate).

My impression is that you want to be able to compare separate charts with
different amounts of x-data and with their x-axies scaled the same. This
seems strange. Can you not just plot multiple series in the same chart so
that they all share the same x-axis?

Dynamic adjustment of chart size as a function of the amount of data can

be
done but would be a bit complicated. Off the top of my head, this would
involve programmatically adjusting the chart width, the plot area width

and
the min and max scaling.

The plot area width would change as a function of the amount of x-data

while
the chart width would be maintained equal to the plot area width plus a
constant. You would have to specify the min and max scaling. You might

then
want to adjust the allowed scroll area to suit the changing dimensions.

To answer your question, "ScaleWidth 1.98" means to change the width of a
shape by 1.98 times the original (i.e. effectively doubling it).

Regards,
Greg

"inquirer" wrote:

I want to graph some time series data- daily data going back 10-15

years.
I would like to be able to set the length of the x axis programatically

so
that I can produce charts that can be directly compared.
I have just tried your suggestion and it is fine manually but when I put

the
manual change into a macro I got
ActiveSheet.Shapes("Chart 1").ScaleWidth 1.98, msoFalse,

msoScaleFromTopLeft
which looks as tho it is what I want but I am not sure how to control

the
ScaleWidth - what does the 1.98 refer to?

Thanks
Chris
"Greg Wilson" wrote in message
...
Why not just embed the chart in a worksheet instead of creating a

chart
sheet
and size it manually to suit? If you don't want someone to be able to

scroll
beyond the limits of the chart then add the following code to the
ThisWorkbook code module:

Private Sub Workbook_Open()
Sheets("Sheet1").ScrollArea = "A1:T50"
End Sub

Change the referenced range (here "A1:T50") to fit the range occupied

by
the
chart. You will likely have to adjust the row height, column widths

and
chart
dimensions slightly so that the user can't see any leftover worksheet

when
scrolling to the limits of the range.

Regards,
Greg

"inquirer" wrote:

Is there any way to create large charts in excel, ie those that

exceed
the
screen size, and view them by creating scroll bars and scrolling

right/left,
up/down ?
Chris