Visio is a tool that ships with Microsoft office and
allows users to create diagrams. We have been creating diagrams since we
were kids and since we were prehistoric apes. Diagrams are an excellent
way to communicate a complex concept. Even though high-level languages
have evolved, sometimes a picture does speak a thousand words.
Visio helps you create
beautiful looking diagrams, but until the last version of SharePoint
these diagrams were mostly static pictures. That is about to change
starting this version. In SharePoint 2010, there is a component of
SharePoint called as Visio Services. Visio Services allows you to view
any of your diagrams created in Visio, right through the browser. Also,
it allows you to give that diagram life. In other words, the diagram can
show live data by formatting itself in different ways or presenting
indicator icons depending upon the state of the data. The data can come
from various sources. Let's look at an example.
I am a really busy guy, so I like to maintain all my tasks in a tasks list in SharePoint. Figure 1 shows my tasks list in SharePoint after I populated some tasks in it.
Let's say I intend to
communicate to everyone in a graphical way the percent complete on all
these tasks. What I intend to do is present these tasks using a web
browser interface served in SharePoint. To do this, create a blank Visio
diagram in Visio 2010, and start by inserting a new container under the
insert button from the ribbon. Inside this container drag and drop
three "To do" shapes which you will find under the Schedule\Calendar
stencil. If you can't find the "To do" shape, just drag and drop any
other shape. You're just learning here, so you don't need to be all
artsy about it. At this point, your Visio diagram should look like Figure 2.
Next, click the data tab then
click the link data to shapes button in the ribbon. In the ensuing
wizard that pops open, choose to import data from the tasks list using
"Microsoft SharePoint foundation list" as your choice data source.
At the bottom of your Visio
window, you should see the various rows that have been pulled from the
linked data source. This can be seen in Figure3.
As the tooltip prompts you,
drag and drop each one of the three rows onto the three "to do" icons
you had placed earlier. Dragging and dropping each one of these three
rows one by one will link the row to the target shape that you drag drop
the row to. It will also create a default data graphic for you, as
shown in Figure 4.
The default data graphic
shows the title and start date. The default data graphic is fine, but
I'd like it to be little bit more interesting. For example, let's show
some decent formatting. Therefore, maybe the text should be a little bit
wider and also show the percent complete as a progress bar.
In order to do so, click the
data graphics button in the ribbon and choose to create a new graphic.
In the new data graphic window that pops open, click the new item
button. Choose to specify the new item being driven from the data field
percent complete, displayed as a data bar, in the style of progress bar.
This can be seen Figure 5.
Repeat the previous step for
the title and start date columns as well. The title and the start date
columns are to be shown as text. You will also have to play a bit with
the width. The final changes are shown in Figure 6.
Finally, click OK and apply
this newly created data graphic to the three shapes that you had earlier
on the screen. After some formatting, aligning, and final touches on
color, your Visio diagram should look like Figure 7.
Go ahead and save this on your
disk. Next, you need to make some changes to your SharePoint site
collection. Activate the SharePoint enterprise features under site
collection because Visio Services is a part of those enterprise
features. Also, create a document library called "Visio diagrams".
Next, in the backstage view of
Visio 2010, click on Save and Send\Save to SharePoint\Save as Web
Drawing (Data-refreshable drawing for use with Visio Services on
SharePoint). Choose to save it at http://sp2010/Visio Diagrams.
Save the file as "Sahils Tasks.vdw". Saving the file will immediately
open this Visio diagram in the web browser. If it doesn't, you need to
activate the SharePoint enterprise features on your site collection, and
you should have created a document library called "Visio Diagrams".
On the default.aspx page of
your site collection, choose to drop a "Visio Web Access" WebPart.
Configure this WebPart to point to the http://sp2010/Visio Diagrams/Sahils tasks.vdw file.
Also, you may need to configure the height width, etc., of this
WebPart. Once the WebPart is configured, you should see it running in
the web browser.
This looks very good! So let's
say that I've started on task one, and let's say that I'm only 25%
complete with that task. Therefore, I go to the tasks list and update
the percent complete of this task to 25%. Now I come back to Visio
Services diagram running in the browser. Note that the percent complete
is beautifully reflected on the diagram, as shown in Figure 8.
As you can see, I've
barely started stopping the Icelandic volcano that is disrupting
European air travel at the moment. But, hopefully, that problem will
figure itself out. Let me start talking about Excel Services.