Chart Axis - Min and Max Values

I

Isit Ears

I have a report with 2 charts on it, both in the same section footer. this
then produces approx 40 sets of charts based on my data (2 charts for each
category). Each chart has 2 Y Axis. Most of the charts have a suitable
scalling on both axis, however on 6, the 2nd y axis always starts form 0,
when I require it to start from a much higher value. I have checked the data
and that is correct, can you force access to reset the axis on each chart as
it produces them - or is this a bug?

Thanks
 
R

Rob Parker

You can set the minimum value for the secondary y-axis by using code such
as this in the Format event of the section of the report which contains the
chart:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'Adjust scale of y-axis to provide sensible window
Dim lngYMin As Long
lngYMin = AnExpressionToCalculateDesiredMinimum Value
Me.Controls("NameOfChartControl").Axes(2,2).MinimumScale = lngYMin
End Sub

The first "2" in the Axes() property refers to the y-axis; the second "2" in
the Axes() property refers to the secondary axes.

I'm not sure what you're referring to exactly when you ask "is this a bug?".

HTH,

Rob
 

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