Mapping relationships between people using interactive network chart

Share

Facebook
Twitter
LinkedIn

Today, lets learn how to create an interesting chart. This, called as network chart helps us visualize relationships between various people.

Demo of interactive network chart in Excel

First take a look at what we are trying to build.

Network Relationships - Interactive Chart in Excel - Demo

Looks interesting? Then read on to learn how to create this.

Note: thanks to Hans whose email question inspired me to create this chart.

Tutorial to create interactive network chart in Excel

Note: This tutorial requires intermediate-to-advanced Excel knowledge. So if you are beginner, learn the basics & advanced concepts first and then comeback for this.

In order to create this chart in Excel, we need to first understand various ingredients of it.

As you can see, the chart contains these parts:

  1. A set of dots, each representing one stakeholder
  2. A set of grayish thick & dotted lines representing all relationships between people.
  3. A set of green thick & blue dotted lines representing relationships for the selected person.
  4. A slicer for person selection (can be replaced with list box or clickable cells in Excel 2007 or below)
  5. Summary statistics of the selected person

Getting started with the relationship data

To simplify our tutorial, lets assume we are talking about relationships between just 4 people, named Ash, Billy, Cynthia & Darren.

Our relationship matrix looks like this:

Data - Relationship matrix - network chart in Excel

  • 0 means no relationship
  • 1 means weak relationship (for example: Ash & Billy just know each other)
  • 2 means strong relationship (for example: Cynthia & Billy are friends)

The downloadable workbook is created to take up to 20 stakeholders.

Geometry of the network chart

If we draw the relationships between these 4 people (Ash, Billy, Cynthia & Darren) on a paper, it would look like this:

Hand-drawn relationship network map

The 2 things we need to determine are,

  1. The location of dots (where person names are printed)
  2. The lines (starting & ending point of lines)

Plotting dots around circle

We need to plot our dots in such a way that gap between each dot is same.  This will create a balanced chart.

What shape satisfies our need for such equal gaps? A circle of course.

Hey wait, I don’t see a circle in the chart you have shown…?

Thats right. We don’t need to draw a circle. We just need to plot dots around it.

  • So we have 4 stakeholders, we need 4 dots
  • If we have 12 stakeholders, we need 12 dots
  • If we have 20, we need 20 dots.

Assuming the origin of our circle is (x,y), radius is r and theta is 360 divided by number of dots we need,

the first dot (x1,y1) on the circle will be at this position:

x1 = x + r*COS(theta)

y1 = y + r*SIN(theta)

[Related: How to create a spoke chart in Excel]

Once all the dots are calculated & plugged in to an XY chart (scatter plot), lets move on.

Plotting the lines

Lets say we have n people in the network. So that means, each person can have a maximum of n-1 relationships.

So the total possible lines in our chart are n*(n-1)/2

We need to divide it by 2 as if A knows B, then B knows A too. But we need to draw only 1 line.

My network chart template is set up to work with up to 20 people. So that means, the maximum number of lines we can have will be 190

Each line requires a separate series to be added to the chart. That means, we need to add 190 series of data just for 20 people. And that satisfies only one type of line (either dotted or thick). If we want different lines based on type of relationship, then we need to add another 190 series.

This is painful & ridiculous.

Fortunately there is a way out.

We can use far fewer series and still plot the same chart.

Lets say we have 4 people – A B C & D. For the sake of simplicity, lets assume the co-ordinates of these 4 are

  • A – (0,0)
  • B – (0,1)
  • C – (1,1)
  • D – (1,0)

And lets say, A has relationships with B, C & D.

That means we need to draw 3 lines, from A to B, A to C & A to D.

Now, instead of supplying 3 series for the chart, what if we supply one long series that looks like this:

(0,0), (0,1), (0,0), (1,1), (0,0), (1,0)

That means we are just drawing one long line from A to B to A to C to A to D. Agreed that it is not a straight line, but Excel scatter plots can draw any line as long as you provide a set of co-ordinates.

PS: This is a trick I learned from Roberto of E90E50. He used this trick in the winning entry of our recent dashboard contest.

See this illustration to understand the technique.

Using a single series to draw multiple lines in Excel XY chart

