You've seen several of my applications that make use of color columns. I even blogged about them awhile back. You've all probably also seen an application somewhere along the line that included a view with a "gantt chart". There are a million different ways to go about building this functionality into a view, but I like the solution of using color columns due to their simplicity. Here's an example:
The trick I used here was to create 10 color columns whose values are checked (in increments of 10) against the value on the document that shows percent complete. Here's the formula for the first color column:
@If(PercentComplete >= 10;
and the second:
@If(PercentComplete >= 20;
and so on, incrementing the check by 10 each time. Of course, if you wanted to get more granular, you could create columns in increments of 5 or even 1 (if you are a real glutton for punishment!).
As you can see, if the value of the field is greater than the column being checked, it is colored. The background and text are set to the same color values. If PercentComplete is less than the column we are checking against, the color column resets the background text and color to white.*
If you want to show the actual percentage value in the middle of the chart (as in the picture above), then make column #5 hidden and set column #6 to display the value. In order to make the text of column #6 visible, the preceding column formula is slightly different, setting the text color to black (or whatever color complements your graphic scheme).
@If(PercentComplete >= 50;
That's all there is to it really. Just don't forget to check the "Use value as color" property on your color columns.
Do you have a variation on this or other clever uses for color columns in your apps? If so, please feel free to share with the class. Cheers!
*Notice that this looks less than perfect if you are using alternating row colors. Extra Bonus Points to the person that can figure out how to set the color column to "transparent". If you are using subtle colors for your alternating rows (you should be), then it doesn't look horrible, but it would sure be nice if we could have a little more granular control over this.