A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Aligning two chart plot areas - simple but tricky!



 
 
Thread Tools Display Modes
  #1  
Old March 20th, 2006, 11:17 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default Aligning two chart plot areas - simple but tricky!


I have two dynamic lined charts whose chart areas are aligned; however,
because the y-axis values change dramatically when graphing different
ranges, the chart plot areas misalign (Y-axis shift to the right to
accomodate larger y-values displayed next to vertical axis). This
annoying behavior essentially puts the the two charted lines in the two
charts out of alignment. Locking the chart areas by code does not help,
since the plot area is the culprit!
Any help on how to align the actual plot areas by VBA code? (to be
clear, the aligned areas must not include the y-axis values which can
alternate between 1-100 range to 1-1000,000 range)
Thank you in advanice for your valuable assistance.

Alseikhan


--
Alseikhan
------------------------------------------------------------------------
Alseikhan's Profile: http://www.excelforum.com/member.php...o&userid=32364
View this thread: http://www.excelforum.com/showthread...hreadid=524606

  #2  
Old March 20th, 2006, 11:47 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default Aligning two chart plot areas - simple but tricky!

You have to dig into the object model to get the plot inside area. I have
posted a workbook with some fairly simple code that does this:

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

Whenever possible, I avoid this technique and use a combination chart
designed for the specific application.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services - Tutorials and Custom Solutions -
http://PeltierTech.com/
2006 Excel User Conference, 19-21 April, Atlantic City, NJ
http://peltiertech.com/Excel/ExcelUserConf06.html
_______

"Alseikhan" wrote
in message ...

I have two dynamic lined charts whose chart areas are aligned; however,
because the y-axis values change dramatically when graphing different
ranges, the chart plot areas misalign (Y-axis shift to the right to
accomodate larger y-values displayed next to vertical axis). This
annoying behavior essentially puts the the two charted lines in the two
charts out of alignment. Locking the chart areas by code does not help,
since the plot area is the culprit!
Any help on how to align the actual plot areas by VBA code? (to be
clear, the aligned areas must not include the y-axis values which can
alternate between 1-100 range to 1-1000,000 range)
Thank you in advanice for your valuable assistance.

Alseikhan


--
Alseikhan
------------------------------------------------------------------------
Alseikhan's Profile:
http://www.excelforum.com/member.php...o&userid=32364
View this thread: http://www.excelforum.com/showthread...hreadid=524606



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
simple line chart in report astro Setting Up & Running Reports 2 December 25th, 2004 08:38 PM
Transparent Excel chart backgrounds Peggy Charts and Charting 1 September 5th, 2004 04:41 AM
Sizing plot areas equally? wlotto Charts and Charting 6 March 15th, 2004 05:47 PM
Is it possible to plot 3 surfaces in a Pivot Chart? (Repost) Alison Charts and Charting 5 October 21st, 2003 11:00 PM
Styles for chart Debra Dalgleish Charts and Charting 1 October 3rd, 2003 12:27 PM


All times are GMT +1. The time now is 10:12 PM.


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