how to hide a chart series or make it invisible

B

Brian Murphy

I want to make some chart series invisible (hide them), and then later
restore them.

Is there an easy way to do this without messing with a whole lot of chart
series formatting properties?

Thanks,

Brian Murphy
Austin, Texas
 
B

Brian Murphy

I may have answered my own question.

How about to hide a series redefine the Values property to point to some
empty worksheet cells. Then to unhide restore the original Values property
which I suppose could be a Range, Name or Array. Maybe save the
Series.Formula property and use that to restore the Values property.

Brian
 
G

Greg Wilson

If you just toggle the hidden status of the column or row
containing the source data it will hide/unhide the series.
Ensure that the "Plot visible cells only" option is
selected. Access this option through Tools|Options|Chart
tab. Activate the chart first to enable the checkbox.

Note that the Autofilter, by virtue of the fact that it
hides/unhides rows, can thus be used to select the data to
display.

Regards,
Greg
 
B

Brian Murphy

Hello Greg,

In my case there are logistical problems with hiding the column
containing the data. Here's what I've done:

1. save the .Formula property for the series in a string variable.
2. reassign the .Values property to an empty cell. This hides the
series.
3. To restore it I put a zero in the empty cell
4. reset the .Formula property using the saved string.
5. clear the zero from the cell I was using.

This is working well through my testing so far.

Brian
 
Top