ActiveChart.Axes(xlValue).Crosses = xlMinimum

S

Stacy35216

Windows XP, Excel 2003

OK, I have an add-in that generates a chart. I desperately want th
x-axis to appear at the bottom of the chart, not somewhere in th
middle as it sometimes does.
So, I consulted my reference books/websites and found the command:

ActiveChart.Axes(xlValue).Crosses = xlMinimum

BUT, this command puts the x-axis at the TOP of the chart for som
reason.

Why is my chart disobeying me?!?!
I've tried searching your forum but can't find advice on this.
Does this happen for others? Is there a way around it
 
J

Jim Cone

Stacy,

It's been awhile since I've done any of this, but the help file does say
that the Crosses property is not available for 3D and Radar charts.

If that is not the issue, you might try specifying the crossing point using...
With ActiveChart.Axes(xlValue)
.Crosses = xlCustom
.CrossesAt = 0 ' or the appropriate value
End With

Also, what happens if you use xlMaximum as the Crosses value?

Jim Cone
San Francisco, USA


"Stacy35216"
<[email protected]>
wrote in message

Windows XP, Excel 2003
OK, I have an add-in that generates a chart. I desperately want the
x-axis to appear at the bottom of the chart, not somewhere in the
middle as it sometimes does.
So, I consulted my reference books/websites and found the command:
ActiveChart.Axes(xlValue).Crosses = xlMinimum
BUT, this command puts the x-axis at the TOP of the chart for some
reason.
Why is my chart disobeying me?!?!
I've tried searching your forum but can't find advice on this.
Does this happen for others? Is there a way around it?
 
S

Stacy35216

This is just a regular scatter plot, log scale.

I can't specify a crossing point because the "bottom" of the chart
depends on the data entered - the scale changes as needed.

Oh, well maybe I can by choosing the crossing point depending on the
least y-value of the data set. I'll try that. I'm just miffed that I
found the command to do exactly what I want to do and it won't work.

xlMaximum was the first thing I tried - it also put the x-axis at the
top of the chart.

Thanks for the input, though. If there's not a better way I'll just
write some code to find the what the "bottom" of the chart will be and
then force the crossing at that point.
 
S

Stacy35216

For posterity's sake, here's a method that works:

ActiveChart.Axes(xlValue).Crosses = xlCustom
ActiveChart.Axes(xlValue).CrossesAt =
ActiveChart.Axes(xlValue).MinimumScale

On principle, I still feel cheated that I couldn't use the command
specifically designed for this purpose. :)
 
J

Jim Cone

Stacy,

I did some research and found that one cure was to set the
CrossesAt value to "some stupidly huge negative number or
with logarithmic axes set it to a very small number"
It's something to try.

Regards,
Jim Cone


"Stacy35216"
<[email protected]>
wrote in message

This is just a regular scatter plot, log scale.
I can't specify a crossing point because the "bottom" of the chart
depends on the data entered - the scale changes as needed.
Oh, well maybe I can by choosing the crossing point depending on the
least y-value of the data set. I'll try that. I'm just miffed that I
found the command to do exactly what I want to do and it won't work.
xlMaximum was the first thing I tried - it also put the x-axis at the
top of the chart.
Thanks for the input, though. If there's not a better way I'll just
write some code to find the what the "bottom" of the chart will be and
then force the crossing at that point.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top