View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.charting
johannes johannes is offline
external usenet poster
 
Posts: 24
Default Automatic swap of x - and y - axis

The file is not corrupt. The problem started simultanously in soem 30 files
when my client installed Excel 2007. I established a new file, trying to
overcome the problem, but it didn't work, the problem remianed.

Dealing with the macro might be no problem for you but it is for me - I am
not a computer person, I am simply trying to use a Microsoft product, and
trying to overcome a problem this new product is causing.

By the same tooken, I would like to ask, why is it not possible that I
forward one of the files where the problem occurs and than you or yoru
colleagues can see exactely what the problem is? During our previous
communication I have tried to explain to you what the problem is.

My client has one option to overcome the problem, and that is to continue
using the old Excel program, but that can be hardly the purpose of purchasing
new Microsoft products.

From my point of view, the easiest and most effective way of dealing with
this is if I can send you a file with last years data and you can see that it
everything worked o.k. from January to July (approx) and than from August
onwards the problem occured, which marked the time when the new Excel program
was installed. Please advise to which email address I can send the file.

Johannes



"Jon Peltier" wrote:

If the file is corrupt, you should try rebuilding it from scratch in a new
workbook.

If you want to post some typical data as text in a new thread, a description
of the chart, and a description of the problem, someone may be able to help.
Make sure to describe the charts themselves and the problem clearly.

I'm not sure why the 15-line macro seems so complicated. You could try it on
a copy of your file, using instructions he
http://peltiertech.com/WordPress/how...e-elses-macro/

- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - Training in Charting and Programming
http://peltiertech.com/Training/2009...00906ACNJ.html
_______


"Johannes" wrote in message
...
Jon

I have the 'corrupt' file. Where can I sent it?

Johannes


"Johannes" wrote:

Hi Jon

sorry for the long break in communication, but I haven't been back to my
clients for more than a month. However, I will go there on Wednesday, and
then I will forward one of the files, so you or your colleagues can have
a
look and hopefully figure out what the problem is and how to rectify it.


Is it possible to attach a file to a posting on this website, and if yes,
how do I do it? If not, what email address should I sent the file?

Thanks

Johannes


"Jon Peltier" wrote:

Johannes -

If you could provide a (sanitized) sample of data and a more detailed
description of the chart, someone here may be able to offer a
suggestion
that would keep the chart in its intended configuration.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"Johannes" wrote in message
...
I have modified the template by re-drawing the graph, but it didn't
alleviate
the problem. The graph changes not when data are entered, but when
the
template is copied to create a new worksheet. How it works is that we
have
a
template and then, say 20 or 30 worksheets, which represent
individual
product batches. If a new product batch is produced today, laboratory
staff
copy the template to create a new worksheet and then enter the
recorded
data
for that product batch. This means that, by the time the graph is
copied,
it
does not contain any data. We have tried to enter data, e.g. the date
1.
January, into the template, and that did help in some cases, but not
all.

The macro looks complicated to me, I have never done a macro, but
I'll
have
a look at it. However, I probably won't be back at my clients place
for 3
to
4 weeks, before I can have a look at it again.

Johannes



"Jon Peltier" wrote:

Could you fix the template in the master sheet? Or does simply
changing
the
data cause the chart to change?

An alternative might be to run a macro. This will change charts in
the
active workbook:

Sub FixCharts()
Dim sh As Object
Dim cht As Chart
Dim chobj As ChartObject

For Each cht In ActiveWorkbook.Charts
cht.PlotBy = xlColumns ''' or xlRows ''' ***
Next
For Each sh In ActiveWorkbook.Sheets
For Each chobj In sh.ChartObjects
chobj.Chart.PlotBy = xlColumns ''' or xlRows ''' ***
Next
Next

End Sub

In the two places highlighted by *** you need to make sure the
appropriate
alignment is being specified. See this post if you aren't sure how
to use
this code:
http://peltiertech.com/WordPress/how...e-elses-macro/

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"Johannes" wrote in message
...
O.k. today I am at my cleints place and I have looked a bit more
into
it.
I
have checked last years databases and graphs appear to be o.k. for
the
first
half of the year (until July / August) while those covering the
rest of
the
year are skewed. They upgraded to Excel 2007 in June/July. This
means,
that
old, existing graphs were not changed, but what has changed is
that
when
the
MASTER Sheet (= a template for entering data, which then
automatically
creates a time vs value graph) is copied for recording data from a
new
product batch, the x - and y - axis switch. Therefore, all graphs
after
July
/ August are skewed. This problem persists to this day, meaning
that
every
new worksheet that is created contains skewed graphs, making the
problem
(=workload) bigger.

I can correct the problem manually in the following way:
1. right click on the graph
2. Click 'Select data'
3. Click 'Switch Row / Column'
4. Click 'Switch Row / Column' again
5. Correct the format of the x-axis to its original format

However, there are many graphs, and if I am unable to solve the
problem,
we
will have to ommit using graphs.

If you are able to provide me with an email address, I can send
you one
of
the files, and you can have a look whether the same thing happens
on
your
computer, and if so, work out what the problem is.

Johannes

"Jon Peltier" wrote:

What happened that made the chart switch? Did the client mess
around
with
it?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"Johannes" wrote in message
...
Jon, sorry for my long silence.

What you are describing is exactely what happens, i.e. that the
values
on
the x-axis (horizontal) become the values on the y-axis
(vertical).
This
obviously messes up the the graph.

Unfortunately I can't quite remember what manual changes I make
to
get
the
graph back to the way it used to be (because this problem
occurs not
on
my
computer but on my clients computer where I go only once a
month or
so). I
think I am changing the graph back by going into the 'Source
Data'
Menue,
and
then change the 'Series in' from Rows to Coloumns, or vice
versa. I
will
be
going to my client again on Monday, and after I have made the
change, I
will
get back to you to tell you exactely what I do.

Johannes

"Jon Peltier" wrote:

I'm having trouble understanding "the x - axis becomes the
y-axis".
How
does
the chart change its appearance? What steps do you take to
"change
it
back"?

Are the values that were plotted on the horizontal axis now
plotted
on
the
vertical axis, and the values that were plotted on the
vertical
axis
now
plotted on the horizontal axis? Do the axis titles switch
positions?
Does
a
(vertical) column chart become a (horizontal) bar chart?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"Johannes" wrote in
message
...
Jon
I use very simple line (mostly) and bar charts. The time
line
(usually
dates, covering between a few weeks to one year) is shown on
the
x -
axis
and
the values, e.g. temperatures in a composting pile, are
shown on
the
y -