So instead of 190 series of data for the chart, we just need 20 series.

In the final chart, we actually have 40 + 2 + 1 series of data. This is because,

  • 20 lines for weak relationships (dotted lines)
  • 20 lines for strong relationships (thick lines)
  • 1 line for highlighted person’s weak relationships
  • 1 line for highlighted person’s strong relationships
  • 1 set of no line & just dots for the people

How to generate all the 20 series of data:

This requires following logic:

  • Assuming we need lines for the relationship of person n.
  • That person’s dot location will be (Xn, Yn) and already calculated earlier (in the plotting dots around circle)
  • We need total of 40 rows of data
  • Every odd row will have (Xn, Yn)
  • For every even row
    • Divide the row number by 2 to get person number (say m)
    • (Xn,Yn) if there is no relationship between n and m
    • (Xm,Ym) if there is a relationship

We need MOD & INDEX formulas to express this logic in Excel.

Examine the download workbook to understand how its done.

Once all the line co-ordinates are calculated, add them to our scatter plot and format.

I used a macro to automate the formatting. It can be done manually too, just takes a little patience.

Slicer for selecting a person

This works only in Excel 2010 or above.

Select the first 2 columns of relationship matrix & create a pivot table.

Now, insert a slicer on Person name column.

Slicer for person selection - network chart

Using simple IF formula, extract the selected person name from pivot table (examine download file for the logic).

And using the name, extract the subset of line data to separate range (2 sets of data – one for weak & one for strong relationships)

Add this new data to our scatter plot and format.

Format the slicer (using slicer styles) so that it looks slick.

Related: formatting slicers using styles.

NOTE About Slicers: If you change or add any data, you must refresh (from Data ribbon) to update the slicer. This can be automated with a macro, but I want to keep this file macro free.

[Alternative] Selecting a person with form controls

You can use either a list box or a range of clickable cells. See the 2003 compatible download file for an example of this.

Summary statistics

Using simple formulas extract statistics for the selected person and show them near the chart.

Summary statistics - Network chart in Excel

Adding labels to the chart (person names)

In our chart, we are showing person names instead of regular label like X or Y value. This is done with value from cells label feature in Excel 2013.

Labels for Excel scatter (XY) plot - done using Excel 2013 or add-in in earlier versions

For earlier versions of Excel, I recommend using Rob Bovey’s excellent XY Chart Labels add-in.

Putting it all together

Once everything is ready, clean up the chart, slicer and other elements, put them together. And we are ready to go.

Relationship Network in an interactive Excel Chart

Download Network Relationships Interactive Chart Template

Click here to download the chart template workbook. The download is a ZIP file and it contains 3 workbooks – compatible with Excel 2013, 2010 & 2003+. Use the version that you need.

Please examine the formulas & chart settings to understand how it is constructed.

Note: Hit Refresh from Data ribbon to change slicer once you have added or modified data.

When to use network relationship chart?

A network graph is a good place to explore relationships between people in a project or team. It is especially useful when selecting a sub-set of people from large group to closely work on a project.

Any alternatives?

There is a popular Excel Add-in named NodeXL that can help you visualize and analyze relationships between people in a more in-depth fashion.

Check out Chord diagram & Cosmograph from E90E50 site for other ways to present this data.

Do you use these kind of charts?

I have used network charts earlier to depict relationships between various people or things. But I have never created such charts in Excel, I always used either Power Point or some other drawing program to create them. That is why I am excited about this chart. Figuring out the formula & graphing logic was fun.

What about you? Have you used such charts before? How do you like the network chart presented here? Please share your thoughts using comments.

 

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

