chart secondary axis crossing with x axis

MS EXCEL

    Next

  • 1. UserForm Tab Name Change
    Hi All We have a drop down combo box filled by RowSource we need to copy and move a constant sheet named Result and move it to the end of the workbook with a tab name selected from the combo box and at the same time clearing the contents of the Result sheet - Range A8:L200. Perhaps using a commandbutton once a choice has been made from the combo box. -- Many Thanks Sue
  • 2. Find character in string
    Tobacco Outlet #1 TRO #1 Tobacco Road Outlet #1 Needs to return 1 Tobacco Outlet #1201 TRO #1201 Tobacco Road Outlet #1201 Needs to return 1201
  • 3. Find character in a string
    Thanks for any help. How can I get Everytthing to the left of a character. Examples od data Tobacco Outlet #1 TRO #1 Tobacco Road Outlet #1 Needs to return 1 Tobacco Outlet #1201 TRO #1201 Tobacco Road Outlet #1201 Needs to return 1201
  • 4. Solved
    I forgotten the GetHyperlinks CString ls_cellPos; ls_cellPos.Format("A%d", 3); icl_hyperlinks = icl_oWksSheet.GetHyperlinks(); icl_hyperlinks.Add(icl_oWksSheet.GetRange(COleVariant(ls_cellPos), COleVariant(ls_cellPos)), "c:\\test.txt", covOptional, covOptional, COleVariant("test")); Tks "Rui Oliveira" wrote: > C++ Excel automate, add hyperlink > > How can I add a hyperlink in excel automation? > > We have function 鈥淗yperlink.Add鈥? but I don鈥檛 know what insert in first >> argument. >> >> LPDISPATCH Add(LPDISPATCH Anchor, LPCTSTR Address, const VARIANT& >> SubAddress, const VARIANT& ScreenTip, const VARIANT& TextToDisplay); >> >> Anyone have some sample code? >> >> Thanks, >> Rui >>
  • 5. Can this be done better? - 'selective protection'
    Hi All, I have a requirement whereby l need to make only particular sheets available for data entry dependent on several different passwords / logons. Complications: 1) All sheets need to be protected so that data entry is restricted to unlocked cells. 2) All sheets must be visible (users need to follow the audit trail even if a department is not under their jurisdiction.) I am sure that somebody has done similar to this in the past and wonder if anybody can provide or suggest a solution. If not can they improve on the following strategy? (assumes all sheets protected on opening) 1) Workbook_open event userform for password entry 2) Password 'mapped' to select case statement 3) Select case statement changes the 'enable selection' property in all unavailable 'input' type sheets to xlNoSelection 4) Reset selection property on Workbook_close The problem l can forsee with this strategy is that the workbook would have to be saved / closed to change user permissions unless l provide a method within the workbook via button / menu. All contributions welcome Regards Michael

chart secondary axis crossing with x axis

Postby Matthew Dodds » Thu, 01 Dec 2005 20:48:21 GMT

I have a series of VBA generated plots with dual axes.
The data charted is best represented with a logprimary axis scale and a
log secondary axis scale.

For most datasets this is fine, and has the left/primary axis marker
'1' aligned horizontally with the right/secondary axis marker '0'; all
correct and how I want it it.

However, when an original value is less than 1, the primary log axis
responds appropriately by adding another log unit ('0.1') to
accommodate the data. The problem the plot then has is that this new
minimum on the primary log scale is aligned horizontally with the
right/secondary axis marker '0', which is not correct at all.

How can I code that the minimum axis value on the secondary axis (which
is invariably zero) will always align horizontally with the value 1 on
the primary log axis, regardless of how many log units this primary
axis requires?

Thanks in advance for your suggestions.

Matthew


Re: chart secondary axis crossing with x axis

Postby Jim Cone » Fri, 02 Dec 2005 06:34:05 GMT

Matthew,
Take a look at the CrossesAt property of the Axis object.
Regards,
Jim Cone
San Francisco, USA

"Matthew Dodds" 
< XXXX@XXXXX.COM > 




I have a series of VBA generated plots with dual axes.
The data charted is best represented with a logprimary axis scale and a
log secondary axis scale.
For most datasets this is fine, and has the left/primary axis marker
'1' aligned horizontally with the right/secondary axis marker '0'; all
correct and how I want it it.
However, when an original value is less than 1, the primary log axis
responds appropriately by adding another log unit ('0.1') to
accommodate the data. The problem the plot then has is that this new
minimum on the primary log scale is aligned horizontally with the
right/secondary axis marker '0', which is not correct at all.
How can I code that the minimum axis value on the secondary axis (which
is invariably zero) will always align horizontally with the value 1 on
the primary log axis, regardless of how many log units this primary
axis requires?
Thanks in advance for your suggestions.
Matthew

