This is the third and final part of a post on how to create a Visio shape that displays multiple colours based on linked data within an Excel workbook...
If you've arrived at this final part first, then here are parts 1 and part 2.
Updating Visio Data Graphics
Given that you’ve just created a master shape that includes Color by value Data Graphics, you might think that the way to go about changing the colours would be to open up the master in edit mode and fire up the Data Graphics dialog. The problem is that Data Graphics are generally applied to instance shapes and the dialog (or at least the button the opens it) is disabled when editing a master shape.
That’s ok. It just means that you need a slightly different workflow:
- To make things a little easier, you can (optionally) start by renaming the Data Graphics that you created in the previous post.
- Open the Drawing Explorer and right-click on the first Data Graphic master, select Master properties… and rename it to MultiCBV_DG1
- Do the same rename step for each of the other three Data Graphic masters changing the last number to 2,3 and 4.
- Now you know which Data Graphic is which, select an instance of your shape and sub-select the first rectangle sub-shape.
- With the sub-shape selected click Data [tab] / Data Graphics / Edit Data Graphic…
- Make changes as required via the Edit item… button and then, making sure the All shapes with this data graphic is checked, click the OK button.
The point here is that you’re updating the Data Graphic master and so all of the shapes that ‘use’ that master will be updated accordingly.
One final note is that, as these Data Graphics that you’ve created are kind of a special use case, you might want to hide them in the UI to prevent other users applying them to inappropriate shapes. You can achieve this by toggling the User.visDGVisible cell found in the page ShapeSheet of the Data Graphic master. Setting this cell to false prevents it from being displayed under the Data [tab] / Data Graphic drop-down button.
If you want to find out more about Data Graphics then there’s more reading available: