Excel Charts - Toggle Series On/Off

S

scottiegee

I would like to easily/quickly toggle series in an Excel chart on an
off. What I would really like to have is some way to click on a serie
in the legend next to my chart and have that series data disappear fro
my graph. Then I need to be able to click that series again in th
legend and have the data reappear on the graph. I don't think Excel ha
this capability built-in, so I'll have to create an add-in or macro
Any ideas
 
P

Peter T

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top