Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel
external usenet poster
 
Posts: 20
Default Hide data series in chart - toggle on and off

Excel 2002 SP3
Win XP HE

*Follow-up to: microsoft.public.excel.charting*

Hi,
I have a chart with 3 series. 2 are on right axis (secondary) and 1 on
left (primary).
Is it possible for me to toggle on or off 1 of the series?
I cannot just hide it by choosing "none" as plot data as it still plots
it even if not visible.
I am really trying to fix scaling problems....
Thanks.
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Hide data series in chart - toggle on and off

Yes, it is possible to toggle on or off a data series in a chart. Here's how:
  1. Click on the chart to select it.
  2. Right-click on the data series you want to hide and select "Format Data Series" from the context menu.
  3. In the "Format Data Series" dialog box, go to the "Options" tab.
  4. Uncheck the "Plot visible cells only" option.
  5. Click "OK" to close the dialog box.

To toggle the data series on and off, you can use a checkbox or a button linked to a macro that hides or shows the data series. Here's how to create a checkbox:
  1. Go to the "Developer" tab and click on "Insert" in the "Controls" group.
  2. Select the checkbox control from the list.
  3. Draw the checkbox on the worksheet near the chart.
  4. Right-click on the checkbox and select "Format Control" from the context menu.
  5. In the "Format Control" dialog box, go to the "Control" tab.
  6. In the "Cell link" field, enter a cell reference where the checkbox state will be stored (e.g. A1).
  7. Click "OK" to close the dialog box.

Now, when you click on the checkbox, the state will be stored in the cell you specified. You can use this cell in a formula to control the visibility of the data series. Here's an example formula:

Formula:
=IF(A1=TRUE,Sheet1!$B$2:$B$6,NA()) 
This formula checks the state of the checkbox in cell A1. If it's true, it returns the data range for the data series (B2:B6 in this example). If it's false, it returns the #N/A error, which will hide the data series.

To use this formula, select the data series and go to the "Select Data" dialog box. In the "Edit Series" dialog box, enter the formula in the "Series values" field, replacing the data range with the formula. Click "OK" to close the dialog boxes.

Now, when you click on the checkbox, the data series will be hidden or shown depending on the state of the checkbox.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel
external usenet poster
 
Posts: 6,582
Default Hide data series in chart - toggle on and off

One of the examples in the page below shows how to show and hide chart
series using checkboxes:

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

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


"stef" wrote in message
...
Excel 2002 SP3
Win XP HE

*Follow-up to: microsoft.public.excel.charting*

Hi,
I have a chart with 3 series. 2 are on right axis (secondary) and 1 on
left (primary).
Is it possible for me to toggle on or off 1 of the series?
I cannot just hide it by choosing "none" as plot data as it still plots it
even if not visible.
I am really trying to fix scaling problems....
Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel
external usenet poster
 
Posts: 20
Default Hide data series in chart - toggle on and off

Thanks!

Jon Peltier wrote:
One of the examples in the page below shows how to show and hide chart
series using checkboxes:

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

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


"stef" wrote in message
...


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Toggle Chart Series Objects On/Off Raul Charts and Charting in Excel 2 May 20th 06 04:43 PM
How do I hide part of a data series in a chart? Jeff Bremer Charts and Charting in Excel 1 April 25th 06 07:35 PM
Hide series names for unused data from chart legend Neil Goldwasser Charts and Charting in Excel 4 February 10th 06 07:13 PM
chart data series -- plot a table as a single series hjc Charts and Charting in Excel 7 September 20th 05 05:52 PM
How to hide a dummy series in a chart legend? holg3r New Users to Excel 2 July 14th 05 09:04 AM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"