How to use linear gradient on third axis?

So I can switch from the U and V gradient. But how to use linear gradient on the other axis? Is there another node I can use? Do I have to make a new UV map? Trying to get the darker grey axis.

I am not sure to understand, you want a global gradient for multiple object in multiple position and all need to have the same global gradient ? If yes you can look about the Absolute World Position

Not really what I’m looking for, its just one object. But I found a workaround, thanks!