PC Review


Reply
Thread Tools Rate Thread

Aligning two chart plot areas - simple but tricky!

 
 
Alseikhan
Guest
Posts: n/a
 
      20th Mar 2006

I have two dynamic lined charts whose chart areas are aligned; however
because the y-axis values change dramatically when graphing differen
ranges, the chart plot areas misalign (Y-axis shift to the right t
accomodate larger y-values displayed next to vertical axis). Thi
annoying behavior essentially puts the the two charted lines in the tw
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 b
clear, the aligned areas must not include the y-axis values which ca
alternate between 1-100 range to 1-1000,000 range)
Thank you in advanice for your valuable assistance.

Alseikha

--
Alseikha
-----------------------------------------------------------------------
Alseikhan's Profile: http://www.excelforum.com/member.php...fo&userid=3236
View this thread: http://www.excelforum.com/showthread.php?threadid=52460

 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      20th Mar 2006
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" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
>
> 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
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Simple Bar Chart - 2 Areas for help please BRob Microsoft Excel Charting 4 18th May 2008 02:42 AM
Plot areas =?Utf-8?B?THluZGE=?= Microsoft Excel Charting 3 16th Nov 2006 08:42 AM
fixed plot areas? =?Utf-8?B?c3BhY2V5Z3JhY2U=?= Microsoft Excel Charting 2 4th May 2006 08:37 PM
Multiple plot areas =?Utf-8?B?S2F0aWU=?= Microsoft Excel Charting 1 16th Nov 2005 10:35 PM
Multiple Plot areas in one chart area =?Utf-8?B?WmFj?= Microsoft Excel Charting 2 13th Nov 2003 02:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:45 AM.