Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
n/a n/a is offline
external usenet poster
 
Posts: 3
Default Problem with Legends in chart

Hi

I intend to maximize the width of the legend within two axis. I
reposition it myself using this code:

If .HasLegend Then
.Legend.Width = .PlotArea.InsideWidth
.Legend.Left = .PlotArea.InsideLeft
.Legend.Top = 1
End If

But it is not working when I use
Application.ScreenUpdating = False

If
Application.ScreenUpdating = True
then only charts shown on the screen while updating / creating are
done right.

What is going on ?


Secondly I want to have the legendentries to occupy one line each
instead of one line all together. Can that be accomplished ?



Yours
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Problem with Legends in chart

Excel 97? I never did much with Legend formatting in '97, but I know it
can really mess up plot area formatting if the chart isn't completely on
screen. I can't say much about your specific problem beyond that, other
than try to (temporarily) center the chart on screen, make your changes,
and put the chart back.

If the legend is wide enough to fit more than one entry across, it fills
them across first, then down.

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

n/a wrote:

Hi

I intend to maximize the width of the legend within two axis. I
reposition it myself using this code:

If .HasLegend Then
.Legend.Width = .PlotArea.InsideWidth
.Legend.Left = .PlotArea.InsideLeft
.Legend.Top = 1
End If

But it is not working when I use
Application.ScreenUpdating = False

If
Application.ScreenUpdating = True
then only charts shown on the screen while updating / creating are
done right.

What is going on ?


Secondly I want to have the legendentries to occupy one line each
instead of one line all together. Can that be accomplished ?



Yours


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Problem with Legends in chart

And my 2 cents...

Be sure your sheet zoom is set to 100%.

Charts have weird behavior with other settings...

--
sb
"Jon Peltier" wrote in message
...
Excel 97? I never did much with Legend formatting in '97, but I know it
can really mess up plot area formatting if the chart isn't completely on
screen. I can't say much about your specific problem beyond that, other
than try to (temporarily) center the chart on screen, make your changes,
and put the chart back.

If the legend is wide enough to fit more than one entry across, it fills
them across first, then down.

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

n/a wrote:

Hi

I intend to maximize the width of the legend within two axis. I
reposition it myself using this code:

If .HasLegend Then
.Legend.Width = .PlotArea.InsideWidth
.Legend.Left = .PlotArea.InsideLeft
.Legend.Top = 1
End If

But it is not working when I use
Application.ScreenUpdating = False

If
Application.ScreenUpdating = True
then only charts shown on the screen while updating / creating are
done right.

What is going on ?


Secondly I want to have the legendentries to occupy one line each
instead of one line all together. Can that be accomplished ?



Yours




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Problem with Legends in chart

Application.ScreenUpdating = False prevents any changes to the screen
until it is reset to True. So just wrap your code between False & True.

The only way that I know to have each legend entry on a separate line is
to have the legend position formatted Left, Right, or Corner. Top and
bottom try to put them on a single line.
Of course you can use Left, Right, or Corner and than move it. (I dragged
it and it worked. But the plot area got 'squished')

--
sb
"n/a" wrote in message
om...
Hi

I intend to maximize the width of the legend within two axis. I
reposition it myself using this code:

If .HasLegend Then
.Legend.Width = .PlotArea.InsideWidth
.Legend.Left = .PlotArea.InsideLeft
.Legend.Top = 1
End If

But it is not working when I use
Application.ScreenUpdating = False

If
Application.ScreenUpdating = True
then only charts shown on the screen while updating / creating are
done right.

What is going on ?


Secondly I want to have the legendentries to occupy one line each
instead of one line all together. Can that be accomplished ?



Yours



  #5   Report Post  
Posted to microsoft.public.excel.programming
n/a n/a is offline
external usenet poster
 
Posts: 3
Default Problem with Legends in chart

I have to use screenupdating = False, or else my performance drops
below acceptable. I'm producing up to 27 charts in every worksheet so
I need this.

I'm using Excel 2000

