+ Reply to Thread
Results 1 to 3 of 3

Have horizontal bars--want to indicate average with vertical line....

  1. #1
    Registered User
    Join Date
    09-22-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Have horizontal bars--want to indicate average with vertical line....

    Related to http://www.excelforum.com/excel-char...html?p=2676283 which Teylyn answered, thanks so much! I can't figure out how to make the 'average' line vertical when the bars are horizontal and would appreciate some help. Thanks.

    Re Solution: I took Teylyn's second suggestion, using one data point and error bars. Perfecto.
    Last edited by sarahsez; 01-11-2012 at 09:24 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Have horizontal bars--want to indicate average with vertical line....

    Hello,

    if the main chart is a horizontal bar chart, then you cannot use a line chart for the average line. Line charts only go in a horizontal direction. You need to use an XY chart for the line instead. The first and last X axis value will be the calculated average. The Y axis values will be 0 and 1. Then format the secondary Y axis to have a maximum of 1 to ensure the line will always span the whole height of the chart. Don't forget to set the parameter to connect empty data points with a line (Chart Tools > Select Data > Hidden and Empty Cells button).

    See the attached file. You can format the secondary Y axis to have no tick marks and no labels or line to effectively hide it.

    cheers,
    Attached Files Attached Files

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Have horizontal bars--want to indicate average with vertical line....

    Alternatively, you can use just one data point in the XY chart and then add vertical error bars. In the attached file, the data point sits at Y position 1 and the error bar is set to 100% with the "Minus" option.

    This may be easier to maintain, since you only need the co-ordinates for one data point instead of two.

    cheers,
    Attached Files Attached Files

+ 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