15 Responses to “A Gantt Chart Alternative – Gantt Box Chart”

  1. Kenjin says:

    That's a great idea.
    Maybe the planned End Date should be highlight more.
    I don't know how it would look like (nor how to do it yet), but what if instead of finishing the bold line to the best case End Date, it finishes to the realistic End Date?

  2. ross says:

    The idea is ok, I think other project management tools have this, already? Maybe not.

    Gantt charts in my view are about the signal most unless thing in the world, theres no way you can look at one thats more that a little complex and understand what it's telling you. I'm going to write a diatribe on project management at some point, its one of my pet areas I think!! 😉

    The issue I have with this chart Chandoo, is that Tasks need to be linked to each other, so they should inherit the uncertainty, which would mean the as you moved down chart the lines would be miles apart for later tasks, and you might have to add lots of lines for subsequent tasks to cover the various outcome of it's parents.

    Having said that, for the high level board summary, it's a nice way to go, it it appeals to the management 😉

    thanks Chandoo, great post.

    Ross

  3. Cyril Z. says:

    Whoooa !!! That's a very clever idea Chandoo. I really love it.
    I think i'll update my gantt project sheet with that idea soon (remember my template ?)
    @ross : you can link start date to the end date of the previous task in your data. The only problem I still se is to which end date (real ? planned ? best ?) in order to have average amount of information.

    If best end date, you'll tend to increase uncertainty at the end of chain, although if you link to real end date, uncertainty will be decreased too much, leading in both cases to wrong management direction.

    Maybe planned till the task is finished then real will do the job ?

  4. Vijesh says:

    Hey chandoo, this looks good and this would definite add value in production planning / scheduling. Uncertainity in finishing a task is very high in production scheduling and this could give an insight or a bird eye view of possible shipments we can have....

  5. PK says:

    I've always been frustrated by the limitations of gantt charts. Will definitely use this, I've always struggled with how to succinctly communicate the uncertainty of certain tasks without confusing stakeholders.

  6. Andy says:

    I like this, I think it's a very effective way of showing how a timeline can change and which parts of a project need close attention.
    @Cyril / @Ross: I would intially link the the start date to the planned end date of the previous task, with the chart updating when a task has been completed to reflect the true end date.

    Or what about giving a drop-down selection box to allow the user to see the chart based on planned/best-case/worst-case end dates?

  7. Eric says:

    Like the idea. Have found that Excel is more flexible than MS Project for graphical solutions. The "Best Case"\"Worst Case" metrics are theoretically appealing but once the project and\or phase commences their reliability diminishes. A chart like the above that showed Planned Start, Planned End, Replan End Start, Replan End Date, Number of Replans the Start and End Dates, and Actual would provide an active, actionable view of each task\phase. It would also highlight the areas which are riskiest.

  8. Bob says:

    It is always amazing how flexible excel can be.

    My question is how would the chart show a scenario where the date moved up? If a task is dropped or the duration of the task is significantly reduced by applying more people or machinery to the task, the dates will move up.

    The gantt chart has been around for a long time, but it is still quite useful to show progress.

    Cheers,
    B

  9. Shyam says:

    I like the idea but seems bit complicated in case of long projects involving numerous activity.

    Also, reading and explaining is required hence not feasible where plans are just send to audience for approval.

    Cheers
    SY

  10. Peter says:

    Great idea Chandoo,

    When I was reading this idea regarding delivery dates, another thought popped into my mind, how can you show the uncertainty with MONEY!!

    In this case, applies to cost management or even a normal budget, you think?

    Would Box Chart and Gannt Chart help to understand the best case, middle case and worst case when money is spend or planned with these three risks are involved?

    I imagine that this chart could help people who write their budgets get a better understanding of risks affecting their spending.

    Peter

  11. Matthew Galman says:

    Chandoo,

    I like it. How would you display an entry once it has been completed (actual)?

    Thank you,

    Matt

  12. Phil says:

    From what you have shown so far I think that this box Gantt chart is awesome! I think that this could be an extremely useful tool.

    I can't wait to learn how to make my own charts in Excel.

    Will the methods that you are going to teach us work in 2003 as well?

  13. [...] Firday, we proposed a new chart for showing project plans. I chose an ugly name for it and called it Gantt Box [...]

  14. TommyZ says:

    You need to read Eli Goldratt's Critical Chain. The uncertainty you are looking for should be accounted for in a project buffer. Not at each task level.

    Further you should spend time understanding Agile Development. This would have you plan only in 1-3week iterations. This allows you to embrace changes to work not yet started, and for your customer to re-direct your course at regular intervals (after each iteration) throughout your project. keyword search: Agile Scrum

    These items will show you that you are solving a tracking problem for something that you can entirely avoid!

  15. […] Chandoo.org’s  Gantt Box Chart. […]

Leave a Reply