+ Reply to Thread
Results 1 to 4 of 4

Category Axis placement

  1. #1
    Registered User
    Join Date
    10-25-2004
    Posts
    88

    Category Axis placement

    I have a stacked bar chart, with total values of the bars being negative or positive.

    Can I place the Category Axis (X-axis) at the bottom of the chart, without specifying a specific number?

    Now I have put a fixed number on the scale tab for the Value axis (Y) for "Cuts Category Axis (X) at".

    This is rather inconvenient as the minimum values can change from one run to another.

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    You could have an activate event macro, something like

    Private Sub Chart_Activate()
    ActiveChart.Axes(xlValue).ActiveChart.Axes(xlValue).CrossesAt = Worksheets("Sheet1").Range("A1")
    End Sub


    Where Range A1 contains the figure you want the axis to cut through. A1 will have a formula like =MIN(A1:A10)

    This is just for you to get an idea.

    Mangesh

  3. #3
    Tushar Mehta
    Guest

    Re: Category Axis placement

    Pick an arbitrarily large negative number (larger than any legitimate
    value you will possibly have) for the 'Category (X) axis crosses at'
    field.

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <rvExcelNewTip.1q792c_1118052309.586@excelforum-nospam.com>,
    rvExcelNewTip.1q792c_1118052309.586@...rum-nospam.com says...
    >
    > I have a stacked bar chart, with total values of the bars being negative
    > or positive.
    >
    > Can I place the Category Axis (X-axis) at the bottom of the chart,
    > without specifying a specific number?
    >
    > Now I have put a fixed number on the scale tab for the Value axis (Y)
    > for "Cuts Category Axis (X) at".
    >
    > This is rather inconvenient as the minimum values can change from one
    > run to another.
    >
    >
    > --
    > rvExcelNewTip
    > ------------------------------------------------------------------------
    > rvExcelNewTip's Profile: http://www.excelforum.com/member.php...o&userid=15668
    > View this thread: http://www.excelforum.com/showthread...hreadid=376715
    >
    >


  4. #4
    Registered User
    Join Date
    10-25-2004
    Posts
    88
    The last reply was the "ideal" solution to my problem. As the Y-values do represent percentages growth or decline and the decline couldn't be more than 100%, there is an absolute minimum to the scale.

    The nice thing about the solution is that if the minimum data value is e.g. -40%, the Y-scale doesn't extend to -100%.

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1