How to have six icons in a Visio Data Graphic Icon Set

I was recently asked to represent the values of Key Performance Indicators (KPIs) in Visio. Great, I thought, this is just what Visio’s Data Graphic Icon Sets are for! Only trouble was, that there were six possible values for the KPI, but all the example Icon Sets have a maximum of five icons in them. So, I had to come up with a way of displaying six icons …

In the following example, I have defined a Shape Data row with a Fixed List type that can have a value from the list “3;2;1;-1;-2;-3

image

I applied the Faces Icon Set, and set icons for each value, except for –1:

image

Consequently, when I dropped six shapes, each with one of the possible values, then there is no icon shown for the –1 value:

image

So, I explored the Faces icon set to see if I could display an icon if the value does not match one of the assigned matched values in the icon set. (Note that the sixth icon will not be for the value –1 specifically, but for any value that is not matched already).

First of all, I opened the Drawing Explorer (from the Developer tab when in Developer Mode), and ticked the Match master by name on drop property. This ensures that Visio will not attempt to use the original Faces icon set master (provided that any changes are not too drastic).:

image

I then selected Edit Master Shape, and viewed the ShapeSheet of the main group shape, Sheet.5 :

image

Notice that the Geometry1.NoShow and the HideText cells have the formula

=IF(User.msvCalloutIconNumber=-1,TRUE,FALSE)

I opened the ShapeSheet of the sub-shape, Sheet.78, and noticed that there are many Geometry sections, each of which have their NoShow formula linked to the value 0 to 4 for the User.msvCalloutIconNumber cell, which references the User.msvCalloutIconNumber cell in the parent group shape.

image

Therefore, all that is needed is to amend the formulas to display geometry if there is no matched value.

So, I manually edited the value of the User.msvCalloutIconNumber  in Sheet.5 to –1. This switched off the display of all graphics:

image

I then changed the formula in the NoShow cell of Geometry sections 7, 12 and 13 from:

=IF(User.visCalloutIconNumber=2,FALSE,TRUE)

to:

=IF(LOOKUP(User.visCalloutIconNumber,”0;1;3;4″)>-1,TRUE,FALSE)

This gave me two eyes and a mouth:

image

I decided to give the mouth a slant in order to distinguish it from the case when the value = 2. So, I changed the formula for the Geometry7.Y2 from:

=Height*0.341

to:

=IF(User.visCalloutIconNumber=2,Height*0.341,Height*0.25)

image

All that remains is to edit the Geometry1.NoShow cell formula of Sheet.5 to =FALSE :

image

Finally, I closed the master shape window to save the icon set.

I then refreshed the displayed icon set by selecting another one, applying, then back to the Faces icon set. Now I get an icon for each of the six values in my KPI Shape Data row:

image

Note that these edited icon sets are in the document stencil. You can download this example from : https://skydrive.live.com/redir.aspx?cid=3350d61bc93733a9&resid=3350D61BC93733A9!2514&parid=3350D61BC93733A9!197

I have shown how you can modify one of the built-in icon sets in Visio 2007/2010, and you can apply the same principle to all of the other built-in icon sets, or you can build your own icon sets.

Make Your Own Data Graphic – Icon Sets at http://blogs.msdn.com/b/visio/archive/2007/07/20/make-your-own-data-graphic-icon-sets.aspx

Create your own Icon-Sets for Data Graphics at http://blogs.msdn.com/b/chhopkin/archive/2009/02/03/create-your-own-icon-sets-for-data-graphics.aspx

Using Data Graphics to Reinforce Information at http://www.visualizinginformation.com/chapters/chapter07/chapter.aspx

In the next blog, I will be showing you how to create new icon sets from existing shapes … automatically.

8 Responses to “How to have six icons in a Visio Data Graphic Icon Set”

  1. johnvisiomvp Says:

    Nice article. So does this mean you can add MORE than six icons or are there other limiting factors?

    • davidjpp Says:

      Now then, don’t be greedy!
      You can only have 6 because the sixth one is set to be the default if a matching value for the other 5 is not found …

  2. Make Your Own Visio Data Graphic Icons Sets … automatically « bVisual Says:

    […] post, I showed how you can actually have up to six icons in a Visio Data Graphics Icon Set ( see https://davidjpp.wordpress.com/2012/04/11/how-to-have-six-icons-in-a-visio-data-graphic-icon-set/ ), and I finished by saying that I would now show how to create new icon sets from existing shapes […]

  3. Michael F. Clark Says:

    I’m using 4 ovals grouped together in a pattern to illustrate ONE icon of six (6) in the set, which I group to make an icon set. Everything is working perfectly, except for the last icon in the set. I’m trying to follow this post, but I do not have a series of Geometry areas to modify. I have the msvCalloutIconCount set to 6, and simply changing the msvCalloutNumber will give me the results I want. However, as you know, this doesn’t translate into a functional data graphic. What am I missing?

  4. Caroline Rochon Says:

    Can someone help me with the Visio 2013 Pro Link shapes to data function?
    I use a MS Access database data source (instead of Excel) and I want to open the database and update the specific data record by double-clicking on form in the Visio drawing. I want the specific Access database record to pop up in a window in Visio so I can update it. This would be much more efficient.
    Can you provide the code?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Chris Webb's BI Blog

Microsoft Analysis Services, MDX, DAX, Power Pivot, Power Query and Power BI

davecra.wordpress.com/

Microsoft Office 365 Development, and more...

PowerShell.Amsterdam

Automate, Accelerate, Accurate

johnvisiomvp

Life with Visio and other Microsoft Toys!

Title (Required)

Windows Server Essentials Tips & Tricks

Nilsandrey's Weblog

Just another WordPress.com weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Shapes, Stencils, Drawings Templates, Tutorials, Tips & Developer Info for Microsoft Visio

Hannes's Virtual Earth

Tips & Tricks around Mapping and Cloud Computing

Pluralsight blog

be smart, be clear, be visual ...

%d bloggers like this: