How to change axis spacing for dynamic axis range?

Rnkhch

Well-known Member
Joined
Apr 28, 2018
Messages
578
Office Version
  1. 365
Platform
  1. Windows
Hello,

My goal was to create an XY chart that grows automatically as more data is entered for each day of the X axis, and I succeeded. However, I cannot get the spacing between the dates in the X axis correctly, as you can see from the picture below:

1651166138867.png


There should be more gap between 7 and 33 vs 0 and 7 in order to correctly reflect passage of time visually.

I defined three names as follows:
Xasis=Excel!$D$3:INDEX(Excel!$D$3:$R$3,COUNT(Excel!$D$3:$R$3))
Sample1=Excel!$D$4:INDEX(Excel!$D$4:$R$4,COUNT(Excel!$D$4:$R$4))
Sample2=Excel!$D$5:INDEX(Excel!$D$5:$R$5,COUNT(Excel!$D$5:$R$5))

I would appreciate any ideas as to how I can fix this spacing. There will be additional data points for random days that could go to as high as 365 and 540, and it would be great to have nice spacing between the data points.

Thank you!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Change your chart type to XY Scatter and add solid lines to each series (right click on a data point and change the outline color).
 
Upvote 0
As @Oaktree implied but didn't explicitly state. In a Line Chart, the X values are treated as non-numeric categories, so they are evenly spaced, independent of any actual numeric values. An XY Scatter chart treats the X values as numbers, and will space them proportionally to their values.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top