What I find irritating is that the code work if I singlestep through
it in debug mode but doesn't work in "release" mode. It seems to be
the screenupdating that does something and only if the chart is
present on the screen. If it is offscreen (which is possible) they
still have this fault.

I hoped someone have heard of this problem before, but I can't find
anything anywhere !

"steve" wrote in message ...
Application.ScreenUpdating = False prevents any changes to the screen
until it is reset to True. So just wrap your code between False & True.

The only way that I know to have each legend entry on a separate line is
to have the legend position formatted Left, Right, or Corner. Top and
bottom try to put them on a single line.
Of course you can use Left, Right, or Corner and than move it. (I dragged
it and it worked. But the plot area got 'squished')

--
sb
"n/a" wrote in message
om...
Hi

I intend to maximize the width of the legend within two axis. I
reposition it myself using this code:

If .HasLegend Then
.Legend.Width = .PlotArea.InsideWidth
.Legend.Left = .PlotArea.InsideLeft
.Legend.Top = 1
End If

But it is not working when I use
Application.ScreenUpdating = False

If
Application.ScreenUpdating = True
then only charts shown on the screen while updating / creating are
done right.

What is going on ?


Secondly I want to have the legendentries to occupy one line each
instead of one line all together. Can that be accomplished ?



Yours



  #6   Report Post  
Posted to microsoft.public.excel.programming
n/a n/a is offline
external usenet poster
 
Posts: 3
Default Problem with Legends in chart

Hi

It helps to put the zoom = 100 %. Thanks to Steve for that suggestion.

I consider this to be a bug ! But luckily Steve pointed on a work-around
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Problem with Legends in chart

Try structuring your code like this

Sub MessMyChart()
ApplicationScreenUpdating = False
' the screen will not change during this
* code to do something *
ApplicationScreenUpdating = True
' the screen should refresh
ApplicationScreenUpdating = False
' back to freezing the screen
* more code *
ApplicationScreenUpdating = True
End Sub
--
sb
"n/a" wrote in message
om...
I have to use screenupdating = False, or else my performance drops
below acceptable. I'm producing up to 27 charts in every worksheet so
I need this.

I'm using Excel 2000

What I find irritating is that the code work if I singlestep through
it in debug mode but doesn't work in "release" mode. It seems to be
the screenupdating that does something and only if the chart is
present on the screen. If it is offscreen (which is possible) they
still have this fault.

I hoped someone have heard of this problem before, but I can't find
anything anywhere !

"steve" wrote in message

...
Application.ScreenUpdating = False prevents any changes to the screen
until it is reset to True. So just wrap your code between False & True.

The only way that I know to have each legend entry on a separate line is
to have the legend position formatted Left, Right, or Corner. Top and
bottom try to put them on a single line.
Of course you can use Left, Right, or Corner and than move it. (I

dragged
it and it worked. But the plot area got 'squished')

--
sb
"n/a" wrote in message
om...
Hi

I intend to maximize the width of the legend within two axis. I
reposition it myself using this code:

If .HasLegend Then
.Legend.Width = .PlotArea.InsideWidth
.Legend.Left = .PlotArea.InsideLeft
.Legend.Top = 1
End If

But it is not working when I use
Application.ScreenUpdating = False

If
Application.ScreenUpdating = True
then only charts shown on the screen while updating / creating are
done right.

What is going on ?


Secondly I want to have the legendentries to occupy one line each
instead of one line all together. Can that be accomplished ?



Yours



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
HOW TO ADD LEGENDS IN CHART S. LALLY Excel Discussion (Misc queries) 1 April 9th 10 01:46 AM
Dates in Chart Legends Hal[_2_] Charts and Charting in Excel 4 December 11th 08 09:44 PM
Chart Legends Tina Charts and Charting in Excel 1 March 20th 07 07:22 PM
formatting chart legends Dean1234567890 Charts and Charting in Excel 1 September 4th 06 07:15 PM
Chart legends question [email protected] Excel Discussion (Misc queries) 1 July 3rd 06 01:19 AM


All times are GMT +1. The time now is 10:57 PM.

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

About Us

"It's about Microsoft Excel"