ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Charts - Toggle Series On/Off (https://www.excelbanter.com/excel-programming/303127-excel-charts-toggle-series-off.html)

scottiegee

Excel Charts - Toggle Series On/Off
 
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

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


Peter T[_3_]

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/

.


Jon Peltier[_7_]

Excel Charts - Toggle Series On/Off
 
This shows one way to use check boxes to toggle a series:

http://peltiertech.com/Excel/Charts/ChartByControl.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Peter T wrote:

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/

.




All times are GMT +1. The time now is 02:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com