Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Graph with two Y Axis Scales (XP/03)

    Does anyone have experience with creating charts in Access? My challenge is that I have two data series (one with count and the second with dollars) that I would like to graph on the same chart with two different Y Axis.

    Charting the data below puts the "Count" so small that it is not visible.
    Year Count Cost
    2002 180 $2,078,344
    2003 145 $2,113,023
    2004 120 $1,886,453
    2005 112 $1,400,367

    Any help is greatly appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Graph with two Y Axis Scales (XP/03)

    Open the form in design view.
    Make sure that the chart control is enabled and not locked.
    Switch to form view.
    Double click the chart to edit it.
    From the Chart Objects dropdown list on the Standard toolbar, select the Count series.
    Select Format | Selected Data Series...
    Activate the Axis tab.
    Click Secondary Axis.
    Click OK.
    Click outside the chart to stop editing it.
    Save the design of the form.

  3. #3
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Graph with two Y Axis Scales (XP/03)

    Hans,

    THANKS! ! Although I was doing this in a report, I was able to use your instructions and apply to the report. There is one minor challenge if you will allow me to ask. I have tinkered with the chart until my hands hurt and am not able to figure out how to move the bars of the two data series side by side instead of one behind the other. For now I have made one data series bars wider than the other to compensate, but it just doesn't feel good or look right.

    Do you know of a way to get the bars to shift?

    thanks,
    Ken

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Graph with two Y Axis Scales (XP/03)

    A copout is to use a line chart instead of a column chart.
    If you prefer to use a column chart, you can do it as follows:
    - Change the row source of the chart control to something like

    SELECT Year(...), Count(...), Null, Null, Avg(...) FROM ...

    In other words, insert two dummy series.

    - Let the first two series use the primary axis, and the last two series use the secondary axis.

  5. #5
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Graph with two Y Axis Scales (XP/03)

    Hans,

    Thanks. I had actually deleted two of the four data series after using the chart wizard. Restoring them as you suggested allowed manipulating the columns in various ways. Had to insert a pic as the legend since it wanted to show the blank data series in the legend. But it works fine.

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •