View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_3_] Peter T[_3_] is offline
external usenet poster
 
Posts: 81
Default Excel Charts - Toggle Series On/Off

I fear the method of clicking the Legend to toggle a
Series on/off is misconceived.

Assuming you have worked out how to trap such an event, as
soon as you delete the Series the associated Legend Key /
Entry is removed. In theory you could click the
LegendEntry and format fill / border of the Series to
invisible / visible. The LegendKey would become invisible
but the LegendEntry would still remain to be clicked
again. Or, I suppose you could set the series to one nill
value, which would leave both Key and Entry.

If you have a simple chart with one set of "ChartGroups"
on one axis and a legend entry for every series, then it's
possible. If that's not certain to be the case, then
unfortunately there's no reliable way of knowing which
legend key you've clicked.

Programatically add/delete a series is straightforward
(use named ranges), a recorded macro will give you most of
the code. It's just a matter of deciding how to trigger
it, perhaps a set of buttons or from a dropdown combo.

Regards,
Peter

-----Original Message-----
I would like to easily/quickly toggle series in an Excel

chart on and
off. What I would really like to have is some way to

click on a series
in the legend next to my chart and have that series data

disappear from
my graph. Then I need to be able to click that series

again in the
legend and have the data reappear on the graph. I don't

think Excel has
this capability built-in, so I'll have to create an add-

in or macro.
Any ideas?


---
Message posted from http://www.ExcelForum.com/

.