+ Reply to Thread
Results 1 to 10 of 10

Area chart "base" seems to rise

  1. #1
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Area chart "base" seems to rise

    Hi, I'm having more charting issues.

    I plot a chart and make it an area chart. So far so good. When I move that chart to a different sheet, suddenly the base seems to rise. It starts at 0 where it should be, but then increases to almost 0.8. Does anyone know why this might be happening?

    The workbook I have has a ton of personal data, so I'm going to post a screenshot. I realize this is generally frowned upon, but it shows the problem sufficiently.
    Attached Images Attached Images
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,257

    Re: Area chart "base" seems to rise

    Without being able to see the chart and its source data, I suspect it will be hard to say.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Area chart "base" seems to rise

    Yeah, I kind of figured that. Anyway, I figured out how to fix it, but I still don't understand what is going on behind the scenes to cause it. When I set the hidden and empty cells to Gaps, it changes the graph back to how I would expect it to look. If I leave it on Zero, it stays as it looks above in the screenshot.
    If anyone can explain why this happens, I'd certainly apppreciate it.

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

    Re: Area chart "base" seems to rise

    Can you post example of data and chart
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Area chart "base" seems to rise

    A bit delayed, but here is the example:
    Attached Files Attached Files

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

    Re: Area chart "base" seems to rise

    The chart object is corrupt for some reason.
    Simply delete it and add a new chart, remember to fix the value axis to start at zero.

  7. #7
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Area chart "base" seems to rise

    I tried deleting the graph and adding a new one, but the new one is exhibiting the same behavior. I am manipulating the graph by code, shown below. Don't be put off by the length, it is well commented.


    Please Login or Register  to view this content.
    Explanation of code:
    Clear off previous graph data. Paste new graph data from results that have been exported onto a sheet from Access. Delete that sheet from Access. If any rows have no data, delete them. Set the graph header, gotten from cell 1,1 of the table. Check each column for data. If none is present, hide the column so it will not be graphed. The reason for this is the user is given an option to show up to 6 sets of data on the graph, and if they choose to do less than 6 but the columns are not hidden, the series markers will show up in the legend.

    Thanks Andy
    Last edited by davegugg; 05-24-2011 at 11:20 AM.

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

    Re: Area chart "base" seems to rise

    None of that code creates a chart.

    I can not test it as I do not know what the arguments are.

    The following, for me, creates a valid area chart on the Charts tab.

    Please Login or Register  to view this content.

  9. #9
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Area chart "base" seems to rise

    No, I'm not creating a chart. I have a chart set up and defined, and my code just changes the data that the chart will display. The arguments come in as the titles of the data charted - unless the user has not chosen to chart all 6 sets of data. In my posted example, strInv1 would have been "FAMC", strNR1 would have been "4.750%", strInv2 and strInv3 = "" and strNR2 and strNR3 = "0.000%".

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

    Re: Area chart "base" seems to rise

    Here is the workbook with a new chart correctly displayed. If the chart alters after running your code I would check to see the version of excel you have has all the service packs and updates applied.
    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