PDA

View Full Version : Chart Zoomer (Resizer)



Admin
03-31-2011, 09:51 PM
Hi All,

Haven't seen anything yet. A great tool for dashboards.

I welcome any comments/bugs.

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://eileenslounge.com/viewtopic.php?p=317218#p317218 (https://eileenslounge.com/viewtopic.php?p=317218#p317218)
https://eileenslounge.com/viewtopic.php?p=316955#p316955 (https://eileenslounge.com/viewtopic.php?p=316955#p316955)
https://eileenslounge.com/viewtopic.php?p=316955#p316955 (https://eileenslounge.com/viewtopic.php?p=316955#p316955)
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://eileenslounge.com/viewtopic.php?p=317014#p317014 (https://eileenslounge.com/viewtopic.php?p=317014#p317014)
https://eileenslounge.com/viewtopic.php?p=317006#p317006 (https://eileenslounge.com/viewtopic.php?p=317006#p317006)
https://eileenslounge.com/viewtopic.php?p=316935#p316935 (https://eileenslounge.com/viewtopic.php?p=316935#p316935)
https://eileenslounge.com/viewtopic.php?p=316875#p316875 (https://eileenslounge.com/viewtopic.php?p=316875#p316875)
https://eileenslounge.com/viewtopic.php?p=316254#p316254 (https://eileenslounge.com/viewtopic.php?p=316254#p316254)
https://eileenslounge.com/viewtopic.php?p=316280#p316280 (https://eileenslounge.com/viewtopic.php?p=316280#p316280)
https://eileenslounge.com/viewtopic.php?p=315915#p315915 (https://eileenslounge.com/viewtopic.php?p=315915#p315915)
https://eileenslounge.com/viewtopic.php?p=315512#p315512 (https://eileenslounge.com/viewtopic.php?p=315512#p315512)
https://eileenslounge.com/viewtopic.php?p=315744#p315744 (https://eileenslounge.com/viewtopic.php?p=315744#p315744)
https://www.eileenslounge.com/viewtopic.php?p=315512#p315512 (https://www.eileenslounge.com/viewtopic.php?p=315512#p315512)
https://eileenslounge.com/viewtopic.php?p=315680#p315680 (https://eileenslounge.com/viewtopic.php?p=315680#p315680)
https://eileenslounge.com/viewtopic.php?p=315743#p315743 (https://eileenslounge.com/viewtopic.php?p=315743#p315743)
https://www.eileenslounge.com/viewtopic.php?p=315326#p315326 (https://www.eileenslounge.com/viewtopic.php?p=315326#p315326)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40752 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40752)
https://eileenslounge.com/viewtopic.php?p=314950#p314950 (https://eileenslounge.com/viewtopic.php?p=314950#p314950)
https://www.eileenslounge.com/viewtopic.php?p=314940#p314940 (https://www.eileenslounge.com/viewtopic.php?p=314940#p314940)
https://www.eileenslounge.com/viewtopic.php?p=314926#p314926 (https://www.eileenslounge.com/viewtopic.php?p=314926#p314926)
https://www.eileenslounge.com/viewtopic.php?p=314920#p314920 (https://www.eileenslounge.com/viewtopic.php?p=314920#p314920)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

Rasm
04-02-2011, 08:44 PM
Krish

Looks good - However I am searching for a tool to zoom (meaning changing the Axes) - As you know I got your file (this thread) by your reply on MrExcel - I started a thread over there

How to zoom on charts using VBA

So maybe you can add to the discussion ( It was a much bigger question than I expected - lol) - there is a piece of code that actual works quite well - but it needs finishing. It is way over my head - so maybe take a look see. It turns out that there is really no good tool for Excel to zoom.

Jim Fleming
04-03-2011, 09:04 PM
Just wanted to let everyone know that I downloaded Kris's chart zoomer workbook and it really works great.

Jim

Admin
04-03-2011, 09:16 PM
@ Rasm,

Thanks for the comment.

As far as the discussion at MrE, I think, only Jaafar could assist you as I'm not up to his level when it comes API :(

@ Jim,

Thanks for the nice comments. You don't need to start a thread to provide the feedback.

Rasm
04-04-2011, 04:42 PM
Krish - I really like your zoomer - However it is right now activated by the user having to assign a macro to any new chart. I can do that - but many of my users cannot - you then use the Application.caller.
It would be nice if the user can simply click the chart - do the (un)zoom - without assigning any macro. I can replace your application.caller with simply the chart number and I can use your call to the ZoomChartInAndOut procedure - no problem. As I said I really like it - but as you know - there is always suggestions

The other feature that would be very nice - is if you could have a split screen - I offen want to Zoom charts side by side - or even 2*2 charts (4 charts on a single screen.

Anyway - I am just starting to figure out how to use your zoomer - very nice job:)

Admin
04-04-2011, 10:23 PM
Hi,

Here is Version #1. Don't need to assign the macro with the charts.

Enjoy !

Rasm
04-04-2011, 10:29 PM
Sweet - You added Chart events in the class module - I will have to play some more - but looks good.

Rasm
04-05-2011, 12:49 AM
Krish - that new version is great. Below is part of my code - it generates charts (2n code section) - so in order for me to use your code - I have to switch sheets - then come back to the sheet - Then I assume it executes GetChartObjects - It all works great (guess I will just make the call to GetChartObjets from my code) - however in the second code part is my chart generation code - At first I just had the next chart on top of the previous chart .top+40 & .Left + 40 - in other words all my charts are stacked - I may have 4 to 8 charts stacked - however that freezes up Excel in a very bad way - It looks like as long as the charts dont overlay - everything works - so the code I show is where I make sure the charts dont touch. I think that is what the problem is. I am not complaining - just trying to make it better - cuz I like your routine.



