Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting min max values for the Horizontal Axis on a Google Sheets chart

I have a google sheet with an embedded chart. I am able to add min/max values that display on the chart for the vertical axis, but not the horizontal.

Here are the details for the verticle axis:

enter image description here

But I don't have min/max options for the horizontal axis:

enter image description here

What am I missing?

like image 368
Mark Locklear Avatar asked Oct 20 '25 13:10

Mark Locklear


2 Answers

The Min-Max option will only appear if the defined X-axis range contains only numeric values:

I was able to reproduce this with a sample table. My X-axis range is A3:A6.

enter image description here

When numeric values are used for the X-axis range:

enter image description here

like image 122
CMB Avatar answered Oct 22 '25 04:10

CMB


For dates, there is this workaround: Dates are persisted as integer numbers, December 30th, 1899 being day #0 (allowing negative numbers), so that 2025-01-01 is day #45658 (Gregorian calendar, by which year 1900 was NOT as leap year).

Now, do this:

  1. Format your source data as integers. This will allow you to set horizontal axis boundaries in the diagram.
  2. Set your horizontal axis boundaries as you need. Now the diagram axis displays the integer values (which are likely not very informative).
  3. In the diagram, format the display of the axis values to the date format you wish.
like image 33
Niels Kristoffer Henriksen Avatar answered Oct 22 '25 04:10

Niels Kristoffer Henriksen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!