+ Reply to Thread
Results 1 to 15 of 15

Bar chart with 'target' lines but target varies per column

  1. #1
    Registered User
    Join Date
    11-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Question Bar chart with 'target' lines but target varies per column

    Hi,

    I know how to change a data series so it can be a line graph. This is great if the target is a constant. I have a graph that has 4 columns of data (each with the same 3 series of bars). For example;

    The 3 series are - Target, Actual, Planned
    The 4 columns are - Quarter 1, Quarter 2, Quarter 3 and Quarter 4

    The target for Q1 might be 50, Q2 100, Q3 150 and Q4 200. I want a line to only go through the Actual and Planned columns for that Quarter (i.e. not a line that goes up and down across the graph). As it is, I could draw a line however the target figure can (and knowing my luck, probably will) change from time to time.

    Anyone with any ideas would be greatly appreciated.


    Thanks,

    Ineedcoffee
    Last edited by Ineedcoffee; 11-23-2011 at 01:00 PM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    I'm afraid your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    11-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    Hi,

    Apologies romperstomper. I had posted this on another excel forums however a friend told me of this one and said to post the same question here.

    Here is the link to the other one http://www.ozgrid.com/forum/showthre...519#post585519

    I would appreciate any help on this as it is really bugging me now.


    Thanks,

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    Sounds like you want an XY Scatter for the Target series, with no line, but add X error bars so that the target line extends left and right.

  5. #5
    Registered User
    Join Date
    11-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    Thanks,

    I know how to change this to an XY Scatter however I am not sure what you mean about adding X error bars so the target line extends left and right?

    Help is appreciated

  6. #6
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    Can you upload a sample of what you have and a second page with a mock up of what you want?
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  7. #7
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    It would be easier with a sample but basically you change the series to XY, then add horizontal error bars (by default Excel will add both, just change the line colour for the vertical ones to No Line), then set an error value as required (probably just want positive errors and say 0.5 as a value)

  8. #8
    Registered User
    Join Date
    11-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    Ok,

    I have got somewhere but still a little stumped. I have attached a sample of what I am doing, the bottom graph is one where the error lines are, the top is what it looks like now. I want the line to go through the other two columns, horizontally (preferably centralised with the columns).

    Any feedback would be great.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    Hey,

    After messing around for a while. I got it working, however now I cannot seem to get a data table at the bottom, any idea how to get it back on?


    Thanks.

  10. #10
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    You can't have it with the XY chart. What you can do is use something like the attached, which is actually a line chart but I replaced the markers with a line that I drew on the sheet and then copied and pasted onto the chart series.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    11-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    Thats excellent, just what I need.


    Thanks,

  12. #12
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    Romperstomper, can you explain howyou drew then were able to insert the line? i'm trying to replicate but can't get a custom line in, and the inbuilt one for the marker options isn't wide enough to cover the width of the columns i'm marking against

  13. #13
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: 2010 - Bar chart with 'target' lines but target varies per column

    I drew a line shape on the sheet, and formatted it the way I wanted. I then copied it, selected the chart series and pasted it.

  14. #14
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Bar chart with 'target' lines but target varies per column

    Ok, i'll try that. I tried reformatting the markers, which wasn't too clever and also insert line, same. I'll try drawing, it's visually quite a nice way to express in a chart

  15. #15
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Bar chart with 'target' lines but target varies per column

    This was an interseting challenge which I could not resist.

    I had the same thoughts for a solution as those suggested,

    - use xy-scatter with error bars
    - use xy-scatter to draw lines

    Both of these prohibit the use of a data table.

    Custom marker as RS suggest seems the best approach although you lost the ability to format the series without repeating the shape, copy and paste process.

    I though about using a 2 series stacked column. Lower stacked is transparent to give the illusion of a floating line. Problem was this added an extra row to the data table.

    What I came up with was a line series on the secondary axis plotted as dates. It requires quite a bit of additional data and a specific data layout but it address the problem for formatting the line in the future as well as not adding series to the data table.
    The first 4 data points of the series occupies the Target row in the data table. The other points define start, finish and break points.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

+ 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