Datagraphics color by value question

Started by ccoulter, October 21, 2015, 02:25:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ccoulter

Hello,

I have been reading about the Datagraphics option and its ability to color by value and I have these two questions:

1. Is the Datagraphics option only available in Visio Professional?

2. When coloring by value, can that value be automatically excluded from showing in the shape but still shade the shape in the intended color? For example, each position box on my org chart would be dependent on these three pieces of data:
a. Name (shown in shape)
b. Job Title (shown in shape)
c. Authorization for that job (shape color determined by this value, but value would not be shown in shape). For example: Positions that were authorized under our finance plan would be shaded light blue and positions added during the year but were not authorized would be shaded in orange). Originally, I thought I would just print "authorized" or 'not authorized" in the shape below the name and job title but the manager does not want that.

Thank you so much for your help,

Chris

JohnGoldsmith

Hello Chris,

Yes, DataGraphics is a Professional and above feature.

For your data hiding question, I suppose it depends on how secret the information needs to be, but one approach might be to include a proxy column in your data that doesn't convey the sensitive data.  For example if you have a spreadsheet where one of the columns is "Authorization" you could add an adjoining one called, say, "IsOrange" and include an Excel formula to reference the "Authorization" column and return true if it equalled "Not authorized".  That way anyone looking at the Visio diagram would only know that IsOrange is true, which they could already tell by looking at the shape.

If Professional isn't an option, then you could either write a a little code to loop through your shapes or edit your master shapes to respond to the IsOrange Shape Data.

Hope that helps.

Best regards

John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

ccoulter

Hi John,

Thank you very much for your reply. The information you provided was very helpful... I had not though about a proxy column, that may be a promising path forward! Since we do not have Visio Pro, I have tried a macro based on an example I found in this forum or online, but I can't remember whom to give credit too, unfortunately. I modified the macro (example below) and it did work. But I could perhaps "marry it" with the proxy idea that you suggested. Many thanks!

Chris


ub BPGroup()

Dim shp As Visio.Shape

For Each shp In ActivePage.Shapes

  If shp.CellExists("Prop.BPGroup", False) Then

    Select Case shp.Cells("Prop.BPGroup").ResultStr("")
   
      Case "Allowed": shp.Cells("LineColor").FormulaU = "RGB(0,0,0)"
      Case "NotAllowed": shp.Cells("LineColor").FormulaU = "RGB(255,0,0)"

    End Select
  End If

Next

End Sub