Private Sub Workbook_SheetActivate(ByVal Sh As Object)
GetChartObjects Sh 'Krish code
End Sub

Private Sub Workbook_Open()
Load FormSlt
FormSlt.Show vbModeless
GetChartObjects ActiveSheet 'Krish code
End Sub


Part of my chart making code


ActiveSheet.ChartObjects.Add Left:=50, Top:=50, Width:=600, Height:=300
NumCharts = ActiveSheet.ChartObjects.Count
If NumCharts > 1 Then
ActiveSheet.ChartObjects(NumCharts).Left = ActiveSheet.ChartObjects(NumCharts - 1).Left '+ 40
ActiveSheet.ChartObjects(NumCharts).Top = ActiveSheet.ChartObjects(NumCharts - 1).Top + 40 + ActiveSheet.ChartObjects(NumCharts - 1).Height
ActiveSheet.ChartObjects(NumCharts).Height = ActiveSheet.ChartObjects(NumCharts - 1).Height
ActiveSheet.ChartObjects(NumCharts).Width = ActiveSheet.ChartObjects(NumCharts - 1).Width
End If
ActiveSheet.ChartObjects(NumCharts).Activate
Dim Achart As ChartObject
Set Achart = ActiveSheet.ChartObjects(NumCharts)
With Achart.Chart
.ChartType = xlLine

Rasm
04-05-2011, 12:53 AM
Krish - one more question - how can I edit my charts - i.e. Axes-layout - design ext - is there a procedure to call that allow me to toggle your code on/off. Sorry to be a pest - but I want to use this code-:thumbsup:

Rasm
07-05-2011, 04:45 AM
Chris
I really like your chart zoomer (Readers - it is under downloads if you have not tried it).

Attached is 9 charts made by my own code - I have added your code to my code - works great - except the charts after being zoomed become transparent - the 3 charts of the 1st shift type has been viewed by the chart zoomer - the last 6 has not - however if you now click on a 2nd shift chart it become transparent after I make it small - This is a problem as I have stuff in the cells behind - so now it looks kinda bad. Anyway to make sure the charts are not becoming transparent.
Thanks in advance

Rasm
07-05-2011, 05:20 AM
Chris - If I used a solid fill of the chart area then there is no problem - so I guess it is cuz I have a gradient fill - hmmm - I suppose I have to use a solid fill of the chart area


https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=SIDLFRkUEIo&lc=UgzTF5vvB67Zbfs9qvx4AaABAg (https://www.youtube.com/watch?v=SIDLFRkUEIo&lc=UgzTF5vvB67Zbfs9qvx4AaABAg)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgzMCQUIQgrbec400jl4AaABAg (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgzMCQUIQgrbec400jl4AaABAg)
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg (https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugx12mI-a39T41NaZ8F4AaABAg.9iDQqIP56NV9iFD0AkeeJG (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugx12mI-a39T41NaZ8F4AaABAg.9iDQqIP56NV9iFD0AkeeJG)
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugxa2VYHMWJWXA6QI294AaABAg.9irLgSdeU3r9itU7zdnW Hw (https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugxa2VYHMWJWXA6QI294AaABAg.9irLgSdeU3r9itU7zdnW Hw)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzFkoI0n_BxwnwVMcZ4AaABAg (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzFkoI0n_BxwnwVMcZ4AaABAg)
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg.9htChVuaX9W9htG01cKBzX (https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg.9htChVuaX9W9htG01cKBzX)
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htJ6TpIO XR (https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htJ6TpIO XR)
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgwMKwGZpDjv7vi7pCx4AaABAg (https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgwMKwGZpDjv7vi7pCx4AaABAg)
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htOKs4jh 3M (https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htOKs4jh 3M)
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgxVW-am20rQ5GFuJ9F4AaABAg (https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgxVW-am20rQ5GFuJ9F4AaABAg)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

Admin
07-06-2011, 10:24 PM
Hi Rasm,

Sorry for the late reply. Forum was down for the last 24 hours :(

Replace


If objChartObject.Chart.ChartArea.Interior.Color = -2 Then
objChartObject.Chart.ChartArea.Interior.Color = ZoomInChartAreaColor
End If

with


If objChartObject.Chart.ChartArea.Format.Fill.ForeCol or.RGB = ZoomInChartAreaColor Then
objChartObject.Chart.ChartArea.Format.Fill.ForeCol or.RGB = ZoomInChartAreaColor
End If

Essentially replace
objChartObject.Chart.ChartArea.Interior.Color

with


objChartObject.Chart.ChartArea.Format.Fill.ForeCol or.RGB

HTH

Alexpi
10-22-2011, 01:13 AM
This Chart Zoomer is exactly what I needed for a dashboard I'm working on. I did notice that after using this a few times I am unable to scroll down or right...Any idea how to fix this?

Thanks again for this chart zoomer. you have no idea how helpful this is!

Thanks,

A

Excel Fox
10-22-2011, 01:39 AM
Search for the line
.Parent.ScrollArea = strVsblRngAddr and comment it/remove it.

marcnz
12-14-2020, 06:11 AM
I did not realise this is actually just a chart blow up, it does not allow to zoom in a portion of the chart.
I cannot have any Excel add-ins installed due to network security at the workplace (understandable...) and I must develop a chart tool where it is possible to highlight any section of a chart and "zoom" into this section, which means:

1. Identifying any series currently on the chart
2. identifying the x-axis date/time values boundaries highlighted from the zoom area on the chart
3. filtering the pivot table accordingly (I am working with pivot tables > pivot chart from a recordset extracted via ODBC VBA connection)

I have difficulties finding such information on Google.

This tool is definitely a very nice tiny chart expansion tool :)

Any suggestion would be greatly appreciated.
Thank you