Similar Threads:

1.Value (Y) axis crosses between categories and Secondary Value (Y) Axis

Hi all -

I have 7 series on my chart
Series 1 is column chart - may be area chart eventually (2007 data)
Series 2 is column chart 2008 data
Series 3 is column chart 2007 avg
Series 4 is a column chart 2008 avg
Series 5 is a line chart (32,0 benchmark)
Series 6 is a line chart (points to column chart for 2007 avg, I then
add text to right to explain the column)
Series 7 is a line chart (points to column chart for 2008 avg, I then
add text to right to explain the column)

I would like the column charts for 2007 and 2008 data to be flush to
the origin (12 data points each year)
I would like the benchmark line chart of 32 to span the chart area
from left to right (16 data points)

>From what I've read, the way to accomplish this, is to clear the tick
mark from Value (Y) axis crosses between categories when formatting
the x axis.

However, when I do that, the data point for 2007 closest to the origin
appears cut-off on left side of column

I more or less posted this information on Ozgrid a few days ago
(Ozgrid is now down until Nov. 13 according to the site). Andy Pope
replied that if I move the line charts to the Secondary Value (Y)
Axis, that would resolve the problem.

I must be doing something wrong. I did assign the line chart to
Secondary Value (Y) Axis and then cleared the tick mark on the x axis:
Value (Y) axis crosses between categories. However whatever datapoint
is closest to the Primary Y Axis disappears entirely

What am I doing wrong here?
Send a confidential e-mail for a sample copy of the workbook
Best regards,
-markc

2.Display of secondary axis trendline for a secondary axis plot

I'm having trouble getting an Excel XP chart to display the trend line for a 
plot related to the secondary axis.  When I do so, it shows up on the legend 
list, but not (observedly) on the graph itself.

If I change all to the primary axis, then I can get the problem line trended 
- that is, I can see the trend line (but of little use at that scaling).

3.Reversing X axis flips Primary Y axis plot but not Secondary Y axis plot

In Excel 2007, I have three columns of values.  When I create a scatter chart
with these three columns, the first is the X axis data and I can show a Primary
Y axis for the second column data and a Secondary Y axis for the third column
data.  But when I click on "Values in reverse order" on the X axis, only the
primary Y axis data plot is flipped, not the secondary axis data.   Please test
this yourself and see what I mean.  I can find no way to fix this problem. 
Please let me know if you have a solution.

4.Pivot Table, Line Chart with Secondary Y axis, Page Field selection destroys Y2 axis

Even after googling for a while I cannot find anyone with the same
problem, so here it is:

if generating a Line Chart out of a Pivot Table with Page fields, AND
using a Secondary Y Axis in the line chart to separate 2 or more
curves, this secondary Y axis disappears as soon as any Page Field
value is reselected or changed!
I'd call this a serious bug.

Depending on the Excel versions I tried the effect is different, but
destructive to that Y2 association:
- in Excel 2002 (SP2) all curves of the Line Chart are associated with
the Primary Y axis, the secondary one disappears
- in Excel 2000 the LABELS of BOTH Y axes disappear (even worse as the
curves can no longer associated with each scale)

The only way to get the Secondary Y Axis back is to select any curve
and change "Axis" in the "Format Series" menu.

Is there any official fix for this or a work-around.
We generate these charts programmatically through VB/VBA and need it
work reliably.
Thanks

michael walter

5.Chart distorts secondary axis when the x-axis is logarithmic

I'm trying to create a chart whose x-axis and primary y-axis are logarithmic 
and whose secondary y-axis is linear using Excel 2007.  No matter how I build 
the chart (i.e. three columns at the same time, or adding a series at a time) 
as soon as I select logarithmic from the x-axis options the data plotted on 
the y-axis ( the linear axis) becomes distorted (logarithmic).  How can I 
correct this?  Thanks for your help.

6. Need PivotChart x axis to cross Y axis at minimum Y axis value

7. How do I get the secondary axis to cross at zero

8. Secondary Axis not crossing at zero



Return to MS EXCEL

 

Who is online

Users browsing this forum: No registered users and 22 guest