开发者

Can Excel charts be interactively zoomed and panned? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Closed 9 years ago.

开发者_如何学C
  • Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
  • This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question

I've always wanted this feature in excel

I'm wondering if it's possible to develop a plugin or if one exists already?


They can if you use dynamic names ranges. Stephen Bullen has a great example here

Screenshot below
The data can be zoomed (amount of data) and scrolled (change start position)

Can Excel charts be interactively zoomed and panned? [closed]


This might be irrelevant by now (seeing as it's been half a year), but: One improvement for Stephen Bullen's approach I would suggest is to map the scrollbar values to the actual values. What I mean is this: if you're fully zoomed out (you see everything), you can still scroll around which doesn't make sense. Additionally, if your dataset grows, you'd have to reformat the scrollbars max. values. I solved it like this:

  • Let both scrollbars assume values 1-1000.

  • Let a specific cell contain the number of the last row of your dataset (can be formula-computed somehow, I guess) - I assume cell Z1 contains this information.

  • Define a new name 'ActualZoomVal', let it point to an arbitrary cell. I assume Z2 here.

  • Define a new name 'ActualScrollVal', let it point to a different arbitrary cell. I assume Z3 here.

  • Let the cell of 'ActualZoomVal' contain following formula: =MAX(2;ROUND(ZoomVal*($Z$1/1000);0))

  • Let the cell of 'ActualScrollVal' contain following formula: =ROUND(($Z$1-ActualZoomVal)*(ScrollVal/1000);0)

  • Create the diagram as suggested in Stephen Bullen's example file, but with ActualZoomVal/ActualScrollVal instead of ZoomVal/ScrollVal

Not only is this a 'cleaner' and more flexible solution, it also improves usability - say you want to zoom in on the last part of the data set from a fully zoomed out state, then just set the scroll bar all the way to the right and keep zooming in until you've reached the desired zoom level.


Here is one solution for zooming on Excel charts. You add a zoom button to the chart, and pressing the button calls a macro to enlarge the chart by a specified amount.

The workbook containing the macro is available for free download at

http://www.excelcampus.com/vba/zoom-on-excel-charts

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