PDA

View Full Version : Drag And Zoom Chart Zoomer Add-In



Jason Vint
10-10-2012, 02:50 AM
I know this is a bit old but hopefully this helps someone out. I created this addin 4 years ago that uses a rectangle shape that the user can drag over a chart and it would zoom in on the area. It works for XYscatter type charts and works on any number of series. You can zoom in as much as you want and unzoom all the way back to the initial level. Also has an autofit button. I developed it for Excel 2003 and in 2003 and 2000 it creates icons on the right click subcontext menu but in 2007 and above that was taken out. I also had it create its own toolbar but that was also taken out in 2007 and up. In those versions, the icons are on the add-ins tab on the ribbon when you select a chart. It is somewhat glitchy in 2007 but it still works for me ok and seems to work better in 2010.

https://docs.google.com/open?id=0B47...UlkaWhMOWFRUlk - 2003 version
https://docs.google.com/open?id=0B47...Gw3WE9PWkZmU3M - 2007 and up version

If anyone has any suggestions let me know. And feel free to mod the code to fit your needs just give me credit if you distribute it.

Let me know what you think!

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://eileenslounge.com/viewtopic.php?p=320960#p320960 (https://eileenslounge.com/viewtopic.php?p=320960#p320960)
https://eileenslounge.com/viewtopic.php?p=320957#p3209573 (https://eileenslounge.com/viewtopic.php?p=320957#p3209573)
https://eileenslounge.com/viewtopic.php?p=318868#p318868 (https://eileenslounge.com/viewtopic.php?p=318868#p318868)
https://eileenslounge.com/viewtopic.php?p=318311#p318311 (https://eileenslounge.com/viewtopic.php?p=318311#p318311)
https://eileenslounge.com/viewtopic.php?p=318302#p318302 (https://eileenslounge.com/viewtopic.php?p=318302#p318302)
https://eileenslounge.com/viewtopic.php?p=317704#p317704 (https://eileenslounge.com/viewtopic.php?p=317704#p317704)
https://eileenslounge.com/viewtopic.php?p=317704#p317704 (https://eileenslounge.com/viewtopic.php?p=317704#p317704)
https://eileenslounge.com/viewtopic.php?p=317857#p317857 (https://eileenslounge.com/viewtopic.php?p=317857#p317857)
https://eileenslounge.com/viewtopic.php?p=317541#p317541 (https://eileenslounge.com/viewtopic.php?p=317541#p317541)
https://eileenslounge.com/viewtopic.php?p=317520#p317520 (https://eileenslounge.com/viewtopic.php?p=317520#p317520)
https://eileenslounge.com/viewtopic.php?p=317510#p317510 (https://eileenslounge.com/viewtopic.php?p=317510#p317510)
https://eileenslounge.com/viewtopic.php?p=317547#p317547 (https://eileenslounge.com/viewtopic.php?p=317547#p317547)
https://eileenslounge.com/viewtopic.php?p=317573#p317573 (https://eileenslounge.com/viewtopic.php?p=317573#p317573)
https://eileenslounge.com/viewtopic.php?p=317574#p317574 (https://eileenslounge.com/viewtopic.php?p=317574#p317574)
https://eileenslounge.com/viewtopic.php?p=317582#p317582 (https://eileenslounge.com/viewtopic.php?p=317582#p317582)
https://eileenslounge.com/viewtopic.php?p=317583#p317583 (https://eileenslounge.com/viewtopic.php?p=317583#p317583)
https://eileenslounge.com/viewtopic.php?p=317605#p317605 (https://eileenslounge.com/viewtopic.php?p=317605#p317605)
https://eileenslounge.com/viewtopic.php?p=316935#p316935 (https://eileenslounge.com/viewtopic.php?p=316935#p316935)
https://eileenslounge.com/viewtopic.php?p=317030#p317030 (https://eileenslounge.com/viewtopic.php?p=317030#p317030)
https://eileenslounge.com/viewtopic.php?p=317030#p317030 (https://eileenslounge.com/viewtopic.php?p=317030#p317030)
https://eileenslounge.com/viewtopic.php?p=317014#p317014 (https://eileenslounge.com/viewtopic.php?p=317014#p317014)
https://eileenslounge.com/viewtopic.php?p=316940#p316940 (https://eileenslounge.com/viewtopic.php?p=316940#p316940)
https://eileenslounge.com/viewtopic.php?p=316927#p316927 (https://eileenslounge.com/viewtopic.php?p=316927#p316927)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

Excel Fox
10-10-2012, 08:17 PM
Jason, this is really good. Would be nice to have someone mod this and have it work for a few other commonly used charts also. But nicely done this one, and thanks for sharing. :cheers:

Jason Vint
10-11-2012, 10:29 PM
Jason, this is really good. Would be nice to have someone mod this and have it work for a few other commonly used charts also. But nicely done this one, and thanks for sharing. :cheers:

Thanks Excel Fox! I just recently upgraded to Excel 2007 so I haven't been able to test much in the newer versions. I have 2010 and 2007 at work now so I've been messing with the code a bit. I already found a glitch in 2007 when using on dual Y axis charts. Here's the fixed version.

jcas
08-02-2013, 02:30 PM
Just a comment
I have realized that, once you zoom-inn a chart, the axis number formatting is changed.
I use a no-decimal format in the original chart and a 3 decimal format appears in the zoomed area.
Any suggestions?
Thank you for your great job
Juan