+ Reply to Thread
Results 1 to 4 of 4

Chart is squeezing the lines for no reason

  1. #1
    Registered User
    Join Date
    02-09-2013
    Location
    Florida
    MS-Off Ver
    Excel 2019
    Posts
    84

    Chart is squeezing the lines for no reason

    Here is the chart in original format. Dates are intended to be only between Nov1-Mar31 for 5 years

    So the chart looks like this

    http://i.hizliresim.com/AJvoaQ.jpg

    So to get rid of the blank dates in between, I choose text axis instead of dates axis , so here is the result

    http://i.hizliresim.com/B21VYG.jpg


    But now the lines are squeezed to the left of the chart. How do I make it spread all the way and look normal?

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

    Re: Chart is squeezing the lines for no reason

    I cannot be certain what is going on based solely on the pictures (a sample file would be more informative). Based on what your description, the "date" axis version looks normal for a line chart with a date axis, and the "text" axis version looks normal for a text axis when the category axis range includes several blank entries towards the end of the range. Is that the case here -- you have included several "empty" cells in the chart's source range?

    If that is the case, and I understand what you want to do, you need to remove those blank/empty/unwanted cells from the chart's source ranges. In these cases, the first strategy suggested is to use "dynamic named ranges". This is an old and frequently discussed technique, so I will defer to others who have written about it:
    http://www.excel-easy.com/examples/d...med-range.html
    http://peltiertech.com/dynamic-charts/
    Or put "dynamic named ranges" into your favorite internet search engine.
    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
    02-09-2013
    Location
    Florida
    MS-Off Ver
    Excel 2019
    Posts
    84

    Re: Chart is squeezing the lines for no reason

    Quote Originally Posted by MrShorty View Post
    I cannot be certain what is going on based solely on the pictures (a sample file would be more informative). Based on what your description, the "date" axis version looks normal for a line chart with a date axis, and the "text" axis version looks normal for a text axis when the category axis range includes several blank entries towards the end of the range. Is that the case here -- you have included several "empty" cells in the chart's source range?

    If that is the case, and I understand what you want to do, you need to remove those blank/empty/unwanted cells from the chart's source ranges. In these cases, the first strategy suggested is to use "dynamic named ranges". This is an old and frequently discussed technique, so I will defer to others who have written about it:
    http://www.excel-easy.com/examples/d...med-range.html
    http://peltiertech.com/dynamic-charts/
    Or put "dynamic named ranges" into your favorite internet search engine.
    To make you clear, I am trying to display only nov-mar for the last 5 years but no gap in between in the chart.

    Dynamic is for dataset which keeps changing, my data does not change

    I do not have a problem with data, my problem is displaying. Excel chart squeezes the line to the left when I change axis options from date axis to text axis

    but if I do not change it then it shows big gaps in between. The gaps are due to April thru October dates which I do not want to show
    Last edited by misterno; 07-08-2016 at 01:02 PM.

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

    Re: Chart is squeezing the lines for no reason

    So that it should be like the text/category axis example, without the blank space to the right, is that correct? I think a text axis is the way to go. Assuming the blank space is caused by empty cells in the source data range, using dynamic named ranges should be a strategy for removing that blank space from the chart.

+ 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] Setting line chart settings in VBA for unspecified number of lines in a chart
    By Vegiepie2016 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2016, 07:30 AM
  2. Replies: 3
    Last Post: 07-29-2015, 09:40 AM
  3. Squeezing more conditions into a sample SUMPRODUCT formula - show a novice pls!
    By RogerRangeRover in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-01-2012, 06:33 AM
  4. How do I create a segmented pie within a pie chart? While squeezing all my contents.
    By moshingbananas in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-07-2012, 06:45 AM
  5. Replies: 3
    Last Post: 09-11-2010, 06:55 AM
  6. Printing images from Excel without squeezing them?
    By joeyeti in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-18-2007, 09:56 AM
  7. [SOLVED] Vertical Lines on the Lines on 2 Axes Chart
    By [email protected] in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-03-2006, 12:20 AM

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