+ Reply to Thread
Results 1 to 2 of 2

Stacked Bar Graphs - Bug when trying to format 2 data points?

  1. #1
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Angry Stacked Bar Graphs - Bug when trying to format 2 data points?

    Hi, i've got code that reformats my graphs after a pivot table update and cycles through all the options in the filter (i.e. people) and saves a .pdf - I'm using a stacked bar graph to to show two data points - Renewals Vs Expiries.

    When there is data for both, my code formats the two data points seperately and it works (the first time)

    Please Login or Register  to view this content.
    However, sometimes there will only be data for one or the other. So, there might be a 100% renewal rate or a 100% expiry rate. In which case i wanted the code to format the the chart appropriately (yellow for renewals, a washed out grey for expiries)

    When this happens i get my test to only execute the appropriate part of the above code. HOWEVER, if the next person on the filter then has two sets of data again (i.e. data for both Expiries & renewals) Excel no longer seems to recognise the two seperate data points.

    Applying formatting to one, applies it to the other. Even when you have only a single data point selected. This happens in the code above AND if you manually go to the chart and try to select the single data point and format it manually. It's like Excel just will not separate the two points.

    Has anyone come across this before, and does anyone know of a fix? Have googled but not got anywhere yet.

    This is driving me crazy!

  2. #2
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: Stacked Bar Graphs - Bug when trying to format 2 data points?

    OK, well i couldn't find how to fix this. So instead i used a workaround.

    I setup a 4 cell range next to the pivot chart, referenced the values in the pivot table with some formula so the titles and values of this range update dynamically as the chart does - then pointed my bar chart at this range. Because there are always two series and two values (although one value may be blank) - the chart doesn't seem to get confused.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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