+ Reply to Thread
Results 1 to 4 of 4

Charted data of one data set doesn't match corresponding x-axis value

  1. #1
    Registered User
    Join Date
    01-28-2021
    Location
    Florida
    MS-Off Ver
    Microsoft Office 365
    Posts
    18

    Charted data of one data set doesn't match corresponding x-axis value

    We grow potted plants and have minimum and maximum height specs that they need to finish within by the time of sale.

    We take weekly measurements and get an average weekly height for each crop. The growth rate over time may vary with the variety of plant, so we have three different growth curves (Standard, Late, Linear) that we can compare the weekly measurements to.


    I built a dynamic line chart where you can select the crop name and the growth curve from drop-down menus, and it will update to show the target minimum and maximum heights that the measurements should fall within over time and also shows the actual measured height. One other variable is that the Sell Week may change for a variety of reasons, so the chart needs to update if the weeks change from 44 to 46 or from 44 to 43.

    These are the issues I would like to fix:

    1) I would like the x-axis which, shows the calendar week numbers, to start at the Start Week and end at the Sell Week and show consecutive weekly increments (i.e. 35,36,37,38...). Currently, I am using the curve table week numbers as the x-axis, and they show as decimal points. I tried formatting them as rounded numbers, but sometimes they would skip a week number.
    ChartScreenshot.png
    2) I want the min and max heights from the curve table and the measured heights to align appropriately relative to the week # on the x-axis. You can see in the screen shot of my sample chart that the measured height of 8.67 (highlighted in red) from Week 37 is plotted on Week 38 of the chart. In my actual chart, sometimes the measured data plots earlier than the actual week when the measurement was taken.

    Here is a link to my sample worksheet (https://1drv.ms/x/s!Ane3gAILAlal4hty...48rx4?e=UvbbNh).
    The Plan tab lists the crop names, start and sell weeks and the min and maximum end heights for the different pot sizes. The sell weeks can be updated on this tab.

    Thank you!
    Attached Images Attached Images

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Charted data of one data set doesn't match corresponding x-axis value

    If I interpret your pictures and such correctly, it appears you are using a line chart. If I understand what you want to do, I think you will do better with an XY scatter chart. Then you can define X and Y ranges separately for each data series, and the horizontal position of each data point will be determined numerically rather than being "counted" as the point number/text category.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    01-28-2021
    Location
    Florida
    MS-Off Ver
    Microsoft Office 365
    Posts
    18

    Re: Charted data of one data set doesn't match corresponding x-axis value

    That seemed to work, thank you! I added a Chart_CropREVISED tab to the sample worksheet to show that.

    I do also have a question about making the start values for the x-axis and y-axis dynamic to start at start values in the table instead of at zero without manually updating the axis boundary in the formatting menu. Currently, I have lower bound values set to 5 inches for the y-axis and 32 for the x-axis. But if the starting height is 7" and the start week is week 36, I would prefer the graphs to start at those values on the axes.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Charted data of one data set doesn't match corresponding x-axis value

    As far as I know, the only two options MSFT's programmers have provided for axis max, min, etc. are "auto" using MSFT's default algorithm or "fixed" using values you enter in the formatting dialog. Jon Peltier, one of THE most respected Excel charting gurus has observed that, for as long as he has been working with Excel (going back to the mid '90s, I believe), Excel users have been wanting a 3rd option like you are describing here, and MSFT has not done anything about it. I'm not sure why.

    Peltier does have a workable solution for a 3rd option like you describe: https://peltiertech.com/chart-udf-control-axis-scale/ You might look that tutorial over and see if you want to try implementing that sort of thing in your file. On the few occasions I've had to use his UDF approach, I have had good success. Look it over and see if that is something you would like to try.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Horizontal axis doesn't reflect the data
    By jomili in forum Excel Charting & Pivots
    Replies: 14
    Last Post: 06-17-2020, 04:57 PM
  2. Gantt Chart - Primary Horizontal Axis Doesn't Match Data
    By cdhampshire in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 01-01-2019, 08:03 AM
  3. Gantt Chart - Primary Horizontal Axis Doesn't Match Data - NEW
    By cdhampshire in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-31-2018, 06:56 AM
  4. Axis doesn't match source data
    By xxnsra in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-28-2018, 02:17 PM
  5. Replies: 11
    Last Post: 02-10-2011, 08:13 AM
  6. Data dump of charted data needed
    By maani in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 06-23-2009, 08:23 AM
  7. colors of bar charted data don't follow data after sorting
    By Frankgjr in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-17-2006, 08:40 AM

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