mages / googleVis

Interface between R and the Google Chart Tools

Home Page:https://mages.github.io/googleVis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gvisOrgChart idvar with value and formatted value

dunhampa opened this issue · comments

I am having trouble implementing an idvar column when trying to have a formatted and unformatted value as indicated by gvisOrgChart documentation

gvisOrgChart documentation:

[in idvar] This is shown on the node. You can specify a formatted value to show on the chart instead, but the unformatted value is still used as the ID.

This seems to be taken from the google API to bind:
https://google-developers.appspot.com/chart/interactive/docs/gallery/orgchart

Based on the google documentation I tried some obvious encoding schemes:

Per google spec:

 OrgTb$df$Name[2]<-"[{v:'Mike', f:'Mike<div style=\"color:red; font-style:italic\">President</div>'}]"

Best guess:

 OrgTb$df$Name[2]<-data.frame(v='Jennifer Doe', f='Mike<div style=\"color:red; font-style:italic\">President</div>')

Is this supported?

Unfortunately, I don't think this is doable with the googleVis interface.

Thanks for clarification. Love the package!