Thursday, February 17, 2011

Charting SharePoint Choice Columns

Choice columns are a great feature in SharePoint in that they let the administrator constrain the 'anything is possible as long as its text' textbox to a predefined list of acceptable values. For a SharePoint task list, the 'status' choice column is a perfect example. Rather than let users type in 'Getting Close' or 'I think I just about got it', users must select from 'Not Started', 'In Progress', 'Completed', 'Deferred' and 'Waiting for someone else'. Of course, more values can be added to a choice column at any time by a site owner.

Here's how the IntelliGantt Web Part works with the choice columns defined in the list settings. As mentioned earlier, 'status' is a powerful choice field for relaying the basic state of a task. IntelliGantt works with the built in status choices to build pie charts for each person (comprised of that person's task assignments) and builds a pie slice for each choice value present.

The choice columns available in this section are controlled by the current view in use. In this example, the 'All Tasks' default view has both 'Status' and 'Priority' choice columns in its list, so these choice columns are available to select. (Note: the 'People' option is something the IntelliGantt Web Part adds if you just want to see people and not pie charts).

The choice columns themselves are defined in the list settings for the task list (or any list, for that matter).

IntelliGantt is completely dynamic in its presentation and pulls column information from SharePoint for its display. So let's add another choice column and see how it appears in IntelliGantt. After clicking on the 'create column' link in the list settings we can name and type our new column:

Next we will provide the values and add some formatting information:

Note that made 'North' the default choice and added this column to the default view. When we return to the IntelliGantt Web Part, once it has refreshed, we will see this choice available.

The 'Region' column is now available in the charting pane and has been added to the Task Grid as well. When we select the 'Region' column in the charting pane its values populate below it. Notice that North is in bold. This is because North is the default value.

The pie charts themselves are not very exciting at this point because, since this is a new choice column, none of the tasks have any region values. Let's add some.

Of course, choices aren't set in stone. Sometimes they need to be updated. Because IntelliGantt is so dynamic it handles this case as well. Let's go back to the region column definition in our list settings and add the most important region of all-- Northwest!

When IntelliGantt refreshes it will recognize the new value and add it to the option list for the 'Region' choice.

Thus, when we update a task with this new value, the other visuals will be updated as well.

The pie slices use IntelliGantt's default color palette, which starts out with similar colors so the Gantt chart doesn't look like a Christmas tree. You can change the default color palette, or you can designate a specific choice field to use a custom palette. How to change colors is covered in detail in our forum.

No comments: