Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

activechart.legend

Status
Not open for further replies.

longhair

MIS
Feb 7, 2001
889
US
afternoon all,
hopefully someone can point me in the correct direction.
i have a chart that i dynamically create. all of the items in the series are represented in the chart. only some of the items are represented in the legend.
if i manually select the legend and drag, as if i am resizing it (in fact excel 2000 reports 'resize selected objects' on the bottom left) a little bit all of the items for the series will appear.
i checked the legend properties before and after, the font is the same and the size is the same. i have tried it autoscale turned on and off.
any suggestions on how to manipulate the object via vba, so it will include all items of the series?
thanks in advance.
regards,
longhair
 


Hi,

Here's a longshot.

Try changing the AutoScaleFont property of the ChartArea via code. This does not set the AutoScaleFont property of other objects, but will freeze the text size of all chart elements that contain text.
Code:
ActiveChart.ChartArea.AutoScaleFont = False


Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
SkipVought,
thanks. already tried that.
that was the only property change that i saw when i manually 'resized' the legend - but alas it did not allow all of the items in the series to populate the legend.
regards,

longhair
 
ok ...
after banging my head against anything & everything i could find (^o^) it seems that the only thing that changes is the Top Property of the LegendEntries Object.
the only problem is that this property is read only.
any suggestions? i would think that if it can be done with the mouse or keyboard then it can be done in vba.
regards,
longhair
 
SOLVED!!!
yes it can be done - all i did was to adjust the legend width. it didn't actually change the size of the legend on the chart, but it did change the top property of the legendentries.
as my sifu is fond of saying - 'all it takes to accomplish anything is some time and energy'.
regards,
longhair
 

'all it takes to accomplish anything is some time and energy [red]& INTELLIGENCE[/red]'.

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
SkipVought,
"INTELLIGENCE" just reduces the amount of time and/or energy expended.
if we added that might as well add 'luck' [orientalbow]
regards,
longhair
 


If there's no intelligence, then it like the perverbial passle of monkeys pounding on typewriters to get a Shakespear creation -- pure random chance.

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top