If you’re using Stacks in the Dock, either the built-in ones for Documents and such, or your own, like the Recent Items Stack, you might want to customize the way the Stack looks and behaves.
In Mac OS X Mountain Lion, at least, and very likely earlier versions of OS X, you can have your Stacks appear as a grid, a list, or a fan. You can also have OS X choose the best view for you, depending on how many items are in the Stack.
Here’s the quick way to change the view of any Stack in your OS X Dock.
Find the Stack you want to modify in the right-hand side of the Dock, typically just to the right of the separator line there. Right-Click, or Control-Click, on the Stack and then select the view you want to use from the menu underneath the “View Content As” area.
When you choose Fan, the content of the Stack will look like a curved line of items, organized by your sort option. Choosing List will put them in a nice, neat, orderly left-justified list of items, and Grid will show the icons of the stuff inside in more of an icon-based grid structure, a lot like the icon view in the Finder.
You can also choose how the items in the Stack are listed, too, choosing to Sort by Name, Date Added, Date Modified, Date Created, or Kind. You can also display the icon for your Stack as either a folder, or as an actual stack of the stuff inside the Stack folder.
Source: Apple Support