I have a pivot table that actually changes about 15 different graphs and charts each time you flip the switches. I did it without any vba or scripts.
This is how I did it:
sheets
1. Raw data
2. Pivot table
3. Chart data.
1.Create your pivot table and add all the variables you need to the values tab.
2. In the chart data worksheet, you'll set up the layouts for your graphs:
Series var1 var2 var3 (where series is the data name and var1-3 is the data)
3. Then in the cell for the variable, simply enter '=' and then click on the total for that variable on your pivotable page - on mine it looks like this:
=(GETPIVOTDATA("May",Analysis!$A$29))
4. Then build your chart off of this data. In essense you're stripping out the data you want for the graphs and dropping it a secondary page and then building off of that data. The data will automatically update as your pivot changes and your graphs will automatically update from that.
Finally, if it's gonna be used by others, then I 'hide' all the pivot data (font color white with 'white fill').. and my users then simply see the graphs and aren't concerned with the data itself.
Not sure if this is what you're trying to do - but it's how I did it - and, well - it's pretty impressive when all 15 graphs recalculate everytime you change your pivot!